hotdocs 0.4.0 → 0.7.0

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.
@@ -1,857 +1,1108 @@
1
- /* CSS: UNRESET */
1
+ @layer reset, hotdocs;
2
+ @import url("reset.css") layer(reset);
3
+
4
+ @layer hotdocs {
5
+ /* CSS: GLOBAL */
6
+
7
+ :root {
8
+ --background-color: white;
9
+ --code-background-color: #f6f6f6;
10
+ --code-border-color: #00000022;
11
+ --column-border-color: #dadada;
12
+ --content-padding-bottom: 2rem;
13
+ --link-active-color: black;
14
+ --link-color: #707070;
15
+ --nav-height: 3.75rem;
16
+ --text-color: #1c1e21;
17
+ color-scheme: light;
18
+ }
2
19
 
3
- .article * {
4
- all: revert-layer; /* With revert svg path is unset */
5
- }
20
+ @media (prefers-color-scheme: dark) {
21
+ :root {
22
+ --background-color: #1b1b1d;
23
+ --code-background-color: #2b2b2b;
24
+ --code-border-color: #ffffff22;
25
+ --column-border-color: #535353;
26
+ --link-active-color: white;
27
+ --link-color: #909090;
28
+ --text-color: #e3e1de;
29
+ color-scheme: dark;
30
+ }
31
+ }
6
32
 
7
- .article {
8
- .anchor-link {
9
- margin-left: 0.5ch;
10
- opacity: 0;
11
- text-decoration: none;
12
- transition-duration: 0.2s;
13
- transition-property: opacity;
14
- transition-timing-function: ease-in-out;
33
+ :root:has(#scheme-light:checked) {
34
+ --background-color: white;
35
+ --code-background-color: #f6f6f6;
36
+ --code-border-color: #00000022;
37
+ --column-border-color: #dadada;
38
+ --content-padding-bottom: 2rem;
39
+ --link-active-color: black;
40
+ --link-color: #707070;
41
+ --nav-height: 3.75rem;
42
+ --text-color: #1c1e21;
43
+ color-scheme: light;
44
+ }
15
45
 
16
- &:hover {
17
- text-decoration: underline;
18
- }
46
+ :root:has(#scheme-dark:checked) {
47
+ --background-color: #1b1b1d;
48
+ --code-background-color: #2b2b2b;
49
+ --code-border-color: #ffffff22;
50
+ --column-border-color: #535353;
51
+ --link-active-color: white;
52
+ --link-color: #909090;
53
+ --text-color: #e3e1de;
54
+ color-scheme: dark;
19
55
  }
20
56
 
21
- h1:hover .anchor-link,
22
- h2:hover .anchor-link,
23
- h3:hover .anchor-link,
24
- h4:hover .anchor-link,
25
- h5:hover .anchor-link,
26
- h6:hover .anchor-link {
27
- opacity: 1;
57
+ html {
58
+ -webkit-font-smoothing: antialiased;
59
+ background-color: var(--background-color);
60
+ color: var(--text-color);
61
+ scroll-padding-top: calc(var(--nav-height) + 0.2rem);
62
+ text-rendering: optimizelegibility;
28
63
  }
29
- }
30
64
 
31
- /* CSS: GLOBAL */
65
+ /* Sticky footer */
32
66
 
33
- :root {
34
- --background-color: white;
35
- --column-border-color: #dadada;
36
- --content-padding-bottom: 2rem;
37
- --link-active-color: black;
38
- --link-color: #707070;
39
- --nav-height: 3.75rem;
40
- --text-color: #1c1e21;
41
- }
67
+ html, body {
68
+ min-height: 100vh;
69
+ }
42
70
 
43
- [data-theme=dark]:root {
44
- --background-color: #1b1b1d;
45
- --column-border-color: #535353;
46
- --link-active-color: white;
47
- --link-color: #909090;
48
- --text-color: #e3e1de;
49
- }
71
+ body {
72
+ display: flex;
73
+ flex-direction: column;
74
+ }
50
75
 
51
- html {
52
- -webkit-font-smoothing: antialiased;
53
- background-color: var(--background-color);
54
- color: var(--text-color);
55
- scroll-padding-top: calc(var(--nav-height) + 0.2rem);
56
- text-rendering: optimizelegibility;
57
- }
76
+ /* CSS: NAV */
77
+
78
+ :root {
79
+ --nav-background-color: white;
80
+ --nav-link-active-color: var(--link-active-color);
81
+ --nav-link-color: var(--link-color);
82
+ --nav-padding-horizontal: 1.5rem;
83
+ --nav-padding-vertical: 0.5rem;
84
+ --nav-shadow: 0 1px 2px 0 #0000001a;
85
+ --nav-scheme-icon-fill: var(--link-color);
86
+ --nav-title-color: #1c1e21;
87
+ --nav-toggle-color: rgb(28, 30, 33);
88
+ --sidenav-padding-horizontal: 0.75rem;
89
+ }
58
90
 
59
- /* Sticky footer */
91
+ @media (prefers-color-scheme: dark) {
92
+ :root {
93
+ --nav-background-color: #242526;
94
+ --nav-title-color: #e3e1de;
95
+ --nav-toggle-color: rgb(227, 225, 222);
96
+ }
97
+ }
60
98
 
61
- html, body {
62
- min-height: 100vh;
63
- }
99
+ :root:has(#scheme-light:checked) {
100
+ --nav-background-color: white;
101
+ --nav-padding-horizontal: 1.5rem;
102
+ --nav-padding-vertical: 0.5rem;
103
+ --nav-shadow: 0 1px 2px 0 #0000001a;
104
+ --nav-title-color: #1c1e21;
105
+ --nav-toggle-color: rgb(28, 30, 33);
106
+ --sidenav-padding-horizontal: 0.75rem;
107
+ }
64
108
 
65
- body {
66
- display: flex;
67
- flex-direction: column;
68
- }
109
+ :root:has(#scheme-dark:checked) {
110
+ --nav-background-color: #242526;
111
+ --nav-title-color: #e3e1de;
112
+ --nav-toggle-color: rgb(227, 225, 222);
113
+ }
69
114
 
70
- /* CSS: NAV */
71
-
72
- :root {
73
- --nav-background-color: white;
74
- --nav-link-active-color: var(--link-active-color);
75
- --nav-link-color: var(--link-color);
76
- --nav-padding-horizontal: 1.5rem;
77
- --nav-padding-vertical: 0.5rem;
78
- --nav-shadow: 0 1px 2px 0 #0000001a;
79
- --nav-title-color: #1c1e21;
80
- --nav-toggle-color: rgb(28, 30, 33);
81
- --sidenav-padding-horizontal: 0.75rem;
82
- }
115
+ /* Added to <body> */
116
+ .sidenav--open {
117
+ overflow: hidden;
118
+ }
83
119
 
84
- [data-theme=dark]:root {
85
- --nav-background-color: #242526;
86
- --nav-link-active-color: var(--link-active-color);
87
- --nav-link-color: var(--link-color);
88
- --nav-title-color: #e3e1de;
89
- --nav-toggle-color: rgb(227, 225, 222);
90
- }
120
+ .nav {
121
+ align-items: center;
122
+ background-color: var(--nav-background-color);
123
+ box-shadow: var(--nav-shadow);
124
+ display: flex;
125
+ flex: 0 0 auto;
126
+ height: var(--nav-height);
127
+ justify-content: space-between;
128
+ padding: var(--nav-padding-vertical) var(--nav-padding-horizontal);
129
+ position: sticky;
130
+ top: 0;
131
+ z-index: 100;
132
+ }
91
133
 
92
- /* Added to <body> */
93
- .sidenav--open {
94
- overflow: hidden;
95
- }
134
+ .nav__section {
135
+ align-items: center;
136
+ display: flex;
137
+ gap: 1.5rem;
138
+ }
96
139
 
97
- .nav {
98
- align-items: center;
99
- background-color: var(--nav-background-color);
100
- box-shadow: var(--nav-shadow);
101
- display: flex;
102
- flex: 0 0 auto;
103
- height: var(--nav-height);
104
- justify-content: space-between;
105
- padding: var(--nav-padding-vertical) var(--nav-padding-horizontal);
106
- position: sticky;
107
- top: 0;
108
- z-index: 10;
109
- }
140
+ .nav__links {
141
+ display: none;
110
142
 
111
- .nav__section {
112
- align-items: center;
113
- display: flex;
114
- gap: 1.5rem;
115
- }
143
+ @media (min-width: 64rem) {
144
+ align-items: center;
145
+ display: flex;
146
+ gap: 1.5rem;
147
+ }
148
+ }
116
149
 
117
- .nav__links {
118
- display: none;
150
+ .nav__link {
151
+ color: var(--nav-link-color);
152
+
153
+ &.active {
154
+ color: var(--nav-link-active-color);
155
+ }
156
+
157
+ &:hover {
158
+ color: var(--nav-link-active-color);
159
+ }
160
+ }
119
161
 
120
- @media (min-width: 64rem) {
162
+ .nav__brand {
121
163
  align-items: center;
122
164
  display: flex;
123
- gap: 1.5rem;
165
+ gap: 0.5rem;
124
166
  }
125
- }
126
167
 
127
- .nav__link {
128
- color: var(--nav-link-color);
168
+ .nav__logo-wrapper {
169
+ height: 2rem;
170
+ width: 2rem;
171
+ }
129
172
 
130
- &.active {
131
- color: var(--nav-link-active-color);
173
+ .nav__logo {
174
+ height: 100%;
175
+ width: 100%;
132
176
  }
133
177
 
134
- &:hover {
135
- color: var(--nav-link-active-color);
178
+ .nav__title {
179
+ color: var(--nav-title-color);
180
+ font-size: 1.5rem;
181
+ font-weight: 500;
136
182
  }
137
- }
138
183
 
139
- .nav__brand {
140
- align-items: center;
141
- display: flex;
142
- gap: 0.5rem;
143
- }
184
+ .nav__toggle {
185
+ color: var(--nav-toggle-color);
186
+ height: 1.5rem;
187
+ width: 1.5rem;
144
188
 
145
- .nav__logo-wrapper {
146
- height: 2rem;
147
- width: 2rem;
148
- }
149
-
150
- .nav__logo {
151
- height: 100%;
152
- width: 100%;
153
- }
189
+ @media (min-width: 64rem) {
190
+ display: none;
191
+ }
192
+ }
154
193
 
155
- .nav__title {
156
- color: var(--nav-title-color);
157
- font-weight: bold;
158
- }
194
+ .scheme {
195
+ display: flex;
196
+ height: 1.3rem;
197
+ position: relative;
198
+ width: 1.3rem;
199
+ }
159
200
 
160
- .nav__toggle {
161
- color: var(--nav-toggle-color);
162
- height: 1.5rem;
163
- width: 1.5rem;
201
+ .scheme__input {
202
+ -moz-appearance:none;
203
+ -webkit-appearance:none;
204
+ appearance:none;
205
+ background-color: var(--nav-background-color);
206
+ bottom: 0;
207
+ left: 0;
208
+ position: absolute;
209
+ right: 0;
210
+ top: 0;
211
+ }
164
212
 
165
- @media (min-width: 64rem) {
213
+ .scheme__icon {
214
+ bottom: 0;
215
+ cursor: pointer;
166
216
  display: none;
217
+ fill: var(--nav-scheme-icon-fill);
218
+ left: 0;
219
+ position: absolute;
220
+ right: 0;
221
+ top: 0;
222
+ z-index: 10;
167
223
  }
168
- }
169
224
 
170
- .sidenav-backdrop {
171
- background-color: rgba(0, 0, 0, .6);
172
- inset: 0;
173
- opacity: 0;
174
- position: fixed;
175
- transition-duration: 0.2s;
176
- transition-property: visibility, opacity;
177
- transition-timing-function: ease-in-out;
178
- visibility: hidden;
179
- }
225
+ #scheme-light:checked ~ .scheme__icon--light {
226
+ display: initial;
227
+ }
180
228
 
181
- .sidenav--open .sidenav-backdrop {
182
- opacity: 1;
183
- visibility: visible;
184
- }
229
+ #scheme-dark:checked ~ .scheme__icon--dark {
230
+ display: initial;
231
+ }
185
232
 
186
- .sidenav {
187
- background-color: var(--nav-background-color);
188
- bottom: 0;
189
- left: 0;
190
- opacity: 0;
191
- overflow-x: hidden;
192
- position: fixed;
193
- top: 0;
194
- transform: translate(-100%);
195
- transition-duration: 0.2s;
196
- transition-property: transform, visibility, opacity;
197
- transition-timing-function: ease-in-out;
198
- visibility: hidden;
199
- width: 85vw;
200
- }
233
+ #scheme-auto:checked ~ .scheme__icon--auto {
234
+ display: initial;
235
+ }
201
236
 
202
- .sidenav--open .sidenav {
203
- opacity: 1;
204
- transform: translate(0, 0);
205
- visibility: visible;
206
- }
237
+ .sidenav-backdrop {
238
+ background-color: rgba(0, 0, 0, .6);
239
+ inset: 0;
240
+ opacity: 0;
241
+ position: fixed;
242
+ transition-duration: 0.2s;
243
+ transition-property: visibility, opacity;
244
+ transition-timing-function: ease-in-out;
245
+ visibility: hidden;
246
+ }
207
247
 
208
- .sidenav__header {
209
- align-items: center;
210
- background-color: var(--nav-background-color);
211
- box-shadow: var(--nav-shadow);
212
- display: flex;
213
- height: var(--nav-height);
214
- justify-content: space-between;
215
- padding: var(--nav-padding-vertical) var(--nav-padding-horizontal);
216
- position: sticky;
217
- top: 0;
218
- z-index: 10;
219
- }
248
+ .sidenav--open .sidenav-backdrop {
249
+ opacity: 1;
250
+ visibility: visible;
251
+ }
220
252
 
221
- .sidenav__toggle {
222
- color: var(--nav-toggle-color);
223
- height: 1rem;
224
- width: 1rem;
225
- }
253
+ .sidenav {
254
+ background-color: var(--nav-background-color);
255
+ bottom: 0;
256
+ left: 0;
257
+ opacity: 0;
258
+ overflow-x: hidden;
259
+ position: fixed;
260
+ top: 0;
261
+ transform: translate(-100%);
262
+ transition-duration: 0.2s;
263
+ transition-property: transform, visibility, opacity;
264
+ transition-timing-function: ease-in-out;
265
+ visibility: hidden;
266
+ width: 85vw;
267
+ z-index: 100;
268
+ }
226
269
 
227
- .sidenav__sections {
228
- display: flex;
229
- transform: translate(-85vw);
230
- transition-duration: 0.2s;
231
- transition-property: transform;
232
- transition-timing-function: ease-in-out;
233
- }
270
+ .sidenav--open .sidenav {
271
+ opacity: 1;
272
+ transform: translate(0, 0);
273
+ visibility: visible;
274
+ }
234
275
 
235
- .sidenav__sections--main {
236
- transform: translate(0);
237
- }
276
+ .sidenav__header {
277
+ align-items: center;
278
+ background-color: var(--nav-background-color);
279
+ box-shadow: var(--nav-shadow);
280
+ display: flex;
281
+ height: var(--nav-height);
282
+ justify-content: space-between;
283
+ padding: var(--nav-padding-vertical) var(--nav-padding-horizontal);
284
+ position: sticky;
285
+ top: 0;
286
+ }
238
287
 
239
- .sidenav__section {
240
- flex-shrink: 0;
241
- padding: 0.5rem;
242
- width: 85vw;
243
- }
288
+ .sidenav__toggle {
289
+ color: var(--nav-toggle-color);
290
+ height: 1rem;
291
+ width: 1rem;
292
+ }
244
293
 
245
- .sidenav__back-button {
246
- font-weight: bold;
247
- }
294
+ .sidenav__sections {
295
+ display: flex;
296
+ transform: translate(-85vw);
297
+ transition-duration: 0.2s;
298
+ transition-property: transform;
299
+ transition-timing-function: ease-in-out;
300
+ }
248
301
 
249
- /* CSS: SEARCH */
302
+ .sidenav__sections--main {
303
+ transform: translate(0);
304
+ }
250
305
 
251
- :root {
252
- --search-background-color: #f5f6f7;
253
- --search-button-background-color: #e9e9e9;
254
- --search-excerpt-background-color: white;
255
- --search-excerpt-border-color: #d7d7d7;
256
- --search-text-color: var(--text-color);
257
- }
306
+ .sidenav__section {
307
+ flex-shrink: 0;
308
+ padding: 0.5rem;
309
+ width: 85vw;
310
+ }
258
311
 
259
- [data-theme=dark]:root {
260
- --search-background-color: #242526;
261
- --search-button-background-color: #1b1b1b;
262
- --search-excerpt-background-color: #1b1b1b;
263
- --search-excerpt-border-color: #535353;
264
- }
312
+ .sidenav__back-button {
313
+ font-weight: bold;
314
+ }
315
+
316
+ /* CSS: SEARCH */
265
317
 
266
- .search-button {
267
- align-items: center;
268
- background-color: var(--search-background-color);
269
- border: solid 1px transparent;
270
- border-radius: 99999px;
271
- display: flex;
272
- gap: 0.5ch;
273
- padding: 0.5rem 0.5rem;
318
+ :root {
319
+ --search-background-color: #f5f6f7;
320
+ --search-button-background-color: #e9e9e9;
321
+ --search-excerpt-background-color: white;
322
+ --search-excerpt-border-color: #d7d7d7;
323
+ --search-text-color: var(--text-color);
324
+ }
274
325
 
275
- @media (min-width: 40rem) {
276
- padding: 0.25rem 0.5rem;
326
+ @media (prefers-color-scheme: dark) {
327
+ :root {
328
+ --search-background-color: #242526;
329
+ --search-button-background-color: #1b1b1b;
330
+ --search-excerpt-background-color: #1b1b1b;
331
+ --search-excerpt-border-color: #535353;
332
+ }
277
333
  }
278
334
 
279
- &:hover {
280
- background: none;
281
- border: solid 1px var(--nav-link-color);
335
+ :root:has(#scheme-light:checked) {
336
+ --search-background-color: #f5f6f7;
337
+ --search-button-background-color: #e9e9e9;
338
+ --search-excerpt-background-color: white;
339
+ --search-excerpt-border-color: #d7d7d7;
282
340
  }
283
- }
284
341
 
285
- .search-button__icon {
286
- height: 1.2rem;
287
- width: 1.2rem;
288
- }
342
+ :root:has(#scheme-dark:checked) {
343
+ --search-background-color: #242526;
344
+ --search-button-background-color: #1b1b1b;
345
+ --search-excerpt-background-color: #1b1b1b;
346
+ --search-excerpt-border-color: #535353;
347
+ }
348
+
349
+ .search-box__button {
350
+ align-items: center;
351
+ background-color: var(--search-background-color);
352
+ border: solid 1px transparent;
353
+ border-radius: 99999px;
354
+ display: flex;
355
+ gap: 0.5ch;
356
+ padding: 0.5rem 0.5rem;
357
+ user-select: none;
289
358
 
290
- .search-button__label {
291
- display: none;
359
+ @media (min-width: 40rem) {
360
+ padding: 0.25rem 0.5rem;
361
+ }
292
362
 
293
- @media (min-width: 40rem) {
294
- display: initial;
363
+ &:hover {
364
+ background: none;
365
+ border: solid 1px var(--nav-link-color);
366
+ }
295
367
  }
296
- }
297
368
 
298
- body:has(.search:open), body:has(.search[open]) {
299
- overflow: hidden;
300
- }
369
+ .search-box__icon {
370
+ height: 1.2rem;
371
+ width: 1.2rem;
372
+ }
301
373
 
302
- .search {
303
- background-color: #000000dd;
304
- bottom: 0;
305
- color: var(--search-text-color);
306
- height: 100vh;
307
- height: 100dvh;
308
- left: 0;
309
- max-height: 100vh;
310
- height: 100dvh;
311
- max-width: 100vw;
312
- max-width: 100dvw;
313
- position: fixed;
314
- right: 0;
315
- top: 0;
316
- width: 100vw;
317
- width: 100dvw;
318
-
319
- @media (min-width: 64rem) {
320
- padding-inline: 1rem;
374
+ .search-box__label {
375
+ display: none;
376
+
377
+ @media (min-width: 40rem) {
378
+ display: initial;
379
+ }
321
380
  }
322
- }
323
381
 
324
- ::backdrop {
325
- display: none;
326
- }
382
+ body:has(.search:open), body:has(.search[open]) {
383
+ overflow: hidden;
384
+ }
327
385
 
328
- .search__dialog {
329
- background-color: var(--search-background-color);
330
- height: 100vh;
331
- height: 100dvh;
332
- max-height: 100vh;
333
- max-height: 100dvh;
334
- max-width: 100vw;
335
- max-width: 100dvw;
336
- overflow: auto;
337
- padding: 1rem;
338
- width: 100vw;
339
- width: 100dvw;
340
-
341
- @media (min-width: 64rem) {
342
- border-radius: 0.375rem;
343
- height: auto;
344
- margin: 60px auto auto;
345
- max-height: calc(100vh - 120px);
346
- max-height: calc(100dvh - 120px);
347
- max-width: 800px;
348
- width: auto;
386
+ .search {
387
+ background-color: #000000dd;
388
+ bottom: 0;
389
+ color: var(--search-text-color);
390
+ height: 100vh;
391
+ height: 100dvh;
392
+ left: 0;
393
+ max-height: 100vh;
394
+ height: 100dvh;
395
+ max-width: 100vw;
396
+ max-width: 100dvw;
397
+ padding: 0;
398
+ position: fixed;
399
+ right: 0;
400
+ top: 0;
401
+ width: 100vw;
402
+ width: 100dvw;
403
+
404
+ @media (min-width: 64rem) {
405
+ padding-inline: 1rem;
406
+ }
349
407
  }
350
- }
351
408
 
352
- .search__header {
353
- align-items: center;
354
- display: flex;
355
- gap: 1rem;
356
- }
409
+ ::backdrop {
410
+ display: none;
411
+ }
357
412
 
358
- .search__input {
359
- background-color: var(--search-excerpt-background-color);
360
- border: 1px solid #808080;
361
- border-radius: 0.2rem;
362
- flex: 1 0 auto;
363
- padding: 0.3rem 0.5rem;
413
+ .search__dialog {
414
+ background-color: var(--search-background-color);
415
+ height: 100vh;
416
+ height: 100dvh;
417
+ max-height: 100vh;
418
+ max-height: 100dvh;
419
+ max-width: 100vw;
420
+ max-width: 100dvw;
421
+ overflow: auto;
422
+ padding: 1rem;
423
+ width: 100vw;
424
+ width: 100dvw;
425
+
426
+ @media (min-width: 64rem) {
427
+ border-radius: 0.375rem;
428
+ height: auto;
429
+ margin: 60px auto auto;
430
+ max-height: calc(100vh - 120px);
431
+ max-height: calc(100dvh - 120px);
432
+ max-width: 800px;
433
+ width: auto;
434
+ }
435
+ }
364
436
 
365
- &:focus-visible {
366
- outline: solid 2px #0077ff;
437
+ .search__header {
438
+ align-items: center;
439
+ display: flex;
440
+ gap: 1rem;
367
441
  }
368
- }
369
442
 
370
- .search__dismiss {
371
- color: var(--search-text-color);
372
- height: 1rem;
373
- width: 1rem;
443
+ .search__input {
444
+ background-color: var(--search-excerpt-background-color);
445
+ border: 1px solid #808080;
446
+ border-radius: 0.2rem;
447
+ flex: 1 0 auto;
448
+ padding: 0.3rem 0.5rem;
374
449
 
375
- @media (min-width: 64rem) {
376
- display: none;
450
+ &:focus-visible {
451
+ outline: solid 2px #0077ff;
452
+ }
377
453
  }
378
- }
379
454
 
380
- .search__result {
381
- margin-top: 1.5rem;
455
+ .search__dismiss {
456
+ color: var(--search-text-color);
457
+ height: 1rem;
458
+ width: 1rem;
382
459
 
383
- &:first-child {
384
- margin-top: 1rem;
460
+ @media (min-width: 64rem) {
461
+ display: none;
462
+ }
385
463
  }
386
- }
387
464
 
388
- .search.loaded .search__result--loading {
389
- display: none;
390
- }
465
+ .search__result {
466
+ margin-top: 1.5rem;
391
467
 
392
- .search__result-excerpt {
393
- background-color: var(--search-excerpt-background-color);
394
- border: 1px solid var(--search-excerpt-border-color);
395
- border-radius: 0.2rem;
396
- box-shadow: 0 1px 3px 0 #0000001a;
397
- display: block;
398
- margin-top: 0.2rem;
399
- padding: 0.3rem 0.5rem;
468
+ &:first-child {
469
+ margin-top: 1rem;
470
+ }
471
+ }
400
472
 
401
- &:hover {
402
- outline: solid 2px #0077ff;
473
+ .search.loaded .search__result--loading {
474
+ display: none;
403
475
  }
404
- }
405
476
 
406
- /* CSS: MENU */
477
+ .search__result-excerpt {
478
+ background-color: var(--search-excerpt-background-color);
479
+ border: 1px solid var(--search-excerpt-border-color);
480
+ border-radius: 0.2rem;
481
+ box-shadow: 0 1px 3px 0 #0000001a;
482
+ display: block;
483
+ margin-top: 0.2rem;
484
+ padding: 0.3rem 0.5rem;
407
485
 
408
- :root {
409
- --menu-accordion-color: #7f7f7f;
410
- --menu-border-color: var(--column-border-color);
411
- --menu-link-active-color: var(--link-active-color);
412
- --menu-link-hover-background-color: rgba(0, 0, 0, .05);
413
- --menu-link-color: var(--link-color);
414
- }
486
+ &:hover {
487
+ outline: solid 2px #0077ff;
488
+ }
489
+ }
415
490
 
416
- [data-theme=dark]:root {
417
- --menu-accordion-color: #a0a0a0;
418
- --menu-link-active-color: var(--link-active-color);
419
- --menu-link-hover-background-color: rgba(255, 255, 255, .05);
420
- --menu-link-color: var(--link-color);
421
- }
491
+ /* CSS: MENU */
422
492
 
423
- .menu {
424
- border-right: 1px solid var(--menu-border-color);
425
- display: none;
426
- width: 20rem;
493
+ :root {
494
+ --menu-accordion-color: #7f7f7f;
495
+ --menu-border-color: var(--column-border-color);
496
+ --menu-link-active-color: var(--link-active-color);
497
+ --menu-link-hover-background-color: rgba(0, 0, 0, .05);
498
+ --menu-link-color: var(--link-color);
499
+ }
427
500
 
428
- @media (min-width: 64rem) {
429
- display: initial;
501
+ @media (prefers-color-scheme: dark) {
502
+ :root {
503
+ --menu-accordion-color: #a0a0a0;
504
+ --menu-link-hover-background-color: rgba(255, 255, 255, .05);
505
+ }
430
506
  }
431
- }
432
507
 
433
- .menu__sections {
434
- padding-bottom: var(--content-padding-bottom);
435
- position: sticky;
436
- top: var(--nav-height);
437
- }
508
+ :root:has(#scheme-light:checked) {
509
+ --menu-accordion-color: #7f7f7f;
510
+ --menu-link-hover-background-color: rgba(0, 0, 0, .05);
511
+ }
438
512
 
439
- .menu__section {
440
- padding: 0.5rem;
441
- }
513
+ :root:has(#scheme-dark:checked) {
514
+ --menu-accordion-color: #a0a0a0;
515
+ --menu-link-hover-background-color: rgba(255, 255, 255, .05);
516
+ }
442
517
 
443
- .menu__section .menu__section {
444
- display: none;
445
- padding: 0;
446
- padding-left: 1.5rem;
447
- }
518
+ .menu {
519
+ border-right: 1px solid var(--menu-border-color);
520
+ display: none;
521
+ width: 20rem;
448
522
 
449
- .menu__row--expanded ~ .menu__section {
450
- display: revert;
451
- }
523
+ @media (min-width: 64rem) {
524
+ display: initial;
525
+ }
526
+ }
452
527
 
453
- .menu__row {
454
- align-items: center;
455
- display: flex;
456
- height: 2.5rem;
457
- justify-content: space-between;
458
- }
528
+ .menu__sections {
529
+ padding-bottom: var(--content-padding-bottom);
530
+ position: sticky;
531
+ top: var(--nav-height);
532
+ }
459
533
 
460
- .menu__link {
461
- border-radius: 0.25rem;
462
- color: var(--menu-link-color);
463
- display: inline-block;
464
- flex: 1 0 0;
465
- overflow: hidden;
466
- padding: 0.375rem 1rem;
467
- text-overflow: ellipsis;
468
- white-space: nowrap;
534
+ .menu__section {
535
+ padding: 0.5rem;
536
+ }
469
537
 
470
- &.active {
471
- color: var(--menu-link-active-color);
538
+ .menu__section .menu__section {
539
+ display: none;
540
+ padding: 0;
541
+ padding-left: 1.5rem;
472
542
  }
473
543
 
474
- &:hover {
475
- background-color: var(--menu-link-hover-background-color);
544
+ .menu__row--expanded ~ .menu__section {
545
+ display: block;
476
546
  }
477
- }
478
547
 
479
- .menu__toggle {
480
- align-items: center;
481
- align-self: stretch;
482
- border-radius: 0.25rem;
483
- display: flex;
484
- flex: 0 0 auto;
485
- justify-content: center;
548
+ .menu__row {
549
+ align-items: center;
550
+ display: flex;
551
+ justify-content: space-between;
552
+ }
486
553
 
487
- &:hover {
488
- background-color: var(--menu-link-hover-background-color);
554
+ .menu__link {
555
+ align-items: center;
556
+ border-radius: 0.25rem;
557
+ color: var(--menu-link-color);
558
+ display: flex;
559
+ flex: 1 0 0;
560
+ height: 2.5rem;
561
+ overflow: hidden;
562
+ padding-inline: 0.75rem;
563
+ text-overflow: ellipsis;
564
+ white-space: nowrap;
565
+
566
+ &.active {
567
+ color: var(--menu-link-active-color);
568
+ }
569
+
570
+ &:hover {
571
+ background-color: var(--menu-link-hover-background-color);
572
+ }
489
573
  }
490
- }
491
574
 
492
- /* Do not display the toggle... */
493
- .menu__toggle {
494
- display: none;
495
- }
575
+ .menu__toggle {
576
+ align-items: center;
577
+ align-self: stretch;
578
+ border: none;
579
+ border-radius: 0.25rem;
580
+ display: flex;
581
+ flex: 0 0 auto;
582
+ justify-content: center;
496
583
 
497
- /* ...unless it has a sibling section. */
498
- .menu__row:has(~ .menu__section) .menu__toggle {
499
- display: revert;
500
- }
584
+ &:hover {
585
+ background-color: var(--menu-link-hover-background-color);
586
+ }
587
+ }
501
588
 
502
- .menu__toggle-icon {
503
- color: var(--menu-accordion-color);
504
- transform: rotate(90deg);
505
- height: 2rem;
506
- width: 2rem;
507
- }
589
+ .menu__toggle--full {
590
+ flex-grow: 1;
591
+ text-align: left;
508
592
 
509
- .menu__row--expanded .menu__toggle-icon {
510
- transform: rotate(180deg);
511
- }
593
+ & .menu__link:hover {
594
+ background: none;
595
+ }
596
+ }
512
597
 
513
- /* CSS: CONTENT */
598
+ /* Do not display the toggle... */
599
+ .menu__toggle {
600
+ display: none;
601
+ }
514
602
 
515
- .content {
516
- display: flex;
517
- flex: 1 0 auto;
518
- }
603
+ /* ...unless it has a sibling section. */
604
+ .menu__row:has(~ .menu__section) .menu__toggle {
605
+ display: flex;
606
+ }
519
607
 
520
- .main {
521
- display: flex;
522
- flex-grow: 1;
523
- margin-inline: auto;
524
- max-width: 82rem;
525
- padding-bottom: var(--content-padding-bottom);
526
- width: 100%;
608
+ .menu__toggle-icon-wrapper {
609
+ display: flex;
610
+ justify-content: center;
611
+ width: 2.5rem;
612
+ }
527
613
 
528
- @media (min-width: 64rem) {
529
- width: calc(100% - 20rem);
614
+ .menu__toggle-icon {
615
+ color: var(--menu-accordion-color);
616
+ height: 1rem;
617
+ width: 1rem;
618
+ }
619
+
620
+ .menu__row--expanded .menu__toggle-icon {
621
+ transform: rotate(90deg);
530
622
  }
531
- }
532
623
 
533
- .central {
534
- flex-grow: 1;
535
- max-width: 100%;
536
- padding-inline: var(--nav-padding-horizontal);
624
+ /* CSS: CONTENT */
537
625
 
538
- @media (min-width: 64rem) {
539
- padding-inline: 2rem;
540
- width: 75%;
626
+ .content {
627
+ display: flex;
628
+ flex: 1 0 auto;
541
629
  }
542
- }
543
630
 
544
- /* CSS: TOC */
545
-
546
- :root {
547
- --sidetoc-code-background-color: var(--toc-code-background-color);
548
- --sidetoc-code-border-color: var(--toc-code-border-color);
549
- --sidetoc-link-color: var(--link-color);
550
- --sidetoc-link-active-color: var(--link-active-color);
551
- --toc-background-color: #e9e9e9;
552
- --toc-code-background-color: #eee;
553
- --toc-code-border-color: #00000022;
554
- --toc-divider-color: #b0b0b0;
555
- --toc-link-active-color: black;
556
- --toc-link-color: #606060;
557
- }
631
+ .main {
632
+ display: flex;
633
+ flex-grow: 1;
634
+ margin-inline: auto;
635
+ max-width: 82rem;
636
+ padding-bottom: var(--content-padding-bottom);
637
+ width: 100%;
638
+
639
+ @media (min-width: 64rem) {
640
+ width: calc(100% - 20rem);
641
+ }
642
+ }
558
643
 
559
- [data-theme=dark]:root {
560
- --sidetoc-code-background-color: var(--toc-code-background-color);
561
- --sidetoc-code-border-color: var(--toc-code-border-color);
562
- --sidetoc-link-color: var(--link-color);
563
- --sidetoc-link-active-color: var(--link-active-color);
564
- --toc-background-color: #444444;
565
- --toc-code-background-color: #2b2b2b;
566
- --toc-code-border-color: #ffffff22;
567
- --toc-divider-color: #909090;
568
- --toc-link-active-color: white;
569
- --toc-link-color: #c0c0c0;
570
- }
644
+ .central {
645
+ flex-grow: 1;
646
+ max-width: 100%;
647
+ padding-inline: var(--nav-padding-horizontal);
571
648
 
572
- .toc {
573
- background-color: var(--toc-background-color);
574
- border-radius: 5px;
575
- cursor: pointer;
576
- margin-block: 1rem;
577
- user-select: none;
649
+ @media (min-width: 64rem) {
650
+ padding-inline: 2rem;
651
+ width: 75%;
652
+ }
653
+ }
578
654
 
579
- @media (min-width: 85rem) {
580
- display: none;
655
+ /* CSS: TOC */
656
+
657
+ :root {
658
+ --sidetoc-code-background-color: var(--code-background-color);
659
+ --sidetoc-code-border-color: var(--code-border-color);
660
+ --sidetoc-link-color: var(--link-color);
661
+ --sidetoc-link-active-color: var(--link-active-color);
662
+ --toc-background-color: #e9e9e9;
663
+ --toc-code-background-color: var(--code-background-color);
664
+ --toc-code-border-color: var(--code-border-color);
665
+ --toc-divider-color: #b0b0b0;
666
+ --toc-link-active-color: black;
667
+ --toc-link-color: #606060;
581
668
  }
582
669
 
583
- &::details-content {
584
- height: 0;
585
- overflow: hidden;
586
- transition-property: height, content-visibility;
587
- transition-duration: 0.5s;
588
- transition-behavior: allow-discrete;
670
+ @media (prefers-color-scheme: dark) {
671
+ :root {
672
+ --toc-background-color: #444444;
673
+ --toc-divider-color: #909090;
674
+ --toc-link-active-color: white;
675
+ --toc-link-color: #c0c0c0;
676
+ }
589
677
  }
590
678
 
591
- &[open]::details-content {
592
- height: auto;
593
- /* On supported browsers, allow transition to height: auto; */
594
- height: calc-size(auto, size);
679
+ :root:has(#scheme-light:checked) {
680
+ --toc-background-color: #e9e9e9;
681
+ --toc-divider-color: #b0b0b0;
682
+ --toc-link-active-color: black;
683
+ --toc-link-color: #606060;
595
684
  }
596
- }
597
685
 
598
- .toc__label {
599
- padding: 0.3rem 0.6rem;
600
- }
686
+ :root:has(#scheme-dark:checked) {
687
+ --toc-background-color: #444444;
688
+ --toc-divider-color: #909090;
689
+ --toc-link-active-color: white;
690
+ --toc-link-color: #c0c0c0;
691
+ }
601
692
 
602
- .toc__entries {
603
- border-top: 1px solid var(--toc-divider-color);
604
- display: flex;
605
- flex-direction: column;
606
- font-size: 0.9rem;
607
- padding: 0.5rem 0.6rem;
608
- gap: 0.4rem;
609
- }
610
693
 
611
- .toc__link {
612
- color: var(--toc-link-color);
613
- display: inline-block;
694
+ .toc {
695
+ background-color: var(--toc-background-color);
696
+ border-radius: 5px;
697
+ cursor: pointer;
698
+ line-height: 1.7;
699
+ margin-block: 1rem;
700
+ user-select: none;
701
+
702
+ @media (min-width: 85rem) {
703
+ display: none;
704
+ }
614
705
 
615
- &.h2 {
616
- margin-left: 1rem;
706
+ &::details-content {
707
+ height: 0;
708
+ overflow: hidden;
709
+ transition-property: height, content-visibility;
710
+ transition-duration: 0.5s;
711
+ transition-behavior: allow-discrete;
712
+ }
713
+
714
+ &[open]::details-content {
715
+ height: auto;
716
+ /* On supported browsers, allow transition to height: auto; */
717
+ height: calc-size(auto, size);
718
+ }
617
719
  }
618
720
 
619
- &.h3 {
620
- margin-left: 2rem;
721
+ .toc__label {
722
+ padding: 0.3rem 0.6rem;
621
723
  }
622
724
 
623
- &.h4 {
624
- margin-left: 3rem;
725
+ .toc__entries {
726
+ border-top: 1px solid var(--toc-divider-color);
727
+ display: flex;
728
+ flex-direction: column;
729
+ font-size: 0.9rem;
730
+ padding: 0.5rem 0.6rem;
731
+ gap: 0.4rem;
625
732
  }
626
733
 
627
- &.h5 {
628
- margin-left: 4rem;
734
+ .toc__link {
735
+ color: var(--toc-link-color);
736
+ display: inline-block;
737
+
738
+ &.h2 {
739
+ margin-left: 1rem;
740
+ }
741
+
742
+ &.h3 {
743
+ margin-left: 2rem;
744
+ }
745
+
746
+ &.h4 {
747
+ margin-left: 3rem;
748
+ }
749
+
750
+ &.h5 {
751
+ margin-left: 4rem;
752
+ }
753
+
754
+ &.h6 {
755
+ margin-left: 5rem;
756
+ }
757
+
758
+ &.active {
759
+ color: var(--toc-link-active-color);
760
+ }
761
+
762
+ &:hover {
763
+ color: var(--toc-link-active-color);
764
+ }
765
+
766
+ code {
767
+ background: var(--toc-code-background-color);
768
+ border-radius: 5px;
769
+ border: .1rem solid var(--toc-code-border-color);
770
+ padding: 0.1rem 0.2rem;
771
+ word-break: break-all;
772
+ }
629
773
  }
630
774
 
631
- &.h6 {
632
- margin-left: 5rem;
775
+ .sidetoc {
776
+ display: none;
777
+ flex: 0 0 25%;
778
+ line-height: 1.7;
779
+ max-width: 25%;
780
+
781
+ @media (min-width: 85rem) {
782
+ display: initial;
783
+ }
633
784
  }
634
785
 
635
- &.active {
636
- color: var(--toc-link-active-color);
786
+ .sidetoc__section {
787
+ max-height: calc(100vh - var(--nav-height));
788
+ overflow-y: auto;
789
+ padding-block: calc(0.5rem + 0.375rem); /* Align with menu */
790
+ position: sticky;
791
+ top: var(--nav-height);
637
792
  }
638
793
 
639
- &:hover {
640
- color: var(--toc-link-active-color);
794
+ .sidetoc__entries {
795
+ border-left: 1px solid var(--column-border-color);
796
+ display: flex;
797
+ flex-direction: column;
798
+ font-size: 0.9rem;
799
+ gap: 0.4rem;
800
+ padding-inline: 1.5rem;
641
801
  }
642
802
 
643
- code {
644
- background: var(--toc-code-background-color);
645
- border-radius: 5px;
646
- border: .1rem solid var(--toc-code-border-color);
647
- padding: 0.1rem 0.2rem;
648
- word-break: break-all;
803
+ .sidetoc__link {
804
+ color: var(--sidetoc-link-color);
805
+ display: inline-block;
806
+
807
+ &.h2 {
808
+ margin-left: 1rem;
809
+ }
810
+
811
+ &.h3 {
812
+ margin-left: 2rem;
813
+ }
814
+
815
+ &.h4 {
816
+ margin-left: 3rem;
817
+ }
818
+
819
+ &.h5 {
820
+ margin-left: 4rem;
821
+ }
822
+
823
+ &.h6 {
824
+ margin-left: 5rem;
825
+ }
826
+
827
+ &.active {
828
+ color: var(--sidetoc-link-active-color);
829
+ }
830
+
831
+ &:hover {
832
+ color: var(--sidetoc-link-active-color);
833
+ }
834
+
835
+ code {
836
+ background: var(--sidetoc-code-background-color);
837
+ border-radius: 5px;
838
+ border: .1rem solid var(--sidetoc-code-border-color);
839
+ padding: 0.1rem 0.2rem;
840
+ word-break: break-all;
841
+ }
649
842
  }
650
- }
651
843
 
652
- .sidetoc {
653
- display: none;
654
- flex: 0 0 25%;
655
- max-width: 25%;
844
+ .anchor-link {
845
+ margin-left: 0.5ch;
846
+ opacity: 0;
847
+ text-decoration: none;
848
+ transition-duration: 0.2s;
849
+ transition-property: opacity;
850
+ transition-timing-function: ease-in-out;
656
851
 
657
- @media (min-width: 85rem) {
658
- display: initial;
852
+ &:hover {
853
+ text-decoration: underline;
854
+ }
659
855
  }
660
- }
661
856
 
662
- .sidetoc__entries {
663
- border-left: 1px solid var(--column-border-color);
664
- display: flex;
665
- flex-direction: column;
666
- font-size: 0.9rem;
667
- gap: 0.4rem;
668
- padding: 0 1.5rem;
669
- position: sticky;
670
- top: calc(var(--nav-height) + 0.5rem + 0.375rem); /* Align with menu */
671
- }
857
+ h1:hover .anchor-link,
858
+ h2:hover .anchor-link,
859
+ h3:hover .anchor-link,
860
+ h4:hover .anchor-link,
861
+ h5:hover .anchor-link,
862
+ h6:hover .anchor-link {
863
+ opacity: 1;
864
+ }
865
+
866
+ /* CSS: FOOTER */
672
867
 
673
- .sidetoc__link {
674
- color: var(--sidetoc-link-color);
675
- display: inline-block;
868
+ :root {
869
+ --footer-background-color: #e9e9e9;
870
+ }
676
871
 
677
- &.h2 {
678
- margin-left: 1rem;
872
+ @media (prefers-color-scheme: dark) {
873
+ :root {
874
+ --footer-background-color: #444444;
875
+ }
679
876
  }
680
877
 
681
- &.h3 {
682
- margin-left: 2rem;
878
+ :root:has(#scheme-light:checked) {
879
+ --footer-background-color: #e9e9e9;
683
880
  }
684
881
 
685
- &.h4 {
686
- margin-left: 3rem;
882
+ :root:has(#scheme-dark:checked) {
883
+ --footer-background-color: #444444;
687
884
  }
688
885
 
689
- &.h5 {
690
- margin-left: 4rem;
886
+ .footer {
887
+ background-color: var(--footer-background-color);
888
+ flex: 0 0 auto;
889
+ padding: 4rem var(--nav-padding-horizontal);
691
890
  }
692
891
 
693
- &.h6 {
694
- margin-left: 5rem;
892
+ .footer__sections {
893
+ display: grid;
894
+ gap: 1.5rem;
895
+ grid-template-columns: 1fr;
896
+ max-width: 1200px;
897
+ margin: auto;
898
+
899
+ @media (min-width: 40rem) {
900
+ grid-template-columns: repeat(2, 1fr);
901
+ }
902
+
903
+ @media (min-width: 64rem) {
904
+ grid-template-columns: repeat(4, 1fr);
905
+ }
695
906
  }
696
907
 
697
- &.active {
698
- color: var(--sidetoc-link-active-color);
908
+ .footer__section {
909
+ flex: 1 1 0;
699
910
  }
700
911
 
701
- &:hover {
702
- color: var(--sidetoc-link-active-color);
912
+ .footer__heading {
913
+ font-weight: bold;
703
914
  }
704
915
 
705
- code {
706
- background: var(--sidetoc-code-background-color);
707
- border-radius: 5px;
708
- border: .1rem solid var(--sidetoc-code-border-color);
709
- padding: 0.1rem 0.2rem;
710
- word-break: break-all;
916
+ .footer__link:hover {
917
+ text-decoration: underline;
711
918
  }
712
- }
713
919
 
714
- /* CSS: FOOTER */
920
+ .footer__logo {
921
+ margin: 3rem auto;
922
+ height: 8rem;
923
+ width: 8rem;
924
+ }
715
925
 
716
- :root {
717
- --footer-background-color: #e9e9e9;
718
- }
926
+ .credits {
927
+ padding-block: 1rem;
928
+ text-align: center;
929
+ }
719
930
 
720
- [data-theme=dark]:root {
721
- --footer-background-color: #444444;
722
- }
931
+ .credits__link {
932
+ text-decoration: underline;
933
+ }
723
934
 
724
- .footer {
725
- background-color: var(--footer-background-color);
726
- flex: 0 0 auto;
727
- padding: 4rem var(--nav-padding-horizontal);
728
- }
935
+ .credits__logo {
936
+ display: inline-block;
937
+ height: 2rem;
938
+ margin-left: 0.8rem;
939
+ width: 2rem;
940
+ }
729
941
 
730
- .footer__sections {
731
- display: grid;
732
- gap: 1.5rem;
733
- grid-template-columns: 1fr;
734
- max-width: 1200px;
735
- margin: auto;
942
+ /* CSS: HELPERS */
736
943
 
737
- @media (min-width: 40rem) {
738
- grid-template-columns: repeat(2, 1fr);
944
+ .external-link {
945
+ align-items: center;
946
+ display: inline-flex;
947
+ gap: 0.3rem;
948
+ margin-right: 0.5ch;
739
949
  }
740
950
 
741
- @media (min-width: 64rem) {
742
- grid-template-columns: repeat(4, 1fr);
951
+ .external-link__icon {
952
+ height: 0.6rem;
953
+ width: 0.6rem;
743
954
  }
744
- }
745
955
 
746
- .footer__section {
747
- flex: 1 1 0;
748
- }
956
+ .edit-link {
957
+ align-items: center;
958
+ display: inline-flex;
959
+ gap: 0.3rem;
960
+ margin-left: 0.5ch;
961
+ margin-top: 4rem;
962
+ }
749
963
 
750
- .footer__heading {
751
- font-weight: bold;
752
- }
964
+ .edit-link__icon {
965
+ height: 1rem;
966
+ width: 1rem;
967
+ }
753
968
 
754
- .footer__link:hover {
755
- text-decoration: underline;
756
- }
969
+ /* CSS: ALERTS */
757
970
 
758
- .footer__logo {
759
- margin: 3rem auto;
760
- height: 8rem;
761
- width: 8rem;
762
- }
971
+ .alert {
972
+ border: 1px solid;
973
+ border-left: 0.5rem solid;
974
+ border-radius: 0.375rem;
975
+ margin-bottom: 1rem;
976
+ padding: 1rem;
977
+ }
763
978
 
764
- .credits {
765
- padding-block: 1rem;
766
- text-align: center;
767
- }
979
+ .alert--tip {
980
+ background: #00940011;
981
+ border-color: #009400;
982
+ }
768
983
 
769
- .credits__link {
770
- text-decoration: underline;
771
- }
984
+ .alert--info {
985
+ background: #87cef911;
986
+ border-color: #87cef9;
987
+ }
772
988
 
773
- .credits__logo {
774
- display: inline-block;
775
- height: 2rem;
776
- margin-left: 0.8rem;
777
- width: 2rem;
778
- }
989
+ .alert--warning {
990
+ background: #fea50011;
991
+ border-color: #fea500;
992
+ }
779
993
 
780
- /* CSS: HELPERS */
994
+ .alert--danger {
995
+ background: #db153b11;
996
+ border-color: #db153b;
997
+ }
781
998
 
782
- .external-link {
783
- align-items: center;
784
- display: inline-flex;
785
- gap: 0.3rem;
786
- margin-right: 0.5ch;
787
- }
999
+ .alert__header {
1000
+ align-items: center;
1001
+ display: flex;
1002
+ gap: 0.5ch;
1003
+ margin-bottom: 1rem;
1004
+ }
788
1005
 
789
- .external-link__icon {
790
- height: 0.6rem;
791
- width: 0.6rem;
792
- }
1006
+ .alert__icon {
1007
+ height: 1rem;
1008
+ width: 1rem;
1009
+ }
793
1010
 
794
- .edit-link {
795
- align-items: center;
796
- display: inline-flex;
797
- gap: 0.3rem;
798
- margin-left: 0.5ch;
799
- margin-top: 4rem;
800
- }
1011
+ .alert__label {
1012
+ font-weight: bold;
1013
+ margin: 0;
1014
+ text-transform: uppercase;
1015
+ }
801
1016
 
802
- .edit-link__icon {
803
- height: 1rem;
804
- width: 1rem;
805
- }
1017
+ .alert__content > :last-of-type {
1018
+ margin-bottom: 0;
1019
+ }
806
1020
 
807
- /* CSS: ALERTS */
1021
+ /* CSS: ANNOUNCEMENT */
808
1022
 
809
- .alert {
810
- border: 1px solid;
811
- border-left: 0.5rem solid;
812
- border-radius: 0.375rem;
813
- margin-bottom: 1rem;
814
- padding: 1rem;
815
- }
1023
+ :root {
1024
+ --announcement-background-color: black;
1025
+ --announcement-color: white;
1026
+ }
816
1027
 
817
- .alert--tip {
818
- background: #00940011;
819
- border-color: #009400;
820
- }
1028
+ @media (prefers-color-scheme: dark) {
1029
+ :root {
1030
+ --announcement-background-color: white;
1031
+ --announcement-color: black;
1032
+ }
1033
+ }
821
1034
 
822
- .alert--info {
823
- background: #87cef911;
824
- border-color: #87cef9;
825
- }
1035
+ :root:has(#scheme-light:checked) {
1036
+ --announcement-background-color: black;
1037
+ --announcement-color: white;
1038
+ }
826
1039
 
827
- .alert--warning {
828
- background: #fea50011;
829
- border-color: #fea500;
830
- }
1040
+ :root:has(#scheme-dark:checked) {
1041
+ --announcement-background-color: white;
1042
+ --announcement-color: black;
1043
+ }
831
1044
 
832
- .alert--danger {
833
- background: #db153b11;
834
- border-color: #db153b;
835
- }
1045
+ .announcement {
1046
+ background-color: var(--announcement-background-color);
1047
+ color: var(--announcement-color);
1048
+ font-size: 1.2rem;
1049
+ font-weight: 500;
1050
+ padding-block: 0.2rem;
1051
+ text-align: center;
1052
+ }
836
1053
 
837
- .alert__header {
838
- align-items: center;
839
- display: flex;
840
- gap: 0.5ch;
841
- margin-bottom: 1rem;
842
- }
1054
+ /* CSS: ARTICLE */
843
1055
 
844
- .alert__icon {
845
- height: 1rem;
846
- width: 1rem;
847
- }
1056
+ :root {
1057
+ --article-code-background-color: var(--code-background-color);
1058
+ --article-code-border-color: var(--code-border-color);
1059
+ }
848
1060
 
849
- .alert__label {
850
- font-weight: bold;
851
- margin: 0;
852
- text-transform: uppercase;
853
- }
1061
+ .article {
1062
+ .highlighter-rouge {
1063
+ padding-block: .5rem;
1064
+ }
854
1065
 
855
- .alert__content > :last-of-type {
856
- margin-bottom: 0;
1066
+ .highlight {
1067
+ border-radius: .375rem;
1068
+ }
1069
+
1070
+ pre {
1071
+ -webkit-overflow-scrolling: touch;
1072
+ box-sizing: border-box;
1073
+ margin: 0;
1074
+ overflow-x: auto;
1075
+ padding: 1em;
1076
+ width: 100%;
1077
+ }
1078
+
1079
+ pre code {
1080
+ font-family: Consolas, Monaco, 'Andale Mono', monospace;
1081
+ font-size: 0.9rem;
1082
+ line-height: 1.5;
1083
+ white-space: pre;
1084
+ word-break: normal;
1085
+ word-spacing: normal;
1086
+
1087
+ -moz-tab-size: 4;
1088
+ -o-tab-size: 4;
1089
+ tab-size: 4;
1090
+
1091
+ -webkit-hyphens: none;
1092
+ -moz-hyphens: none;
1093
+ -ms-hyphens: none;
1094
+ hyphens: none;
1095
+ }
1096
+
1097
+ code:not(pre code) {
1098
+ background: var(--article-code-background-color);
1099
+ border-radius: 0.375rem;
1100
+ border: .1rem solid var(--article-code-border-color);
1101
+ display: inline;
1102
+ overflow-x: auto;
1103
+ overflow: auto;
1104
+ padding: 0.1rem 0.2rem;
1105
+ word-break: break-word;
1106
+ }
1107
+ }
857
1108
  }