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