summaryrefslogtreecommitdiffstats
path: root/assets/style.scss
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2020-12-24 15:05:32 +0100
committerVolpeon <git@volpeon.ink>2020-12-24 15:05:32 +0100
commit714d8f7ff8425e4177ff6bde4d214ef75be6b1ab (patch)
treebc343dd424b14bcadef61a80bfe7d423c139445c /assets/style.scss
parentImproved typography (diff)
downloadvolpeon.ink-714d8f7ff8425e4177ff6bde4d214ef75be6b1ab.tar.gz
volpeon.ink-714d8f7ff8425e4177ff6bde4d214ef75be6b1ab.tar.bz2
volpeon.ink-714d8f7ff8425e4177ff6bde4d214ef75be6b1ab.zip
Added header, improved SCSS structure, use metadata file instead of param, improved folder structure
Diffstat (limited to 'assets/style.scss')
-rw-r--r--assets/style.scss352
1 files changed, 0 insertions, 352 deletions
diff --git a/assets/style.scss b/assets/style.scss
deleted file mode 100644
index 40b18f5..0000000
--- a/assets/style.scss
+++ /dev/null
@@ -1,352 +0,0 @@
1$font-size: 18px;
2$heading-font-size: $font-size + 1;
3$code-block-font-size: $font-size - 1;
4$line-height: 1.5;
5
6$page-item-prefix-max-chars: 3ch;
7$page-item-prefix-pad: 2ch;
8$page-item-prefix-width: $page-item-prefix-max-chars + $page-item-prefix-pad;
9
10$subcontent-indent: 4ch;
11
12$breakpoint-sm: 700px;
13
14@function px-to-em($s, $b: $font-size) {
15 @return 1 / ($b / 1px) * ($s / 1px) * 1em;
16}
17
18@function str-repeat($s, $n) {
19 $r: "";
20 @while $n > 0 {
21 $r: $r + $s;
22 $n: $n - 1;
23 }
24 @return $r;
25}
26
27@font-face {
28 font-family: "Iosevka Term SS09";
29 font-style: normal;
30 font-weight: normal;
31 src: url("/iosevka-term-ss09-regular.woff2") format("woff2");
32}
33
34@font-face {
35 font-family: "Iosevka Term SS09";
36 font-style: normal;
37 font-weight: bold;
38 src: url("/iosevka-term-ss09-bold.woff2") format("woff2");
39}
40
41:root {
42 --gray1: hsl(270, 0%, 9.7%);
43 --gray2: hsl(270, 1%, 29%);
44 --gray3: hsl(270, 2%, 54%);
45 --gray4: hsl(270, 2%, 73%);
46 --gray5: hsl(270, 2%, 83%);
47 --gray6: hsl(270, 2%, 100%);
48
49 --bg: var(--gray1);
50 --bg-plus: var(--gray2);
51 --fg-minus: var(--gray3);
52 --fg: var(--gray4);
53 --fg-plus: var(--gray6);
54
55 --select-bg: hsla(270, 2%, 100%, 0.996);
56 --select-fg: var(--gray1);
57
58 --code-fg: var(--fg-minus);
59 --code-block-fg: var(--fg-minus);
60
61 --page-item-prefix-fg: var(--fg-minus);
62
63 --link-idle-fg: var(--gray6); //#90acf2; //var(--gray6);
64 --link-visited-fg: var(--gray5); //#bc9df2; //var(--gray5);
65 --link-hover-bg: var(--gray6);
66 --link-hover-fg: var(--gray1);
67
68 --heading: var(--fg-plus);
69}
70
71::selection {
72 color: var(--select-fg);
73 background-color: var(--select-bg);
74}
75
76html,
77pre,
78code {
79 font-family: "Iosevka Term SS09", "Lucida Console", "Courier New", Courier,
80 monospace;
81 font-feature-settings: "calt" 0, "dlig" 1;
82}
83
84html {
85 font-size: px-to-em($font-size, 16px);
86 line-height: $line-height;
87 background-color: var(--bg);
88 color: var(--fg);
89}
90
91body {
92 margin: 2em;
93 padding: 0;
94
95 @media (max-width: $breakpoint-sm) {
96 margin: 1em;
97 }
98}
99
100main {
101 max-width: 70ch;
102 margin: 0 auto;
103}
104
105code {
106 color: var(--code-fg);
107}
108
109pre {
110 margin: 0;
111 color: var(--code-block-fg);
112 font-size: $code-block-font-size;
113 line-height: 1.4;
114
115 strong {
116 font-weight: normal;
117 }
118}
119
120strong {
121 color: var(--fg-plus);
122 font-weight: bold;
123}
124
125ul,
126ol {
127 margin: ($line-height * 1rem) 0 0;
128 padding: 0;
129 list-style: none;
130
131 > li {
132 position: relative;
133 padding-left: $subcontent-indent;
134
135 &::before {
136 position: absolute;
137 display: inline-block;
138 width: $subcontent-indent;
139 margin-left: -1 * $subcontent-indent;
140 color: var(--fg-minus);
141 }
142 }
143}
144
145ul {
146 > li::before {
147 content: "-";
148 }
149
150 &.refs > li {
151 padding-left: 0;
152
153 &::before {
154 display: none;
155 }
156 }
157}
158
159ol {
160 counter-reset: cnt;
161
162 > li {
163 counter-increment: cnt;
164
165 &::before {
166 content: counter(cnt) ".";
167 }
168 }
169}
170
171h1,
172h2,
173h3 {
174 margin: ($line-height * 2rem) 0 0;
175
176 + h1,
177 + h2,
178 + h3 {
179 margin-top: $line-height * 1rem;
180 }
181}
182
183h1 {
184 text-transform: uppercase;
185 font-size: px-to-em($heading-font-size);
186 color: var(--heading);
187}
188
189h2 {
190 font-size: 1em;
191 color: var(--heading);
192}
193
194h3 {
195 font-size: 1em;
196}
197
198p {
199 margin: ($line-height * 1em) 0 0;
200}
201
202a {
203 position: relative;
204 z-index: 1000;
205 padding: 0.1em 0.3em;
206 margin: 0 -0.3em;
207 color: var(--link-idle-fg);
208
209 &:visited {
210 color: var(--link-visited-fg);
211 }
212
213 &:hover {
214 background-color: var(--link-hover-bg);
215 color: var(--link-hover-fg);
216 text-decoration: none;
217 }
218}
219
220hr {
221 height: 1px;
222 margin: ($line-height * 2rem) 0 ($line-height * 2rem);
223 background-color: var(--bg-plus);
224 border: 0;
225
226 @media (max-width: $breakpoint-sm) {
227 margin-left: 0;
228 }
229}
230
231blockquote {
232 position: relative;
233 margin: ($line-height * 1rem) 0 0;
234 padding-left: calc(#{$subcontent-indent} - 2px);
235 border-left: 2px solid var(--bg-plus);
236}
237
238.c-page-header {
239 margin-bottom: $line-height * 2rem;
240 overflow: hidden;
241
242 &::after {
243 position: relative;
244 z-index: -10;
245 content: str-repeat("░", 120);
246 display: block;
247 height: $line-height;
248 margin-top: px-to-em(2px);
249 padding-top: px-to-em(2px);
250 color: var(--fg-minus);
251 border-top: 1px solid var(--fg-minus);
252 }
253
254 &--sm {
255 display: none;
256 }
257
258 @media (max-width: $breakpoint-sm) {
259 display: none;
260
261 &--sm,
262 &--nohide {
263 display: block;
264 }
265 }
266}
267
268.s-page {
269 padding-left: $page-item-prefix-width;
270
271 h1,
272 h2,
273 h3,
274 ul.refs > li,
275 pre {
276 position: relative;
277 margin-left: -1 * $page-item-prefix-width;
278 padding-left: $page-item-prefix-width;
279
280 &::before {
281 position: absolute;
282 box-sizing: border-box;
283 display: inline-block;
284 margin-left: -1 * $page-item-prefix-width;
285 padding-right: $page-item-prefix-pad;
286 width: $page-item-prefix-width;
287 color: var(--page-item-prefix-fg);
288 font-size: 1rem;
289 font-weight: normal;
290 text-align: right;
291 }
292
293 @media (max-width: $breakpoint-sm) {
294 margin-left: 0;
295 padding-left: 0;
296
297 &::before {
298 display: none;
299 }
300 }
301 }
302
303 h1::before {
304 content: "#";
305 }
306
307 h2::before {
308 content: "##";
309 }
310
311 h3::before {
312 content: "###";
313 }
314
315 ul.refs > li::before {
316 content: "|>";
317 }
318
319 pre::before {
320 content: str-repeat("``\A", 40);
321 height: 100%;
322 color: var(--page-item-prefix-fg);
323 overflow: hidden;
324 line-height: 1.4 * ($code-block-font-size / $font-size)
325 }
326
327 hr {
328 margin-left: -1 * $page-item-prefix-width;
329 }
330
331 .c-page-header {
332 margin-left: -1 * $page-item-prefix-width;
333 padding-left: $page-item-prefix-width;
334
335 &::after {
336 margin-left: -1 * $page-item-prefix-width;
337 }
338
339 @media (max-width: $breakpoint-sm) {
340 margin-left: 0;
341 padding-left: 0;
342
343 &::after {
344 margin-left: 0;
345 }
346 }
347 }
348
349 @media (max-width: $breakpoint-sm) {
350 padding-left: 0;
351 }
352}