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
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
/* Colors and base sizes */
:root {
/* Standard widget theme. Should stand out from the page a little bit but not a lot. It's okay for
* some widgets to use a different theme, but they should be things that are supposed to stand
* out, like toast messages or submit buttons. */
--widget-background-color: ghostwhite;
--widget-border-color: lightgrey;
--widget-border-radius: 4px;
--widget-padding: 8px;
/* Form theme. */
--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;
--form-textarea-min-height: 20vh;
/* Link theme. */
--link-color: seagreen;
--link-color-hover: olivedrab;
--link-color-visited: olive;
/* Toast theme. */
--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;
/* Dialog theme. */
--dialog-width: 80%;
}
/* 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 */
h2, h3, h4, h5, h6, p, ul, ol, pre {
margin: 1rem 0;
}
/* Headings should get progressively smaller */
h1 {
/* Page level headings additionally get a bottom border and a bit of a margin underneath. */
border-bottom: 1px solid var(--widget-border-color);
font-size: 2rem;
margin: 2rem 0;
}
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(--widget-border-color);
border-radius: var(--widget-border-radius);
padding: var(--widget-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(--widget-background-color);
border: 1px solid var(--widget-border-color);
border-radius: var(--widget-border-radius);
box-sizing: border-box;
font-family: sans-serif;
font-size: 0.8rem;
padding: var(--widget-padding);
width: 100%;
}
form input::placeholder, form textarea::placeholder {
color: var(--form-placeholder-color);
}
form textarea {
min-height: var(--form-textarea-min-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: 2rem 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(--widget-background-color);
font-size: 0.75rem;
text-align: center;
border-top: 1px solid var(--widget-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;
margin: 0;
}
.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);
}
/* Tables */
table {
border-collapse: collapse;
margin: 1rem auto;
width: 90%;
}
caption {
caption-side: bottom;
font-size: 0.6rem;
font-style: italic;
padding: 0.5rem;
}
thead {
background: var(--widget-background-color);
}
td, th {
border: 1px solid var(--widget-border-color);
border-radius: var(--widget-border-radius);
padding: var(--widget-padding);
overflow: scroll;
text-align: center;
}
/* Code */
code {
background: ghostwhite;
border: 1px solid lightgrey;
font-size: 0.6rem;
padding: 4px;
}
/* Buttons */
button {
background: ghostwhite;
border: 1px solid lightgrey;
border-radius: 4px;
font-size: 0.8rem;
padding: 4px;
}
button:hover {
background: lightgrey;
}
button:active {
background: silver;
}
/* Section headers (with buttons in them) */
section > header {
align-items: center;
gap: var(--widget-padding);
display: flex;
margin: 1rem 0;
}
section > header > h2,
section > header > h3,
section > header > h4,
section > header > h5,
section > header > h6,
section > header > button {
flex: 0 0 auto;
margin: 0;
}
/* Dialogs */
dialog {
border: 1px solid var(--widget-border-color);
border-radius: var(--widget-border-radius);
width: var(--dialog-width);
}
dialog > h2 {
border-bottom: 1px solid var(--widget-border-color);
margin-top: 0;
}