snakima 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,276 @@
1
+ @use "snakima/utilities" as *;
2
+
3
+ /**
4
+ * Reset some basic elements
5
+ */
6
+ body, h1, h2, h3, h4, h5, h6,
7
+ p, blockquote, pre, hr,
8
+ dl, dd, ol, ul, figure {
9
+ margin: 0;
10
+ padding: 0;
11
+ }
12
+
13
+
14
+
15
+ /**
16
+ * Basic styling
17
+ */
18
+ body {
19
+ font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family;
20
+ color: $text-color;
21
+ background-color: $background-color;
22
+ -webkit-text-size-adjust: 100%;
23
+ -webkit-font-feature-settings: "kern" 1;
24
+ -moz-font-feature-settings: "kern" 1;
25
+ -o-font-feature-settings: "kern" 1;
26
+ font-feature-settings: "kern" 1;
27
+ font-kerning: normal;
28
+ display: flex;
29
+ min-height: 100vh;
30
+ flex-direction: column;
31
+ }
32
+
33
+
34
+
35
+ /**
36
+ * Set `margin-bottom` to maintain vertical rhythm
37
+ */
38
+ h1, h2, h3, h4, h5, h6,
39
+ p, blockquote, pre,
40
+ ul, ol, dl, figure {
41
+ @include vertical-rhythm;
42
+ }
43
+
44
+
45
+
46
+ /**
47
+ * `main` element
48
+ */
49
+ main {
50
+ display: block; /* Default value of `display` of `main` element is 'inline' in IE 11. */
51
+ }
52
+
53
+
54
+
55
+ /**
56
+ * Images
57
+ */
58
+ img {
59
+ max-width: 100%;
60
+ vertical-align: middle;
61
+ }
62
+
63
+
64
+
65
+ /**
66
+ * Figures
67
+ */
68
+ figure > img {
69
+ display: block;
70
+ }
71
+
72
+ figcaption {
73
+ font-size: $small-font-size;
74
+ }
75
+
76
+
77
+
78
+ /**
79
+ * Lists
80
+ */
81
+ ul, ol {
82
+ margin-left: $spacing-unit;
83
+ }
84
+
85
+ li {
86
+ > ul,
87
+ > ol {
88
+ margin-bottom: 0;
89
+ }
90
+ }
91
+
92
+
93
+
94
+ /**
95
+ * Headings
96
+ */
97
+ h1, h2, h3, h4, h5, h6 {
98
+ font-weight: $base-font-weight;
99
+ }
100
+
101
+
102
+
103
+ /**
104
+ * Links
105
+ */
106
+ a {
107
+ color: $brand-color;
108
+ text-decoration: none;
109
+
110
+ &:visited {
111
+ color: $brand-color-dark;
112
+ }
113
+
114
+ &:hover {
115
+ color: $text-color;
116
+ text-decoration: underline;
117
+ }
118
+
119
+ .social-media-list &:hover {
120
+ text-decoration: none;
121
+
122
+ .username {
123
+ text-decoration: underline;
124
+ }
125
+ }
126
+ }
127
+
128
+
129
+ /**
130
+ * Blockquotes
131
+ */
132
+ blockquote {
133
+ color: $grey-color;
134
+ border-left: 4px solid $grey-color-light;
135
+ padding-left: $spacing-unit * 0.5;
136
+ @include relative-font-size(1.125);
137
+ letter-spacing: -1px;
138
+ font-style: italic;
139
+
140
+ > :last-child {
141
+ margin-bottom: 0;
142
+ }
143
+ }
144
+
145
+
146
+
147
+ /**
148
+ * Code formatting
149
+ */
150
+ pre,
151
+ code {
152
+ @include relative-font-size(0.9375);
153
+ border: 1px solid $grey-color-light;
154
+ border-radius: 3px;
155
+ }
156
+
157
+ code {
158
+ padding: 1px 5px;
159
+ }
160
+
161
+ pre {
162
+ padding: 8px 12px;
163
+ overflow-x: auto;
164
+
165
+ > code {
166
+ border: 0;
167
+ padding-right: 0;
168
+ padding-left: 0;
169
+ }
170
+ }
171
+
172
+
173
+
174
+ /**
175
+ * Wrapper
176
+ */
177
+ .wrapper {
178
+ max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2));
179
+ max-width: calc(#{$content-width} - (#{$spacing-unit} * 2));
180
+ margin-right: auto;
181
+ margin-left: auto;
182
+ padding-right: $spacing-unit;
183
+ padding-left: $spacing-unit;
184
+ @include clearfix;
185
+
186
+ @include media-query($on-laptop) {
187
+ max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit}));
188
+ max-width: calc(#{$content-width} - (#{$spacing-unit}));
189
+ padding-right: $spacing-unit * 0.5;
190
+ padding-left: $spacing-unit * 0.5;
191
+ }
192
+ }
193
+
194
+
195
+
196
+ /**
197
+ * Icons
198
+ */
199
+
200
+ .svg-icon {
201
+ width: 16px;
202
+ height: 16px;
203
+ display: inline-block;
204
+ fill: #{$grey-color};
205
+ padding-right: 5px;
206
+ vertical-align: text-top;
207
+ }
208
+
209
+ .social-media-list {
210
+ li + li {
211
+ padding-top: 5px;
212
+ }
213
+ }
214
+
215
+
216
+
217
+ /**
218
+ * Tables
219
+ */
220
+ table {
221
+ margin-bottom: $spacing-unit;
222
+ width: 100%;
223
+ text-align: $table-text-align;
224
+ color: $text-color;
225
+ border-collapse: separate; // enable rounded corners
226
+ border-spacing: 0; // remove extra spacing while preserving separate borders
227
+ border: 1px solid $grey-color-light;
228
+ border-radius: 3px; // adjust radius as desired
229
+
230
+ tr {
231
+ &:nth-child(even) {
232
+ background-color: $grey-color-dark;
233
+ }
234
+ }
235
+
236
+ th,
237
+ td {
238
+ padding: ($spacing-unit * 0.3333333333) ($spacing-unit * 0.5);
239
+ }
240
+
241
+ th {
242
+ background-color: $grey-color-dark;
243
+ border-bottom: 1px solid $grey-color-light;
244
+
245
+ // add borders between titles
246
+ &:not(:last-child) {
247
+ border-right: 1px solid $grey-color-light;
248
+ }
249
+ }
250
+
251
+ td {
252
+ border-top: 1px solid $grey-color-light;
253
+ // optional: add vertical borders between columns
254
+ &:not(:last-child) {
255
+ border-right: 1px solid $grey-color-light;
256
+ }
257
+ }
258
+
259
+ // Optional: refine rounded corners on thead and tfoot for precise visual polishing
260
+ thead tr:first-child {
261
+ th:first-child {
262
+ border-top-left-radius: 6px;
263
+ }
264
+ th:last-child {
265
+ border-top-right-radius: 6px;
266
+ }
267
+ }
268
+ tbody tr:last-child {
269
+ td:first-child {
270
+ border-bottom-left-radius: 6px;
271
+ }
272
+ td:last-child {
273
+ border-bottom-right-radius: 6px;
274
+ }
275
+ }
276
+ }
@@ -0,0 +1,264 @@
1
+ @use "snakima/utilities" as *;
2
+
3
+ /**
4
+ * Site header
5
+ */
6
+ .site-header {
7
+ // border-top: 5px solid $grey-color-dark;
8
+ // border-bottom: 1px solid $grey-color-light;
9
+ min-height: $spacing-unit * 1.865;
10
+
11
+ // Positioning context for the mobile navigation icon
12
+ position: relative;
13
+ }
14
+
15
+ .site-title {
16
+ @include relative-font-size(1.625);
17
+ font-weight: 300;
18
+ line-height: $base-line-height * $base-font-size * 2.25;
19
+ letter-spacing: -1px;
20
+ margin-bottom: 0;
21
+ float: left;
22
+
23
+ &,
24
+ &:visited {
25
+ color: $brand-color;
26
+ }
27
+ }
28
+
29
+ .site-title-main {
30
+ &,
31
+ &:visited {
32
+ color: $title-main-color;
33
+ }
34
+ }
35
+
36
+ .site-nav {
37
+ float: right;
38
+ line-height: $base-line-height * $base-font-size * 2.25;
39
+
40
+ .nav-trigger {
41
+ display: none;
42
+ }
43
+
44
+ .menu-icon {
45
+ display: none;
46
+ }
47
+
48
+ .page-link {
49
+ color: $text-color;
50
+ line-height: $base-line-height;
51
+
52
+ // Gaps between nav items, but not on the last one
53
+ &:not(:last-child) {
54
+ margin-right: 20px;
55
+ }
56
+ }
57
+
58
+ @include media-query($on-palm) {
59
+ position: absolute;
60
+ top: 9px;
61
+ right: $spacing-unit * 0.5;
62
+ background-color: $background-color;
63
+ border: 1px solid $grey-color-light;
64
+ border-radius: 5px;
65
+ text-align: right;
66
+
67
+ label[for="nav-trigger"] {
68
+ display: block;
69
+ float: right;
70
+ width: 36px;
71
+ height: 36px;
72
+ z-index: 2;
73
+ cursor: pointer;
74
+ }
75
+
76
+ .menu-icon {
77
+ display: block;
78
+ float: right;
79
+ width: 36px;
80
+ height: 26px;
81
+ line-height: 0;
82
+ padding-top: 10px;
83
+ text-align: center;
84
+
85
+ > svg {
86
+ // fill: $grey-color-dark;
87
+ }
88
+ }
89
+
90
+ input ~ .trigger {
91
+ clear: both;
92
+ display: none;
93
+ }
94
+
95
+ input:checked ~ .trigger {
96
+ display: block;
97
+ padding-bottom: 5px;
98
+ }
99
+
100
+ .page-link {
101
+ display: block;
102
+ margin-left: 20px;
103
+ padding: 5px 10px;
104
+
105
+ &:not(:last-child) {
106
+ margin-right: 0;
107
+ }
108
+ }
109
+ }
110
+ }
111
+
112
+
113
+
114
+ /**
115
+ * Site footer
116
+ */
117
+ .site-footer {
118
+ // border-top: 1px solid $grey-color-light;
119
+ padding: $spacing-unit 0;
120
+ }
121
+
122
+ .footer-heading {
123
+ @include relative-font-size(1.125);
124
+ margin-bottom: $spacing-unit * 0.5;
125
+ }
126
+
127
+ .contact-list,
128
+ .social-media-list {
129
+ list-style: none;
130
+ margin-left: 0;
131
+ }
132
+
133
+ .footer-col-wrapper {
134
+ @include relative-font-size(0.9375);
135
+ color: $grey-color;
136
+ margin-left: -$spacing-unit * 0.5;
137
+ @include clearfix;
138
+ }
139
+
140
+ .footer-col {
141
+ float: left;
142
+ margin-bottom: $spacing-unit * 0.5;
143
+ padding-left: $spacing-unit * 0.5;
144
+ }
145
+
146
+ .footer-col-1 {
147
+ width: -webkit-calc(35% - (#{$spacing-unit} / 2));
148
+ width: calc(35% - (#{$spacing-unit} / 2));
149
+ }
150
+
151
+ .footer-col-2 {
152
+ width: -webkit-calc(20% - (#{$spacing-unit} / 2));
153
+ width: calc(20% - (#{$spacing-unit} / 2));
154
+ }
155
+
156
+ .footer-col-3 {
157
+ width: -webkit-calc(45% - (#{$spacing-unit} / 2));
158
+ width: calc(45% - (#{$spacing-unit} / 2));
159
+ }
160
+
161
+ @include media-query($on-laptop) {
162
+ .footer-col-1,
163
+ .footer-col-2 {
164
+ width: -webkit-calc(50% - (#{$spacing-unit} / 2));
165
+ width: calc(50% - (#{$spacing-unit} / 2));
166
+ }
167
+
168
+ .footer-col-3 {
169
+ width: -webkit-calc(100% - (#{$spacing-unit} / 2));
170
+ width: calc(100% - (#{$spacing-unit} / 2));
171
+ }
172
+ }
173
+
174
+ @include media-query($on-palm) {
175
+ .footer-col {
176
+ float: none;
177
+ width: -webkit-calc(100% - (#{$spacing-unit} / 2));
178
+ width: calc(100% - (#{$spacing-unit} / 2));
179
+ }
180
+ }
181
+
182
+
183
+
184
+ /**
185
+ * Page content
186
+ */
187
+ .page-content {
188
+ padding: $spacing-unit 0;
189
+ flex: 1;
190
+ }
191
+
192
+ .page-heading {
193
+ @include relative-font-size(2);
194
+ }
195
+
196
+ .post-list-heading {
197
+ @include relative-font-size(1.75);
198
+ }
199
+
200
+ .post-list {
201
+ margin-left: 0;
202
+ list-style: none;
203
+
204
+ > li {
205
+ margin-bottom: $spacing-unit;
206
+ }
207
+ }
208
+
209
+ .post-meta {
210
+ font-size: $small-font-size;
211
+ color: $grey-color;
212
+ }
213
+
214
+ .post-link {
215
+ display: block;
216
+ @include relative-font-size(1.5);
217
+ }
218
+
219
+
220
+
221
+ /**
222
+ * Posts
223
+ */
224
+ .post-header {
225
+ margin-bottom: $spacing-unit;
226
+ }
227
+
228
+ .post-title {
229
+ @include relative-font-size(2.625);
230
+ letter-spacing: -1px;
231
+ line-height: 1;
232
+
233
+ @include media-query($on-laptop) {
234
+ @include relative-font-size(2.25);
235
+ }
236
+ }
237
+
238
+ .post-content {
239
+ margin-bottom: $spacing-unit;
240
+
241
+ h2 {
242
+ @include relative-font-size(2);
243
+
244
+ @include media-query($on-laptop) {
245
+ @include relative-font-size(1.75);
246
+ }
247
+ }
248
+
249
+ h3 {
250
+ @include relative-font-size(1.625);
251
+
252
+ @include media-query($on-laptop) {
253
+ @include relative-font-size(1.375);
254
+ }
255
+ }
256
+
257
+ h4 {
258
+ @include relative-font-size(1.25);
259
+
260
+ @include media-query($on-laptop) {
261
+ @include relative-font-size(1.125);
262
+ }
263
+ }
264
+ }
@@ -0,0 +1,128 @@
1
+ @use "snakima/utilities" as *;
2
+
3
+ /**
4
+ * Syntax highlighting styles
5
+ */
6
+ .highlight {
7
+ background: #1e1e1e;
8
+ color: $text-color; // base text color
9
+ @include vertical-rhythm;
10
+
11
+ .highlighter-rouge & {
12
+ background: $grey-color-dark;
13
+ }
14
+
15
+ .c, // Comment
16
+ .cm,
17
+ .c1 {
18
+ color: #6a9955;
19
+ font-style: italic;
20
+ }
21
+
22
+ .cs { // Comment.Special
23
+ color: #6a9955;
24
+ font-style: italic;
25
+ font-weight: bold;
26
+ }
27
+
28
+ .err {
29
+ color: #f44747;
30
+ background-color: #1e1e1e;
31
+ }
32
+
33
+ .k, // Keyword
34
+ .kc,
35
+ .kd,
36
+ .kp,
37
+ .kr,
38
+ .kt {
39
+ color: #569cd6;
40
+ font-weight: bold;
41
+ }
42
+
43
+ .o, // Operator
44
+ .ow {
45
+ color: #d4d4d4;
46
+ font-weight: bold;
47
+ }
48
+
49
+ .m, // Numbers
50
+ .mf,
51
+ .mh,
52
+ .mi,
53
+ .mo,
54
+ .il {
55
+ color: #b5cea8;
56
+ }
57
+
58
+ .s, // Strings
59
+ .sb,
60
+ .sc,
61
+ .sd,
62
+ .s2,
63
+ .se,
64
+ .sh,
65
+ .si,
66
+ .sx,
67
+ .sr,
68
+ .s1,
69
+ .ss {
70
+ color: #ce9178;
71
+ }
72
+
73
+ .na, // Attribute name
74
+ .nb, // Builtin
75
+ .bp {
76
+ color: #dcdcaa;
77
+ }
78
+
79
+ .nc, // Class name
80
+ .no, // Constant
81
+ .vc, // Variable.Class
82
+ .vg, // Variable.Global
83
+ .vi { // Variable.Instance
84
+ color: #4ec9b0;
85
+ }
86
+
87
+ .ni, // Entity
88
+ .ne, // Exception
89
+ .nf { // Function
90
+ color: #dcdcaa;
91
+ }
92
+
93
+ .nn { // Namespace
94
+ color: #9cdcfe;
95
+ }
96
+
97
+ .nt { // Tag
98
+ color: #569cd6;
99
+ }
100
+
101
+ .w { // Whitespace
102
+ color: #d4d4d4;
103
+ }
104
+
105
+ .gh, // Heading
106
+ .gp, // Prompt
107
+ .gu, // Subheading
108
+ .gt, // Traceback
109
+ .gr { // Generic.Error
110
+ color: #d4d4d4;
111
+ }
112
+
113
+ .gd { // Generic.Deleted
114
+ background-color: #f85149;
115
+ }
116
+
117
+ .gi { // Generic.Inserted
118
+ background-color: #2ea043;
119
+ }
120
+
121
+ .ge { // Emphasis
122
+ font-style: italic;
123
+ }
124
+
125
+ .gs { // Strong
126
+ font-weight: bold;
127
+ }
128
+ }
@@ -0,0 +1,57 @@
1
+ // Define defaults for each variable.
2
+
3
+ $base-font-family: 'Noto sans', sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
4
+ $base-font-size: 16px !default;
5
+ $base-font-weight: 400 !default;
6
+ $small-font-size: $base-font-size * 0.875 !default;
7
+ $base-line-height: 1.5 !default;
8
+
9
+ $spacing-unit: 30px !default;
10
+
11
+ $text-color: #cccccc !default;
12
+ $background-color: #1F1F1F !default;
13
+ $brand-color: #9CDCFE !default;
14
+ $brand-color-dark: #569CD6 !default;
15
+ $title-main-color: #6A9955 !default;
16
+
17
+ $grey-color: #8c8c8c !default;
18
+ $grey-color-light: #cacaca !default; // Precomputed 40% lighter
19
+ $grey-color-dark: #2b2b2b !default; // Precomputed 25% darker
20
+
21
+ $table-text-align: left !default;
22
+
23
+ // Width of the content area
24
+ $content-width: 800px !default;
25
+
26
+ $on-palm: 600px !default;
27
+ $on-laptop: 800px !default;
28
+
29
+ // Use media queries like this:
30
+ // @include media-query($on-palm) {
31
+ // .wrapper {
32
+ // padding-right: $spacing-unit / 2;
33
+ // padding-left: $spacing-unit / 2;
34
+ // }
35
+ // }
36
+
37
+ @mixin vertical-rhythm {
38
+ margin-bottom: $spacing-unit * 0.5;
39
+ }
40
+
41
+ @mixin clearfix {
42
+ &:after {
43
+ content: "";
44
+ display: table;
45
+ clear: both;
46
+ }
47
+ }
48
+
49
+ @mixin media-query($device) {
50
+ @media screen and (max-width: $device) {
51
+ @content;
52
+ }
53
+ }
54
+
55
+ @mixin relative-font-size($ratio) {
56
+ font-size: $base-font-size * $ratio;
57
+ }
@@ -0,0 +1,6 @@
1
+ @charset "utf-8";
2
+
3
+ // Import partials.
4
+ @use "snakima/base";
5
+ @use "snakima/layout";
6
+ @use "snakima/syntax-highlighting";
data/assets/main.scss ADDED
@@ -0,0 +1,5 @@
1
+ ---
2
+ # Only the main Sass file needs front matter (the dashes are enough)
3
+ ---
4
+
5
+ @use "snakima";