theme.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
/* Colors and base sizes */
:root {
/* The maximum height of block elements that would be of unbounded height otherwise */
--block-element-max-height: 20vh;
/* Forms */
--form-border-color: lightgrey;
--form-border-radius: 4px;
--form-input-background-color: ghostwhite;
--form-padding: 8px;
--form-optional-color: darkblue;
--form-placeholder-color: grey;
--form-required-color: darkred;
--form-submit-button-background-color: darkgreen;
--form-submit-button-hover-background-color: green;
--form-submit-button-color: white;
/* Links */
--link-color: seagreen;
--link-color-hover: olivedrab;
--link-color-visited: olive;
/* Site footer */
--site-footer-background-color: ghostwhite;
--site-footer-border-color: lightgrey;
/* Toasts */
--toast-error-background-color: lightcoral;
--toast-error-border-color: crimson;
--toast-warning-background-color: palegoldenrod;
--toast-warning-border-color: gold;
--toast-message-background-color: lightblue;
--toast-message-border-color: dodgerblue;
}
/* Fonts */
/*! Generated by Font Squirrel (https://www.fontsquirrel.com) on September 2, 2024 */
@font-face {
font-family: 'CMU Serif Roman';
src:
url('/static/fonts/cmu/cmunrm-webfont.woff2') format('woff2'),
url('/static/fonts/cmu/cmunrm-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
/* Resets */
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, pre {
margin: 0;
padding: 0;
}
html {
font-family: 'CMU Serif Roman';
line-height: 1.5;
}
input[type="button"], input[type="submit"], button {
background: none;
border: none;
cursor: pointer;
padding: 0;
}
/* High-level site layout - header, main, and footer
*
* Keep the header and footer static, and let the content fill the rest of the space so we are
* always at least 1 browser window high
*/
body {
display: flex;
flex-direction: column;
min-height: 100vh;
}
body > header {
flex: 0 0 auto;
}
body > main {
flex: 1;
}
body > footer {
flex: 0 0 auto;
}
/* Give the main content area some padding so that on small screens the text doesn't run up against
* the edge of the browser window */
main {
box-sizing: border-box;
padding: 0 1rem;
}
/* Add margins to the main content area past a certain screen size (over 1024px is typical for
* desktop) */
main {
width: 100%;
margin: 0 auto;
}
@media screen and (min-width: 1025px) {
main {
width: 1024px;
}
}
/* Good baseline for block element vertical margins */
h1, h2, h3, h4, h5, h6, p, ul, ol, pre {
margin: 1rem 0;
}
/* Headings should get progressively smaller */
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.5rem;
}
h3 {
font-size: 1.25rem;
}
h4 {
font-size: 1rem;
}
h5 {
font-size: 0.9rem;
}
h6 {
font-size: 0.8rem;
}
/* List items should be indented a little bit so the bullets don't stick out awkwardly */
li {
margin-left: 2rem;
}
/* Paragraphs should be justified and hyphenated to prevent ragged right edges */
p {
hyphens: auto;
text-align: justify;
}
/* Links get custom colors, but for a11y we keep the extra decoration and normal/hover/visited
* states distinct */
a {
color: var(--link-color);
transition: color 0.3s ease;
}
a:hover {
color: var(--link-color-hover);
}
a:visited {
color: var(--link-color-visited);
}
/* Forms */
form {
border: 2px solid var(--form-border-color);
border-radius: var(--form-border-radius);
padding: var(--form-padding);
}
form div {
justify-content: center;
column-gap: 1rem;
row-gap: 1rem;
margin: 1rem 0;
}
form label, form input, form textarea {
display: block;
}
form label {
/* Don't line break between the actual label text and the "(Required)" or "(Optional)"
* indicators */
white-space: nowrap;
}
form input, form textarea {
background-color: var(--form-input-background-color);
border: 1px solid var(--form-border-color);
border-radius: var(--form-border-radius);
box-sizing: border-box;
font-family: sans-serif;
font-size: 0.8rem;
padding: var(--form-padding);
width: 100%;
}
form input::placeholder, form textarea::placeholder {
color: var(--form-placeholder-color);
}
form textarea {
/* Not a typo: "block element max height" is the maximum height a block
* element can be in a typical page. We just want our textarea to start at that size because it's
* a comfy size for a big block of text. We set `min-height` specifically because the user can
* resize textareas, and we don't want to stop them from doing that. */
min-height: var(--block-element-max-height);
resize: vertical;
}
form input[type="submit"] {
background-color: var(--form-submit-button-background-color);
color: var(--form-submit-button-color);
font-size: 1.1rem;
margin: 0 auto;
padding: 16px;
transition: background-color 0.5s;
width: 50%;
}
form input[type="submit"]:hover {
background-color: var(--form-submit-button-hover-background-color);
}
/* Site header */
body > header {
box-sizing: border-box;
margin: 4rem 0;
padding: 0 1rem;
}
body > header > div {
padding-bottom: 0.5rem;
text-align: center;
}
body > header > div > a {
font-size: 2rem;
font-variant: small-caps;
font-weight: bold;
}
body > header > div > a:visited {
color: var(--link-color);
}
body > header > div > a:hover {
color: var(--link-color-hover);
}
/* Site footer */
body > footer {
background: var(--site-footer-background-color);
font-size: 0.75rem;
text-align: center;
border-top: 1px solid var(--site-footer-border-color);
margin-top: 4rem;
padding: 0.5rem;
}
body > footer p {
margin: 0.5rem auto;
width: 100%;
text-align: center;
}
body > footer hr {
color: ghostwhite;
width: 3rem;
}
@media screen and (min-width: 481px) {
body > footer p {
width: 480px;
}
}
/* Sticky bar */
#sticky {
background: ghostwhite;
border: 1px solid lightgrey;
border-radius: 4px;
font-family: sans-serif;
position: absolute;
top: 0;
right: 0;
margin: 8px;
}
@media screen and (min-width: 1025px) {
#sticky {
position: fixed;
}
}
#sticky ul {
display: flex;
list-style: none;
margin: 0;
}
#sticky li {
border-left: 1px solid lightgrey;
flex: 0 0 auto;
margin: 0;
padding: 8px;
}
#sticky li:first-child {
border-left: none;
}
#sticky a {
text-decoration: none;
}
#sticky a:visited {
color: var(--link-color);
}
#sticky a:hover {
color: var(--link-color-hover);
}
/* Tag lists */
.tags {
display: flex;
list-style: none;
}
.inline-tags {
display: inline-flex;
list-style: none;
}
.tags li,
.inline-tags li {
background: ghostwhite;
border: 1px solid lightgrey;
flex: 0 0 auto;
font-family: monospace;
font-size: 0.6rem;
margin-left: 8px;
padding: 4px;
}
.tags li:first-child,
.inline-tags li:first-child {
margin-left: 0;
}
.tags a:visited,
.inline-tags a:visited {
color: var(--link-color);
}
.tags a:hover,
.inline-tags a:hover {
color: var(--link-color-hover);
}
/* Toasts */
.toast {
border-radius: 4px;
font-family: sans-serif;
padding: 1rem;
}
.toast-error {
background: var(--toast-error-background-color);
border: 1px solid var(--toast-error-border-color);
}
.toast-warning {
background: var(--toast-warning-background-color);
border: 1px solid var(--toast-warning-border-color);
}
.toast-message {
background: var(--toast-message-background-color);
border: 1px solid var(--toast-message-border-color);
}