@abreen/tada 1.0.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.
Files changed (125) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +290 -0
  3. package/bin/tada.js +361 -0
  4. package/config/authors.json +1 -0
  5. package/config/nav.json +28 -0
  6. package/content/index.md +19 -0
  7. package/content/lectures/01/Pair.java.md +296 -0
  8. package/content/lectures/01/Rectangle.java +80 -0
  9. package/content/lectures/01/demo.py +9 -0
  10. package/content/lectures/01/index.md +39 -0
  11. package/content/lectures/01/lecture1.pdf +0 -0
  12. package/content/lectures/index.md +25 -0
  13. package/content/markdown.md +379 -0
  14. package/content/problem_sets/index.md +6 -0
  15. package/fonts/google-sans-code/GoogleSansCodeVariable-Italic.ttf +0 -0
  16. package/fonts/google-sans-code/GoogleSansCodeVariable.ttf +0 -0
  17. package/fonts/google-sans-code/LICENSE.txt +93 -0
  18. package/fonts/inter/InterVariable-Italic.ttf +0 -0
  19. package/fonts/inter/InterVariable.ttf +0 -0
  20. package/fonts/inter/LICENSE.txt +92 -0
  21. package/package.json +70 -0
  22. package/public/avatars/alex.jpg +0 -0
  23. package/public/test.txt +1 -0
  24. package/src/_mixins.scss +4 -0
  25. package/src/anchor/README.md +6 -0
  26. package/src/anchor/index.ts +34 -0
  27. package/src/anchor/style.scss +48 -0
  28. package/src/code/README.md +5 -0
  29. package/src/code/index.ts +113 -0
  30. package/src/code/style.scss +101 -0
  31. package/src/code.scss +54 -0
  32. package/src/header/README.md +8 -0
  33. package/src/header/index.ts +43 -0
  34. package/src/header/style.scss +228 -0
  35. package/src/index.ts +73 -0
  36. package/src/layout.scss +144 -0
  37. package/src/literate/style.scss +60 -0
  38. package/src/print/README.md +4 -0
  39. package/src/print/index.ts +32 -0
  40. package/src/print/style.scss +82 -0
  41. package/src/question/README.md +3 -0
  42. package/src/question/index.ts +25 -0
  43. package/src/question/style.scss +116 -0
  44. package/src/search/README.md +6 -0
  45. package/src/search/index.ts +574 -0
  46. package/src/search/style.scss +217 -0
  47. package/src/style.scss +815 -0
  48. package/src/timezone/index.test.ts +100 -0
  49. package/src/timezone/index.ts +298 -0
  50. package/src/timezone/style.scss +16 -0
  51. package/src/timezone/timezones.json +58 -0
  52. package/src/toc/README.md +3 -0
  53. package/src/toc/index.ts +322 -0
  54. package/src/toc/style.scss +203 -0
  55. package/src/top/README.md +4 -0
  56. package/src/top/index.ts +75 -0
  57. package/src/util.ts +122 -0
  58. package/templates/_author.html +27 -0
  59. package/templates/_bottom.html +3 -0
  60. package/templates/_download.html +1 -0
  61. package/templates/_heading.html +19 -0
  62. package/templates/_nav.html +18 -0
  63. package/templates/_theme.scss +97 -0
  64. package/templates/_top.html +87 -0
  65. package/templates/authors.schema.json +13 -0
  66. package/templates/code.html +31 -0
  67. package/templates/default.html +13 -0
  68. package/templates/literate.html +16 -0
  69. package/templates/nav.schema.json +27 -0
  70. package/tsconfig.json +15 -0
  71. package/types/dev.ts +3 -0
  72. package/types/sass.d.ts +1 -0
  73. package/types/site-variables.d.ts +16 -0
  74. package/webpack/apply-base-path-plugin.js +78 -0
  75. package/webpack/build-state.js +97 -0
  76. package/webpack/code.test.js +162 -0
  77. package/webpack/colors.js +15 -0
  78. package/webpack/config.base.js +147 -0
  79. package/webpack/config.dev.js +23 -0
  80. package/webpack/config.prod.js +32 -0
  81. package/webpack/content-watch-plugin.js +153 -0
  82. package/webpack/deflist-id-plugin.js +62 -0
  83. package/webpack/external-links-plugin.js +37 -0
  84. package/webpack/features.js +5 -0
  85. package/webpack/flair.json +1 -0
  86. package/webpack/generate-content-assets-plugin.js +308 -0
  87. package/webpack/generate-favicon-plugin.js +198 -0
  88. package/webpack/generate-fonts-plugin.js +69 -0
  89. package/webpack/generate-manifest-plugin.js +116 -0
  90. package/webpack/globals.js +74 -0
  91. package/webpack/heading-subtitle-plugin.js +80 -0
  92. package/webpack/json-schema.js +19 -0
  93. package/webpack/log.js +143 -0
  94. package/webpack/markdown-plugins.test.js +203 -0
  95. package/webpack/pagefind-plugin.js +379 -0
  96. package/webpack/pagefind-plugin.test.js +131 -0
  97. package/webpack/pdf-text.js +163 -0
  98. package/webpack/print-flair-plugin.js +22 -0
  99. package/webpack/reachability.js +273 -0
  100. package/webpack/reachability.test.js +80 -0
  101. package/webpack/serve.js +104 -0
  102. package/webpack/site-variables.js +53 -0
  103. package/webpack/site.schema.json +67 -0
  104. package/webpack/templates.js +128 -0
  105. package/webpack/text-to-id.js +8 -0
  106. package/webpack/toc-plugin.js +167 -0
  107. package/webpack/util.js +49 -0
  108. package/webpack/utils/code.js +439 -0
  109. package/webpack/utils/content-files.js +147 -0
  110. package/webpack/utils/define-plugin.js +20 -0
  111. package/webpack/utils/file-types.js +26 -0
  112. package/webpack/utils/front-matter.js +57 -0
  113. package/webpack/utils/jdi-runner/LiterateRunner.class +0 -0
  114. package/webpack/utils/jdi-runner/LiterateRunner.java +241 -0
  115. package/webpack/utils/literate-java.js +153 -0
  116. package/webpack/utils/markdown.js +244 -0
  117. package/webpack/utils/parse-hsl.js +8 -0
  118. package/webpack/utils/paths.js +58 -0
  119. package/webpack/utils/render.js +466 -0
  120. package/webpack/utils/shiki-highlighter.js +26 -0
  121. package/webpack/validate-internal-links-plugin.js +155 -0
  122. package/webpack/watch-reachability-state.js +273 -0
  123. package/webpack/watch-reachability-state.test.js +198 -0
  124. package/webpack/watch-reload-client.js +54 -0
  125. package/webpack/watch.js +166 -0
package/src/style.scss ADDED
@@ -0,0 +1,815 @@
1
+ @import './_mixins.scss';
2
+ @import 'config/theme';
3
+
4
+ @font-face {
5
+ font-family: 'Inter';
6
+ font-style: normal;
7
+ font-weight: 100 900;
8
+ font-display: swap;
9
+ src: url('inter/InterVariable.woff2') format('woff2');
10
+ }
11
+
12
+ @font-face {
13
+ font-family: 'Inter';
14
+ font-style: italic;
15
+ font-weight: 100 900;
16
+ font-display: swap;
17
+ src: url('inter/InterVariable-Italic.woff2') format('woff2');
18
+ }
19
+
20
+ @font-face {
21
+ font-family: 'Google Sans Code';
22
+ font-style: normal;
23
+ font-weight: 300 800;
24
+ font-display: swap;
25
+ src: url('google-sans-code/GoogleSansCodeVariable.woff2') format('woff2');
26
+ }
27
+
28
+ @font-face {
29
+ font-family: 'Google Sans Code';
30
+ font-style: italic;
31
+ font-weight: 300 800;
32
+ font-display: swap;
33
+ src: url('google-sans-code/GoogleSansCodeVariable-Italic.woff2')
34
+ format('woff2');
35
+ }
36
+
37
+ :root {
38
+ --box-border-width: 5px;
39
+
40
+ --gap: 12px;
41
+ --border-radius: 12px;
42
+ --control-border-width: 2px;
43
+ --label-border-width: 2px;
44
+ --focus-border-width: 3px;
45
+ --table-padding: 12px;
46
+ --details-padding: 12px;
47
+ --section-padding: 64px;
48
+
49
+ --main-width: 900px;
50
+
51
+ --icon-external-link: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'><rect x='3' y='3' width='18' height='18' stroke='hsl(20deg 8% 8%)' stroke-width='2' fill='none' rx='2'/><path d='M9 15 L15 9' stroke='hsl(20deg 8% 8%)' stroke-width='2' stroke-linecap='round' fill='none'/><path d='M9 9 H15 V15' stroke='hsl(20deg 8% 8%)' stroke-width='2' stroke-linecap='round' fill='none'/></svg>");
52
+ --icon-external-link-dark: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'><rect x='3' y='3' width='18' height='18' stroke='hsl(20deg 20% 90%)' stroke-width='2' fill='none' rx='2'/><path d='M9 15 L15 9' stroke='hsl(20deg 20% 90%)' stroke-width='2' stroke-linecap='round' fill='none'/><path d='M9 9 H15 V15' stroke='hsl(20deg 20% 90%)' stroke-width='2' stroke-linecap='round' fill='none'/></svg>");
53
+ --icon-external-link-hover: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'><rect x='3' y='3' width='18' height='18' stroke='hsl(20deg 6% 60%)' stroke-width='2' fill='none' rx='2'/><path d='M9 15 L15 9' stroke='hsl(20deg 6% 60%)' stroke-width='2' stroke-linecap='round' fill='none'/><path d='M9 9 H15 V15' stroke='hsl(20deg 6% 60%)' stroke-width='2' stroke-linecap='round' fill='none'/></svg>");
54
+ --icon-external-link-dark-hover: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'><rect x='3' y='3' width='18' height='18' stroke='hsl(20deg 6% 55%)' stroke-width='2' fill='none' rx='2'/><path d='M9 15 L15 9' stroke='hsl(20deg 6% 55%)' stroke-width='2' stroke-linecap='round' fill='none'/><path d='M9 9 H15 V15' stroke='hsl(20deg 6% 55%)' stroke-width='2' stroke-linecap='round' fill='none'/></svg>");
55
+ --icon-external-link-active: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'><rect x='3' y='3' width='18' height='18' stroke='black' stroke-width='2' fill='none' rx='2'/><path d='M9 15 L15 9' stroke='black' stroke-width='2' stroke-linecap='round' fill='none'/><path d='M9 9 H15 V15' stroke='black' stroke-width='2' stroke-linecap='round' fill='none'/></svg>");
56
+ --icon-external-link-dark-active: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'><rect x='3' y='3' width='18' height='18' stroke='white' stroke-width='2' fill='none' rx='2'/><path d='M9 15 L15 9' stroke='white' stroke-width='2' stroke-linecap='round' fill='none'/><path d='M9 9 H15 V15' stroke='white' stroke-width='2' stroke-linecap='round' fill='none'/></svg>");
57
+
58
+ --icon-external-translucent: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'><g opacity='0.3' stroke='hsl(20deg 8% 8%)' stroke-width='2' stroke-linecap='round' fill='none'><rect x='3' y='3' width='18' height='18' rx='2'/><path d='M9 15 L15 9' stroke-linecap='round'/><path d='M9 9 H15 V15' stroke-linecap='round'/></g></svg>");
59
+ --icon-external-translucent-dark: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'><g opacity='0.3' stroke='hsl(20deg 85% 90%)' stroke-width='2' stroke-linecap='round' fill='none'><rect x='3' y='3' width='18' height='18' rx='2'/><path d='M9 15 L15 9' stroke-linecap='round'/><path d='M9 9 H15 V15' stroke-linecap='round'/></g></svg>");
60
+
61
+ --icon-warning: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'><polygon points='12,2 22,20 2,20' fill='none' stroke='hsl(20deg 8% 8%)' stroke-width='2' stroke-linejoin='round'/><line x1='12' y1='9' x2='12' y2='13' stroke='hsl(20deg 8% 8%)' stroke-width='2' stroke-linecap='round'/><line x1='12' y1='16' x2='12' y2='16' stroke='hsl(20deg 8% 8%)' stroke-width='2' stroke-linecap='round'/></svg>");
62
+ --icon-warning-dark: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'><polygon points='12,2 22,20 2,20' fill='none' stroke='hsl(20deg 20% 90%)' stroke-width='2' stroke-linejoin='round'/><line x1='12' y1='9' x2='12' y2='13' stroke='hsl(20deg 20% 90%)' stroke-width='2' stroke-linecap='round'/><line x1='12' y1='16' x2='12' y2='16' stroke='hsl(20deg 20% 90%)' stroke-width='2' stroke-linecap='round'/></svg>");
63
+ }
64
+
65
+ p {
66
+ margin: 0 0 1rem 0;
67
+ }
68
+
69
+ ::selection {
70
+ color: var(--bg-color);
71
+ background: var(--fg-color);
72
+ }
73
+
74
+ :focus-visible {
75
+ outline: 2px solid var(--theme-color);
76
+ outline-offset: 1px;
77
+ }
78
+
79
+ h1,
80
+ h2,
81
+ h3,
82
+ h4,
83
+ h5,
84
+ h6 {
85
+ font-family: var(--heading-font);
86
+ -webkit-break-after: avoid;
87
+ break-after: avoid;
88
+ line-height: 1.3;
89
+
90
+ // Enable Inter's ligatures (for style)
91
+ font-feature-settings: 'dlig';
92
+ }
93
+
94
+ h1 {
95
+ font-size: 250%;
96
+ font-weight: 700;
97
+ }
98
+
99
+ .info {
100
+ @include user-select(none);
101
+ display: grid;
102
+ grid-template-columns: 1fr auto;
103
+ align-items: baseline;
104
+ color: var(--fg2-color);
105
+ font-size: var(--font-size-smaller);
106
+
107
+ @media (width < 450px) {
108
+ grid-template-columns: 1fr;
109
+ }
110
+
111
+ aside.author {
112
+ a {
113
+ text-decoration: none;
114
+
115
+ .text {
116
+ color: var(--fg2-color);
117
+ text-decoration: underline;
118
+ text-decoration-color: var(--fg2-color);
119
+ text-decoration-thickness: 1px;
120
+ text-underline-offset: 3px;
121
+ }
122
+ }
123
+
124
+ .avatar {
125
+ width: 24px;
126
+ height: 24px;
127
+ vertical-align: middle;
128
+ margin-left: 4px;
129
+ }
130
+ }
131
+ }
132
+
133
+ body {
134
+ color: var(--fg-color);
135
+ background-color: var(--bg-color);
136
+
137
+ font-family: var(--font);
138
+ font-size: var(--font-size);
139
+ font-weight: var(--font-weight);
140
+ line-height: var(--line-height);
141
+
142
+ /*
143
+ * Enable Inter's features for legibility:
144
+ * ss03 - round quotes & commas
145
+ * ss04 - disambiguation (make uppercase i and lowercase L distinct)
146
+ */
147
+ font-feature-settings: 'ss03', 'ss04';
148
+
149
+ @media (prefers-color-scheme: dark) {
150
+ & {
151
+ text-rendering: optimizeLegibility;
152
+ -webkit-font-smoothing: antialiased;
153
+ }
154
+ }
155
+ }
156
+
157
+ html {
158
+ overscroll-behavior: none;
159
+ background: var(--bg-color);
160
+ }
161
+
162
+ a {
163
+ color: var(--fg-color);
164
+ text-decoration-color: var(--fg2-color);
165
+ text-decoration-thickness: 1px;
166
+ text-underline-offset: 3px;
167
+ }
168
+
169
+ a.disabled {
170
+ color: var(--fg-color-translucent);
171
+ text-decoration-color: var(--fg-color-translucent);
172
+ cursor: not-allowed;
173
+ }
174
+
175
+ @media (hover: hover) {
176
+ a:hover {
177
+ color: var(--fg2-color);
178
+ }
179
+
180
+ a.disabled:hover {
181
+ color: var(--fg-color-translucent);
182
+ }
183
+ }
184
+
185
+ a:active {
186
+ color: var(--link-active-color);
187
+ }
188
+
189
+ a.external::after {
190
+ content: '';
191
+ background: var(--icon-external-link);
192
+ background-size: contain;
193
+ background-repeat: no-repeat;
194
+ background-position: center center;
195
+ margin-left: 4px;
196
+ padding-right: 18px;
197
+ }
198
+
199
+ @media (prefers-color-scheme: dark) {
200
+ a.external::after {
201
+ background: var(--icon-external-link-dark);
202
+ background-size: contain;
203
+ background-repeat: no-repeat;
204
+ background-position: center center;
205
+ }
206
+ }
207
+
208
+ @media (hover: hover) {
209
+ a.external:hover::after {
210
+ background: var(--icon-external-link-hover);
211
+ background-size: contain;
212
+ background-repeat: no-repeat;
213
+ background-position: center center;
214
+ }
215
+ }
216
+
217
+ @media (hover: hover) and (prefers-color-scheme: dark) {
218
+ a.external:hover::after {
219
+ background: var(--icon-external-link-dark-hover);
220
+ background-size: contain;
221
+ background-repeat: no-repeat;
222
+ background-position: center center;
223
+ }
224
+ }
225
+
226
+ a.external:active::after {
227
+ background: var(--icon-external-link-active) !important;
228
+ background-size: contain !important;
229
+ background-repeat: no-repeat !important;
230
+ background-position: center center !important;
231
+ }
232
+
233
+ @media (prefers-color-scheme: dark) {
234
+ a.external:active::after {
235
+ background: var(--icon-external-link-dark-active) !important;
236
+ background-size: contain !important;
237
+ background-repeat: no-repeat !important;
238
+ background-position: center center !important;
239
+ }
240
+ }
241
+
242
+ a.external.disabled::after,
243
+ a.external.disabled:active::after {
244
+ background: var(--icon-external-translucent) !important;
245
+ background-size: contain !important;
246
+ background-repeat: no-repeat !important;
247
+ background-position: center center !important;
248
+ }
249
+
250
+ @media (prefers-color-scheme: dark) {
251
+ a.external.disabled::after,
252
+ a.external.disabled:active::after {
253
+ background: var(--icon-external-translucent-dark) !important;
254
+ background-size: contain !important;
255
+ background-repeat: no-repeat !important;
256
+ background-position: center center !important;
257
+ }
258
+ }
259
+
260
+ .footnotes {
261
+ margin-top: calc(var(--thematic-break-margin) / 2);
262
+ padding-top: 32px;
263
+ border-top: 3px solid var(--bg2-color);
264
+ font-size: 0.9em;
265
+ }
266
+
267
+ .footnotes .title {
268
+ @include user-select(none);
269
+ font-weight: 700;
270
+ font-size: larger;
271
+ }
272
+
273
+ .footnotes p {
274
+ margin: 0;
275
+ }
276
+
277
+ .footnotes li {
278
+ margin-bottom: 8px;
279
+ }
280
+
281
+ a.footnote-ref {
282
+ vertical-align: super;
283
+ border-bottom: none;
284
+ font-size: 0.8em;
285
+ }
286
+
287
+ .footnote-item {
288
+ &:target {
289
+ outline: 2px solid var(--theme-color);
290
+ outline-offset: 1px;
291
+ }
292
+ }
293
+
294
+ a.footnote-ref,
295
+ .footnotes .footnote-backref {
296
+ display: inline-block;
297
+ @include user-select(none);
298
+ }
299
+
300
+ details .content > p:last-child,
301
+ details .content > div:last-child {
302
+ margin-bottom: 0;
303
+ }
304
+
305
+ details summary {
306
+ cursor: pointer;
307
+ @include user-select(none);
308
+ padding: var(--details-padding);
309
+ }
310
+
311
+ details .content {
312
+ padding: 0 var(--details-padding) var(--details-padding)
313
+ var(--details-padding);
314
+ }
315
+
316
+ @media (hover: hover) {
317
+ details summary {
318
+ &:hover {
319
+ color: var(--fg2-color);
320
+ }
321
+
322
+ &:active {
323
+ color: var(--link-active-color);
324
+ }
325
+ }
326
+ }
327
+
328
+ hr {
329
+ border: none;
330
+ height: 32px;
331
+ margin: var(--section-padding) 0;
332
+ display: flex;
333
+ align-items: center;
334
+ justify-content: center;
335
+ }
336
+
337
+ hr::after {
338
+ content: '';
339
+ display: block;
340
+ width: 160px;
341
+ height: 12px;
342
+ background-color: var(--fg2-color);
343
+ mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 12'><rect x='0' y='5.5' width='96' height='1' fill='black'/><path d='M 64,6 C 71,6 80,4.5 80,1 C 80,4.5 89,6 96,6 C 89,6 80,7.5 80,11 C 80,7.5 71,6 64,6 Z' fill='black'/><rect x='64' y='5.5' width='96' height='1' fill='black'/></svg>");
344
+ mask-size: 100% 100%;
345
+ mask-repeat: no-repeat;
346
+ }
347
+
348
+ main p,
349
+ main details {
350
+ margin-bottom: 1rem;
351
+ }
352
+
353
+ main details {
354
+ border-radius: var(--border-radius);
355
+ border: 2px solid var(--fg-color);
356
+ }
357
+
358
+ input[type='text'],
359
+ input[type='search'] {
360
+ background: var(--bg-color);
361
+ color: var(--fg-color);
362
+ border: var(--control-border-width) solid var(--fg2-color);
363
+ border-radius: var(--border-radius);
364
+ font-size: 12pt;
365
+ padding: 4px 4px;
366
+ }
367
+
368
+ button,
369
+ a.button,
370
+ input[type='submit'] {
371
+ background: var(--bg-color);
372
+ color: var(--fg-color);
373
+ padding: 0.25em 0.66em;
374
+ border: var(--control-border-width) solid var(--fg2-color);
375
+ border-radius: var(--border-radius);
376
+ font-size: var(--font-size-small);
377
+ font-family: var(--font);
378
+ font-weight: 500;
379
+ text-decoration: none;
380
+ }
381
+
382
+ button:active,
383
+ a.button:active,
384
+ input[type='submit']:active {
385
+ background: var(--link-active-color) !important;
386
+ color: var(--bg-color) !important;
387
+ }
388
+
389
+ @media (hover: hover) {
390
+ button:hover,
391
+ a.button:hover,
392
+ input[type='submit']:hover {
393
+ background: var(--bg2-color);
394
+ cursor: pointer;
395
+ }
396
+ }
397
+
398
+ button:focus-visible,
399
+ a.button:focus-visible,
400
+ input[type='submit']:focus-visible,
401
+ input[type='text']:focus-visible,
402
+ input[type='search']:focus-visible {
403
+ border-color: var(--fg-color);
404
+ background: var(--bg2-color);
405
+ }
406
+
407
+ button.icon-button {
408
+ display: inline-flex;
409
+ align-items: center;
410
+ justify-content: center;
411
+ width: 30px;
412
+ height: 30px;
413
+ border-radius: 999px;
414
+ padding: 0;
415
+ border: none;
416
+ font-weight: 400;
417
+ font-style: normal;
418
+ vertical-align: top;
419
+ }
420
+
421
+ li {
422
+ margin-bottom: 0.5rem;
423
+ }
424
+
425
+ ol.styled-list,
426
+ ul.styled-list {
427
+ color: var(--theme-color-text);
428
+ font-weight: 700;
429
+ }
430
+
431
+ ul.styled-list {
432
+ // Make bullet points slightly bigger
433
+ font-size: 1.2rem;
434
+ }
435
+
436
+ ol li .styled-list-item,
437
+ ul li .styled-list-item {
438
+ color: var(--fg-color);
439
+ font-weight: var(--font-weight);
440
+ font-size: 1rem;
441
+ }
442
+
443
+ ul {
444
+ list-style-type: square;
445
+ }
446
+
447
+ ul ul {
448
+ list-style-type: disc;
449
+ }
450
+
451
+ ul ul ul {
452
+ list-style-type: circle;
453
+ }
454
+
455
+ ul ul ul ul {
456
+ list-style-type: square;
457
+ }
458
+
459
+ ol {
460
+ list-style-type: decimal;
461
+ }
462
+
463
+ ol ol {
464
+ list-style-type: lower-alpha;
465
+ }
466
+
467
+ ol ol ol {
468
+ list-style-type: lower-roman;
469
+ }
470
+
471
+ ol ol ol ol {
472
+ list-style-type: decimal;
473
+ }
474
+
475
+ ol ol ol ol ol {
476
+ list-style-type: lower-alpha;
477
+ }
478
+
479
+ table {
480
+ font-size: var(--font-size-smaller);
481
+ border-collapse: collapse;
482
+ overflow: scroll;
483
+ margin: 1rem 0;
484
+ }
485
+
486
+ thead {
487
+ text-align: left;
488
+ }
489
+
490
+ th,
491
+ td {
492
+ border-bottom: 1px solid var(--fg-color);
493
+ }
494
+
495
+ th {
496
+ font-weight: 600;
497
+ color: var(--theme-color-text);
498
+ }
499
+
500
+ th,
501
+ td {
502
+ padding: var(--table-padding) var(--table-padding) var(--table-padding) 0;
503
+ text-align: left;
504
+ vertical-align: top;
505
+ }
506
+
507
+ tbody tr:last-child td {
508
+ border-bottom: none;
509
+ }
510
+
511
+ .alert {
512
+ border: 3px solid var(--bg2-color);
513
+ position: relative;
514
+ margin: 1rem 0;
515
+ }
516
+
517
+ .alert.warning {
518
+ background: var(--warning-bg-color);
519
+ border-color: var(--warning-bg-color);
520
+ }
521
+
522
+ .alert.note {
523
+ background: var(--note-bg-color);
524
+ border-color: var(--note-bg-color);
525
+ }
526
+
527
+ .alert .title {
528
+ padding: 10px 6px;
529
+ }
530
+
531
+ .alert .content {
532
+ padding: 12px;
533
+
534
+ .styled-list {
535
+ color: var(--fg-color);
536
+ }
537
+
538
+ tt,
539
+ code {
540
+ background: inherit;
541
+ padding: inherit;
542
+ }
543
+
544
+ time[datetime].is-modified {
545
+ // Reset the underline color
546
+ text-decoration: underline dotted;
547
+ }
548
+
549
+ a {
550
+ text-decoration-color: var(--fg-color);
551
+ }
552
+
553
+ dfn {
554
+ color: inherit;
555
+ }
556
+ }
557
+
558
+ .alert .content > *:first-child {
559
+ margin-top: 0;
560
+ }
561
+
562
+ .alert .content > *:last-child {
563
+ margin-bottom: 0;
564
+ }
565
+
566
+ .alert .title::before {
567
+ left: 8px;
568
+ top: 8px;
569
+ position: absolute;
570
+ width: 32px;
571
+ height: 32px;
572
+ }
573
+
574
+ .alert.warning .title::before {
575
+ content: var(--icon-warning);
576
+ }
577
+
578
+ i.warning {
579
+ background: var(--icon-warning);
580
+ background-size: contain;
581
+ display: inline-block;
582
+ height: 1em;
583
+ width: 1em;
584
+ vertical-align: sub;
585
+ }
586
+
587
+ @media (prefers-color-scheme: dark) {
588
+ .alert.warning .title::before {
589
+ content: var(--icon-warning-dark);
590
+ }
591
+
592
+ i.warning {
593
+ background: var(--icon-warning-dark);
594
+ background-size: contain;
595
+ }
596
+ }
597
+
598
+ .alert.note .title::before {
599
+ content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10' fill='none' stroke='hsl(20deg 8% 8%)' stroke-width='2'/><line x1='12' y1='10' x2='12' y2='16' stroke='hsl(20deg 8% 8%)' stroke-width='2' stroke-linecap='round'/><line x1='12' y1='7' x2='12' y2='7' stroke='hsl(20deg 8% 8%)' stroke-width='2' stroke-linecap='round'/></svg>");
600
+ }
601
+
602
+ @media (prefers-color-scheme: dark) {
603
+ .alert.note .title::before {
604
+ content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10' fill='none' stroke='hsl(20deg 20% 90%)' stroke-width='2'/><line x1='12' y1='10' x2='12' y2='16' stroke='hsl(20deg 20% 90%)' stroke-width='2' stroke-linecap='round'/><line x1='12' y1='7' x2='12' y2='7' stroke='hsl(20deg 20% 90%)' stroke-width='2' stroke-linecap='round'/></svg>");
605
+ }
606
+ }
607
+
608
+ .alert .title {
609
+ font-weight: 700;
610
+ @include user-select(none);
611
+ padding-left: 48px;
612
+ margin: 0;
613
+ }
614
+
615
+ .alert > p:last-child {
616
+ margin-bottom: 0;
617
+ }
618
+
619
+ section {
620
+ background: linear-gradient(
621
+ 0deg,
622
+ transparent 0,
623
+ var(--bg2-color) 3rem,
624
+ var(--bg2-color) calc(100% - 3rem),
625
+ transparent 100%
626
+ );
627
+ padding: calc(5 * var(--gap)) calc(2 * var(--gap));
628
+ margin: 0 calc(-1 * var(--gap)) 2rem calc(-1 * var(--gap));
629
+
630
+ .alert {
631
+ background: var(--bg-color);
632
+ }
633
+ }
634
+
635
+ section h2:first-child,
636
+ section h3:first-child,
637
+ section h4:first-child,
638
+ section h5:first-child,
639
+ section h6:first-child {
640
+ font-style: italic;
641
+ font-weight: 600;
642
+ }
643
+
644
+ section > p:last-child,
645
+ section > div:last-child {
646
+ margin-bottom: 0;
647
+ }
648
+
649
+ section > h2 + p {
650
+ margin-top: 16px;
651
+ }
652
+
653
+ blockquote {
654
+ color: var(--fg-color);
655
+ font-style: italic;
656
+ font-size: 1.2em;
657
+ }
658
+
659
+ .heading-subtitle {
660
+ font-style: italic;
661
+ }
662
+
663
+ h1 .heading-subtitle,
664
+ h2 .heading-subtitle,
665
+ h3 .heading-subtitle,
666
+ h4 .heading-subtitle,
667
+ h5 .heading-subtitle,
668
+ h6 .heading-subtitle {
669
+ margin-left: 1rem;
670
+ font-weight: 400;
671
+ }
672
+
673
+ h3.has-subtitle,
674
+ h4.has-subtitle,
675
+ h5.has-subtitle,
676
+ h6.has-subtitle {
677
+ margin-top: 6rem;
678
+ border-bottom: 1px solid var(--fg-color);
679
+ padding-bottom: 0.5em;
680
+ margin-bottom: 0.5em;
681
+ }
682
+
683
+ .small-caps {
684
+ text-transform: uppercase;
685
+ font-weight: 600;
686
+ font-size: 0.9em;
687
+ }
688
+
689
+ dl {
690
+ dt {
691
+ font-weight: 600;
692
+ color: var(--theme-color-text);
693
+
694
+ a {
695
+ color: var(--theme-color-text);
696
+ text-decoration-color: var(--theme-color-text);
697
+
698
+ @media (hover: hover) {
699
+ &:hover {
700
+ text-decoration-color: var(--fg2-color);
701
+ }
702
+ }
703
+ }
704
+ }
705
+
706
+ dd {
707
+ margin-bottom: var(--gap);
708
+ }
709
+ }
710
+
711
+ dfn {
712
+ font-weight: 500;
713
+ color: var(--theme-color-text);
714
+ font-style: italic;
715
+ }
716
+
717
+ .breadcrumb {
718
+ @include user-select(none);
719
+
720
+ &::after {
721
+ content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'><path d='M3 7 H17 V22' stroke='hsl(20deg 8% 8%)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/><polyline points='11 16 17 22 23 16' stroke='hsl(20deg 8% 8%)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>");
722
+ vertical-align: middle;
723
+ }
724
+
725
+ @media (prefers-color-scheme: dark) {
726
+ &::after {
727
+ content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'><path d='M3 7 H17 V22' stroke='hsl(20deg 20% 90%)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/><polyline points='11 16 17 22 23 16' stroke='hsl(20deg 20% 90%)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>");
728
+ }
729
+ }
730
+ }
731
+
732
+ img {
733
+ max-width: 100%;
734
+ }
735
+
736
+ .avatar {
737
+ aspect-ratio: 1 / 1;
738
+ max-width: 100px;
739
+ border-radius: 999px;
740
+ object-fit: cover;
741
+ }
742
+
743
+ figure.bio {
744
+ float: left;
745
+ margin: 1rem 1rem 1rem 0;
746
+ max-width: 125px;
747
+
748
+ @media (width > 540px) {
749
+ max-width: 200px;
750
+ }
751
+
752
+ .avatar {
753
+ max-width: 100%;
754
+ width: 100%;
755
+ display: block;
756
+ }
757
+
758
+ figcaption {
759
+ font-size: var(--font-size-small);
760
+ color: var(--fg2-color);
761
+ text-align: center;
762
+ margin-top: var(--gap);
763
+ font-style: italic;
764
+ }
765
+ }
766
+
767
+ select {
768
+ font-family: var(--font);
769
+ color: var(--fg-color);
770
+ background: var(--bg-color);
771
+ border: var(--control-border-width) solid var(--fg2-color);
772
+ border-radius: var(--border-radius);
773
+ padding: 4px;
774
+ position: relative;
775
+ font-size: inherit;
776
+ }
777
+
778
+ pre,
779
+ tt,
780
+ code {
781
+ font-family: var(--mono-font);
782
+ }
783
+
784
+ tt,
785
+ code {
786
+ font-size: var(--mono-font-size);
787
+ background: var(--bg2-color);
788
+ border-radius: var(--mono-border-radius);
789
+ padding: 0.12em 0.25em;
790
+ overflow-wrap: anywhere;
791
+ }
792
+
793
+ pre {
794
+ background: var(--bg2-color);
795
+ border-radius: var(--mono-border-radius);
796
+ line-height: var(--mono-line-height);
797
+ overflow: auto;
798
+ padding: var(--gap);
799
+
800
+ code {
801
+ padding: 0;
802
+ }
803
+ }
804
+
805
+ // Shiki dual-theme support (defaultColor: false — CSS custom properties only,
806
+ // no inline color/background-color, so no !important needed)
807
+ .shiki span {
808
+ color: var(--shiki-light);
809
+ }
810
+
811
+ @media (prefers-color-scheme: dark) {
812
+ .shiki span {
813
+ color: var(--shiki-dark);
814
+ }
815
+ }