Files: 0a3d44672bce14a00d9a73083ce8ed33675ec114 / themes / ran / static / style / ran.css
7982 bytesRaw
1 | @import url("fonts/fonts.css"); |
2 | /* See fonts/LICENSE.md */ |
3 | |
4 | |
5 | /* Base */ |
6 | |
7 | :root { |
8 | --primary-color: #60c030; |
9 | --secondary-color: #ffffff; |
10 | --hue: 100; |
11 | --saturated: 100%; |
12 | --unsaturated: 20%; |
13 | --background-color: hsl(var(--hue), var(--saturated), 98%); |
14 | --foreground-color: hsl(var(--hue), var(--unsaturated), 10%); |
15 | --foreground-dim-color: hsla(var(--hue), var(--unsaturated), 10%, 70%); |
16 | --link-color: hsl(var(--hue), var(--saturated), 20%); |
17 | --link-dim-color: hsla(var(--hue), var(--saturated), 20%, 50%); |
18 | --separator-color: hsla(var(--hue), var(--unsaturated), 20%, 50%); |
19 | --box-shadow-style: inset 0 -1px 0; |
20 | --fast: 0.2s; |
21 | --slow: 0.4s; |
22 | } |
23 | |
24 | *, *::before, *::after { |
25 | max-width: 100%; |
26 | transition: all var(--fast); |
27 | } |
28 | |
29 | |
30 | /* Typography */ |
31 | |
32 | html { |
33 | /* 1rem works out at 20px. */ |
34 | font-size: 1.25em; |
35 | } |
36 | |
37 | body { |
38 | background-color: var(--background-color); |
39 | color: var(--foreground-color); |
40 | font-family: "HK Grotesk", sans-serif; |
41 | font-variant-ligatures: no-common-ligatures; |
42 | font-weight: 300; |
43 | line-height: 1.5rem; |
44 | } |
45 | |
46 | code, kbd, samp { |
47 | font-family: "Fira Mono", monospace; |
48 | /* Better match surrounding HK Grotesk. */ |
49 | font-size: 0.9rem; |
50 | } |
51 | |
52 | |
53 | /* Layout */ |
54 | |
55 | html, body { |
56 | margin: 0; |
57 | padding: 0; |
58 | } |
59 | |
60 | body { |
61 | display: grid; |
62 | grid-template-columns: 1rem 1fr minmax(1rem, 40rem) 1fr 1rem; |
63 | } |
64 | |
65 | body > * { |
66 | grid-column: 3/4; |
67 | } |
68 | |
69 | .visuallyhidden { |
70 | position: absolute ; |
71 | top: -9999em ; |
72 | left: -9999em ; |
73 | } |
74 | |
75 | |
76 | /* Top and bottom navigation, article footer */ |
77 | |
78 | .topnav { |
79 | margin-top: 10vh; |
80 | margin-bottom: 1rem; |
81 | } |
82 | |
83 | footer { |
84 | border-top: 1px solid var(--separator-color); |
85 | margin-top: -1px; |
86 | margin-bottom: 1rem; |
87 | } |
88 | |
89 | .bottomnav { |
90 | border-top: 1px solid var(--separator-color); |
91 | margin-top: -1px; |
92 | margin-bottom: 10vh; |
93 | } |
94 | |
95 | |
96 | /* Logo */ |
97 | |
98 | .logo { |
99 | display: block; |
100 | position: relative; |
101 | height: 4rem; |
102 | width: 4rem; |
103 | margin-bottom: -0.5rem; |
104 | margin-left: auto; |
105 | margin-right: auto; |
106 | padding-bottom: 0.5rem; |
107 | } |
108 | |
109 | .logo circle { |
110 | fill: var(--primary-color); |
111 | stroke-width: 0; |
112 | } |
113 | |
114 | .logo path { |
115 | fill: var(--secondary-color); |
116 | } |
117 | |
118 | .bottomnav .logo { |
119 | margin-top: 2rem; |
120 | } |
121 | .bottomnav .logo circle { |
122 | fill: transparent; |
123 | stroke: var(--foreground-dim-color); |
124 | stroke-width: 12px; |
125 | } |
126 | |
127 | .bottomnav .logo path { |
128 | fill: var(--foreground-dim-color); |
129 | } |
130 | |
131 | .bottomnav a .logo circle { |
132 | stroke: var(--link-color); |
133 | } |
134 | |
135 | .bottomnav a .logo path { |
136 | fill: var(--link-color); |
137 | } |
138 | |
139 | |
140 | .logo span { |
141 | display: block; |
142 | position: absolute; |
143 | top: 0; |
144 | left: 5rem; |
145 | line-height: 4rem; |
146 | opacity: 0; |
147 | transition-property: opacity; |
148 | } |
149 | |
150 | .logo:focus span, |
151 | .logo:hover span { |
152 | height: auto; |
153 | width: auto; |
154 | opacity: 1; |
155 | } |
156 | |
157 | |
158 | /* Nearby pages */ |
159 | |
160 | nav.nearby { |
161 | display: block; |
162 | margin-top: 1rem; |
163 | } |
164 | |
165 | nav.nearby ul, |
166 | nav.nearby li { |
167 | display: inline; |
168 | margin: 0; |
169 | padding: 0; |
170 | } |
171 | |
172 | nav.nearby li { |
173 | grid-row: 1/2; |
174 | } |
175 | |
176 | nav.nearby li.up { |
177 | grid-column: 2/3; |
178 | } |
179 | |
180 | nav.nearby li.next { |
181 | grid-column: 3/4; |
182 | } |
183 | |
184 | nav.nearby li.prev { |
185 | grid-column: 1/2; |
186 | } |
187 | |
188 | nav.nearby a { |
189 | display: block; |
190 | margin-top: 1rem; |
191 | margin-right: 1rem; |
192 | } |
193 | |
194 | nav.nearby a span { |
195 | display: inline-block; |
196 | width: 1rem; |
197 | margin-right: 1rem; |
198 | } |
199 | |
200 | nav.nearby a[rel="up"] span { |
201 | content: "↑ "; |
202 | } |
203 | |
204 | nav.nearby a[rel="next"] span { |
205 | content: "→ "; |
206 | } |
207 | |
208 | nav.nearby a[rel="prev"] span { |
209 | content: "← "; |
210 | } |
211 | |
212 | @media (min-width: 42rem) { |
213 | nav.nearby ul { |
214 | display: grid; |
215 | grid-template-columns: 1fr 1fr 1fr; |
216 | margin-right:0; |
217 | } |
218 | |
219 | nav.nearby a { |
220 | margin-top: 0; |
221 | margin-right: 0; |
222 | text-align: center; |
223 | } |
224 | |
225 | nav.nearby a span { |
226 | width: 100%; |
227 | } |
228 | |
229 | nav.nearby a[rel="up"] { |
230 | text-align: center; |
231 | } |
232 | |
233 | nav.nearby a[rel="next"] { |
234 | text-align: right; |
235 | } |
236 | |
237 | nav.nearby a[rel="prev"] { |
238 | text-align: left; |
239 | } |
240 | } |
241 | |
242 | |
243 | /* Page heading */ |
244 | |
245 | header { |
246 | margin-bottom: 1rem; |
247 | } |
248 | |
249 | .pagetitle { |
250 | margin-top: 0; |
251 | margin-bottom: 0; |
252 | padding-top: 1rem; |
253 | padding-bottom: 1rem; |
254 | font-size: 2rem; |
255 | line-height: 2rem; |
256 | text-align: center; |
257 | } |
258 | |
259 | summary { |
260 | display: block; |
261 | box-shadow: var(--box-shadow-style) transparent; |
262 | cursor: pointer; |
263 | } |
264 | |
265 | summary:focus, |
266 | summary:hover { |
267 | outline: 0; |
268 | box-shadow: var(--box-shadow-style) currentColor; |
269 | } |
270 | |
271 | summary::before { |
272 | content: "⋮"; |
273 | line-height: 2rem; |
274 | width: 1rem; |
275 | padding-top: 1rem; |
276 | padding-left: 1rem; |
277 | float: right; |
278 | text-align: center; |
279 | } |
280 | |
281 | details[open] summary::before { |
282 | content: "×"; |
283 | } |
284 | |
285 | summary::-webkit-details-marker { |
286 | display: none; |
287 | } |
288 | |
289 | summary h1::before { |
290 | /* Keep the summary centred. */ |
291 | content: " "; |
292 | height: 2rem; |
293 | width: 1rem; |
294 | padding-right: 1rem; |
295 | float: left; |
296 | } |
297 | |
298 | details > section { |
299 | border-bottom: 1px solid var(--separator-color); |
300 | margin-top: 1rem; |
301 | padding-bottom: calc(1rem - 1px); |
302 | } |
303 | |
304 | details > section > * { |
305 | display: inline-block; |
306 | margin-top: 0; |
307 | margin-bottom: 0; |
308 | margin-right: 1rem; |
309 | opacity: 0; |
310 | transition: opacity var(--slow); |
311 | } |
312 | |
313 | details[open] > section > * { |
314 | opacity: 1; |
315 | } |
316 | |
317 | header .image { |
318 | /* The height is overridden by inline styles for some articles. */ |
319 | height: 4rem; |
320 | background-position: center; |
321 | background-size: cover; |
322 | opacity: 0.5; |
323 | } |
324 | |
325 | |
326 | /* Lists of links */ |
327 | |
328 | footer .smalllinks { |
329 | margin-top: 1rem; |
330 | margin-bottom: 1rem; |
331 | } |
332 | |
333 | .smalllinks ul { |
334 | display: inline; |
335 | padding-left: 0; |
336 | } |
337 | |
338 | .smalllinks li { |
339 | display: inline; |
340 | } |
341 | |
342 | .smalllinks h2, |
343 | .smalllinks a { |
344 | display: inline-block; |
345 | margin-top: 0; |
346 | margin-bottom: 0; |
347 | margin-right: 1rem; |
348 | } |
349 | |
350 | .biglinks { |
351 | margin-top: 1rem; |
352 | margin-bottom: 1rem; |
353 | padding-left: 0; |
354 | list-style-type: none; |
355 | } |
356 | |
357 | .biglinks li { |
358 | margin-top: 1rem; |
359 | color: var(--foreground-dim-color); |
360 | } |
361 | |
362 | .biglinks li a { |
363 | display: block; |
364 | } |
365 | |
366 | .biglinks li a > * { |
367 | display: inline-block; |
368 | margin-right: 1rem; |
369 | } |
370 | |
371 | .biglinks li strong { |
372 | display: inline-block; |
373 | margin-top: 0; |
374 | margin-bottom: 0; |
375 | font-weight: 600; |
376 | } |
377 | |
378 | .biglinks li a strong ~ * { |
379 | color: var(--foreground-dim-color); |
380 | } |
381 | |
382 | .biglinks li a:focus strong ~ *, |
383 | .biglinks li a:hover strong ~ * { |
384 | color: var(--link-color); |
385 | } |
386 | |
387 | |
388 | /* Headings */ |
389 | |
390 | h1, h2, h3, h4, h5, h6 { |
391 | margin-top: 0; |
392 | margin-bottom: 0; |
393 | font-size: 1rem; |
394 | font-weight: 300; |
395 | line-height: 2rem; |
396 | } |
397 | article > main h1, |
398 | article > main h2, |
399 | article > main h3, |
400 | article > main h4, |
401 | article > main h5, |
402 | article > main h6 { |
403 | margin-top: 2rem; |
404 | margin-bottom: 1rem; |
405 | } |
406 | |
407 | article > main section h1, |
408 | article > main h4 { |
409 | font-size: 1.7rem; |
410 | } |
411 | |
412 | article > main section section h1, |
413 | article > main h5 { |
414 | font-size: 1.4rem; |
415 | } |
416 | |
417 | article > main section section section h1, |
418 | article > main h6 { |
419 | font-size: 1.1rem; |
420 | } |
421 | |
422 | |
423 | /* Common structures */ |
424 | |
425 | a { |
426 | text-decoration: none; |
427 | } |
428 | :link, :visited { |
429 | color: var(--link-color); |
430 | font-weight: 400; |
431 | opacity: 0.8; |
432 | box-shadow: var(--box-shadow-style) transparent; |
433 | } |
434 | |
435 | :link:focus, |
436 | :link:hover, |
437 | :visited:focus, |
438 | :visited:hover { |
439 | opacity: 1; |
440 | filter: none; |
441 | box-shadow: var(--box-shadow-style) currentColor; |
442 | outline: 0; |
443 | } |
444 | address :link, |
445 | address :visited, |
446 | p :link, |
447 | p :visited { |
448 | box-shadow: var(--box-shadow-style) var(--link-dim-color); |
449 | } |
450 | |
451 | address { |
452 | font-style: inherit; |
453 | } |
454 | |
455 | aside { |
456 | font-style: italic; |
457 | } |
458 | |
459 | blockquote { |
460 | margin-left: 2rem; |
461 | margin-right: 2rem; |
462 | } |
463 | |
464 | figure { |
465 | margin-left: 0rem; |
466 | margin-right: 0rem; |
467 | } |
468 | |
469 | figure + figure { |
470 | border-top: 1px solid var(--separator-color); |
471 | margin-top: -1px; |
472 | } |
473 | |
474 | figcaption { |
475 | margin-left: 2rem; |
476 | margin-right: 2rem; |
477 | } |
478 | |
479 | figcaption > * { |
480 | display: inline-block; |
481 | margin-right: 1rem; |
482 | } |
483 | |
484 | hr { |
485 | height: 0; |
486 | border: 0; |
487 | border-top: 1px solid var(--separator-color); |
488 | margin-top: calc(1rem - 1px); |
489 | margin-bottom: 1rem; |
490 | padding: 0; |
491 | } |
492 | |
493 | img, object { |
494 | display: inline-block; |
495 | margin-left: auto; |
496 | margin-right: auto; |
497 | text-align: center; |
498 | } |
499 | |
500 | .inset { |
501 | max-width: 50%; |
502 | float: right; |
503 | margin-left: 1rem; |
504 | } |
505 | |
506 | ol, ul { |
507 | margin-left: 0; |
508 | padding-left: 1rem; |
509 | } |
510 | |
511 | p { |
512 | margin-top: 1rem; |
513 | margin-bottom: 1rem; |
514 | } |
515 | |
516 | pre { |
517 | line-height: 1rem; |
518 | } |
519 | |
520 | small { |
521 | font-size: 1rem; |
522 | } |
523 | |
524 | strong { |
525 | /* Without this, the weight increases from 300 to 400, |
526 | which isn't distinct enough. */ |
527 | font-weight: 600; |
528 | } |
529 | |
530 | |
531 |
Built with git-ssb-web