clampography 2.0.0-beta.9 → 2.0.1

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.
@@ -0,0 +1,1050 @@
1
+ /**
2
+ * Clampography CSS Bundle
3
+ * Contains: base.js, theme.js, extra.js, forms.js, kbd.js
4
+ */
5
+
6
+ /* --- base.js --- */
7
+ @layer base {
8
+
9
+ :where(:root) {
10
+ --clampography-spacing-xs: clamp(0.25rem, 0.0833rem + 0.8333vw, 0.75rem);
11
+ --clampography-spacing-sm: clamp(0.375rem, 0.0833rem + 1.4583vw, 1.25rem);
12
+ --clampography-spacing-md: clamp(0.5rem, 0.1667rem + 1.6667vw, 1.5rem);
13
+ --clampography-spacing-lg: clamp(0.75rem, 0.1667rem + 2.9167vw, 2.5rem);
14
+ --clampography-spacing-xl: clamp(1rem, 0.3333rem + 3.3333vw, 3rem);
15
+ --clampography-list-indent: clamp(1.5rem, 1.3333rem + 0.8333vw, 2rem);
16
+ --clampography-scroll-offset: 5rem;
17
+ --clampography-font-base: Inter, system-ui, -apple-system, 'Segoe UI Variable Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
18
+ --clampography-font-mono: ui-monospace, 'Cascadia Code', 'Cascadia Mono', 'Segoe UI Mono', 'Ubuntu Mono', SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
19
+ --clampography-fluid-min: 20;
20
+ --clampography-fluid-max: 80;
21
+ --clampography-h1-min: 1.875;
22
+ --clampography-h1-max: 4;
23
+ --clampography-h1-slope: calc((var(--clampography-h1-max) - var(--clampography-h1-min)) / (var(--clampography-fluid-max) - var(--clampography-fluid-min)));
24
+ --clampography-h1-base: calc(var(--clampography-h1-min) - var(--clampography-h1-slope) * var(--clampography-fluid-min));
25
+ --clampography-h1-size: clamp(calc(var(--clampography-h1-min) * 1rem), calc(var(--clampography-h1-base) * 1rem + var(--clampography-h1-slope) * 100vw), calc(var(--clampography-h1-max) * 1rem));
26
+ --clampography-h2-min: 1.25;
27
+ --clampography-h2-max: 3;
28
+ --clampography-h2-slope: calc((var(--clampography-h2-max) - var(--clampography-h2-min)) / (var(--clampography-fluid-max) - var(--clampography-fluid-min)));
29
+ --clampography-h2-base: calc(var(--clampography-h2-min) - var(--clampography-h2-slope) * var(--clampography-fluid-min));
30
+ --clampography-h2-size: clamp(calc(var(--clampography-h2-min) * 1rem), calc(var(--clampography-h2-base) * 1rem + var(--clampography-h2-slope) * 100vw), calc(var(--clampography-h2-max) * 1rem));
31
+ --clampography-h3-min: 1.125;
32
+ --clampography-h3-max: 2.25;
33
+ --clampography-h3-slope: calc((var(--clampography-h3-max) - var(--clampography-h3-min)) / (var(--clampography-fluid-max) - var(--clampography-fluid-min)));
34
+ --clampography-h3-base: calc(var(--clampography-h3-min) - var(--clampography-h3-slope) * var(--clampography-fluid-min));
35
+ --clampography-h3-size: clamp(calc(var(--clampography-h3-min) * 1rem), calc(var(--clampography-h3-base) * 1rem + var(--clampography-h3-slope) * 100vw), calc(var(--clampography-h3-max) * 1rem));
36
+ --clampography-h4-min: 1;
37
+ --clampography-h4-max: 1.5;
38
+ --clampography-h4-slope: calc((var(--clampography-h4-max) - var(--clampography-h4-min)) / (var(--clampography-fluid-max) - var(--clampography-fluid-min)));
39
+ --clampography-h4-base: calc(var(--clampography-h4-min) - var(--clampography-h4-slope) * var(--clampography-fluid-min));
40
+ --clampography-h4-size: clamp(calc(var(--clampography-h4-min) * 1rem), calc(var(--clampography-h4-base) * 1rem + var(--clampography-h4-slope) * 100vw), calc(var(--clampography-h4-max) * 1rem));
41
+ --clampography-h5-min: 1;
42
+ --clampography-h5-max: 1;
43
+ --clampography-h5-slope: calc((var(--clampography-h5-max) - var(--clampography-h5-min)) / (var(--clampography-fluid-max) - var(--clampography-fluid-min)));
44
+ --clampography-h5-base: calc(var(--clampography-h5-min) - var(--clampography-h5-slope) * var(--clampography-fluid-min));
45
+ --clampography-h5-size: clamp(calc(var(--clampography-h5-min) * 1rem), calc(var(--clampography-h5-base) * 1rem + var(--clampography-h5-slope) * 100vw), calc(var(--clampography-h5-max) * 1rem));
46
+ --clampography-h6-min: 0.875;
47
+ --clampography-h6-max: 0.875;
48
+ --clampography-h6-slope: calc((var(--clampography-h6-max) - var(--clampography-h6-min)) / (var(--clampography-fluid-max) - var(--clampography-fluid-min)));
49
+ --clampography-h6-base: calc(var(--clampography-h6-min) - var(--clampography-h6-slope) * var(--clampography-fluid-min));
50
+ --clampography-h6-size: clamp(calc(var(--clampography-h6-min) * 1rem), calc(var(--clampography-h6-base) * 1rem + var(--clampography-h6-slope) * 100vw), calc(var(--clampography-h6-max) * 1rem));
51
+ --clampography-heading-scale: 1;
52
+ --clampography-h1-scale: var(--clampography-heading-scale);
53
+ --clampography-h2-scale: var(--clampography-heading-scale);
54
+ --clampography-h3-scale: var(--clampography-heading-scale);
55
+ --clampography-h4-scale: var(--clampography-heading-scale);
56
+ --clampography-h5-scale: var(--clampography-heading-scale);
57
+ --clampography-h6-scale: var(--clampography-heading-scale);
58
+ }
59
+
60
+ body {
61
+ font-size: clamp(0.875rem, 0.7917rem + 0.4167vw, 1.125rem);
62
+ line-height: 1.75;
63
+ text-rendering: optimizeLegibility;
64
+ -webkit-font-smoothing: antialiased;
65
+ -moz-osx-font-smoothing: grayscale;
66
+ text-wrap: pretty;
67
+ }
68
+
69
+ :root :where(h1, h2, h3, h4, h5, h6) {
70
+ font-weight: 600;
71
+ scroll-margin-top: var(--clampography-scroll-offset);
72
+ }
73
+
74
+ :root h1 {
75
+ font-size: calc(var(--clampography-h1-size) * var(--clampography-h1-scale));
76
+ line-height: 1.1111;
77
+ font-weight: 800;
78
+ margin-top: 0;
79
+ margin-bottom: var(--clampography-spacing-xl);
80
+ }
81
+
82
+ :root h2 {
83
+ font-size: calc(var(--clampography-h2-size) * var(--clampography-h2-scale));
84
+ line-height: 1.3333;
85
+ font-weight: 700;
86
+ margin-top: var(--clampography-spacing-xl);
87
+ margin-bottom: var(--clampography-spacing-md);
88
+ }
89
+
90
+ :root h3 {
91
+ font-size: calc(var(--clampography-h3-size) * var(--clampography-h3-scale));
92
+ line-height: 1.5;
93
+ margin-top: var(--clampography-spacing-lg);
94
+ margin-bottom: var(--clampography-spacing-sm);
95
+ }
96
+
97
+ :root h4 {
98
+ font-size: calc(var(--clampography-h4-size) * var(--clampography-h4-scale));
99
+ line-height: 1.5;
100
+ margin-top: var(--clampography-spacing-lg);
101
+ margin-bottom: var(--clampography-spacing-sm);
102
+ }
103
+
104
+ :root h5 {
105
+ font-size: calc(var(--clampography-h5-size) * var(--clampography-h5-scale));
106
+ line-height: 1.5;
107
+ margin-top: var(--clampography-spacing-md);
108
+ margin-bottom: var(--clampography-spacing-xs);
109
+ }
110
+
111
+ :root h6 {
112
+ font-size: calc(var(--clampography-h6-size) * var(--clampography-h6-scale));
113
+ line-height: 1.5;
114
+ margin-top: var(--clampography-spacing-md);
115
+ margin-bottom: var(--clampography-spacing-xs);
116
+ }
117
+
118
+ :root :is(h1, h2, h3, h4, h5, h6):first-child {
119
+ margin-top: 0;
120
+ }
121
+
122
+ :root a {
123
+ text-decoration-line: underline;
124
+ cursor: pointer;
125
+ }
126
+
127
+ :root :where(h1, h2, h3, h4, h5, h6) a {
128
+ text-decoration: none;
129
+ }
130
+
131
+ :root menu {
132
+ list-style: none;
133
+ margin-bottom: var(--clampography-spacing-md);
134
+ padding-inline-start: 0;
135
+ }
136
+
137
+ :root menu > li::before {
138
+ display: none;
139
+ }
140
+
141
+ :root hgroup {
142
+ margin-bottom: var(--clampography-spacing-lg);
143
+ }
144
+
145
+ :root hgroup :where(h1, h2, h3, h4, h5, h6) {
146
+ margin-bottom: var(--clampography-spacing-xs);
147
+ }
148
+
149
+ :root hgroup :where(p) {
150
+ margin-top: 0;
151
+ margin-bottom: 0;
152
+ font-size: 0.875em;
153
+ font-weight: 400;
154
+ line-height: 1.5;
155
+ }
156
+
157
+ :root p {
158
+ line-height: 1.75;
159
+ margin-bottom: var(--clampography-spacing-md);
160
+ }
161
+
162
+ :root :where(strong, b) {
163
+ font-weight: 700;
164
+ }
165
+
166
+ :root :where(em, i, cite, var) {
167
+ font-style: italic;
168
+ }
169
+
170
+ :root dfn {
171
+ font-style: italic;
172
+ font-weight: 600;
173
+ }
174
+
175
+ :root small {
176
+ font-size: 0.875em;
177
+ line-height: 1.5;
178
+ }
179
+
180
+ :root :where(code, kbd, samp) {
181
+ font-family: var(--clampography-font-mono);
182
+ font-size: 0.875em;
183
+ -webkit-font-smoothing: auto;
184
+ -moz-osx-font-smoothing: auto;
185
+ }
186
+
187
+ :root kbd {
188
+ font-weight: 600;
189
+ }
190
+
191
+ :root data {
192
+ font-variant-numeric: tabular-nums;
193
+ }
194
+
195
+ :root :where(sub, sup) {
196
+ font-size: 0.75em;
197
+ line-height: 0;
198
+ position: relative;
199
+ vertical-align: baseline;
200
+ }
201
+
202
+ :root sup {
203
+ top: -0.5em;
204
+ }
205
+
206
+ :root sub {
207
+ bottom: -0.25em;
208
+ }
209
+
210
+ :root abbr[title] {
211
+ text-decoration: underline dotted;
212
+ text-underline-offset: 4px;
213
+ cursor: help;
214
+ }
215
+
216
+ :root del {
217
+ text-decoration: line-through;
218
+ }
219
+
220
+ :root ins {
221
+ text-decoration: underline;
222
+ }
223
+
224
+ :root s {
225
+ text-decoration: line-through;
226
+ }
227
+
228
+ :root u {
229
+ text-decoration: underline;
230
+ }
231
+
232
+ :root mark {
233
+ font-style: normal;
234
+ font-weight: inherit;
235
+ }
236
+
237
+ :root address {
238
+ font-style: italic;
239
+ margin-top: var(--clampography-spacing-md);
240
+ margin-bottom: var(--clampography-spacing-md);
241
+ }
242
+
243
+ :root time {
244
+ font-style: normal;
245
+ font-variant-numeric: tabular-nums;
246
+ }
247
+
248
+ :root blockquote {
249
+ margin-top: var(--clampography-spacing-lg);
250
+ margin-bottom: var(--clampography-spacing-lg);
251
+ padding-inline-start: var(--clampography-spacing-md);
252
+ }
253
+
254
+ :root blockquote blockquote {
255
+ margin-top: var(--clampography-spacing-sm);
256
+ margin-bottom: var(--clampography-spacing-sm);
257
+ padding-inline-start: var(--clampography-spacing-sm);
258
+ }
259
+
260
+ :root q {
261
+ font-style: inherit;
262
+ }
263
+
264
+ :root :where(ul, ol) {
265
+ list-style: none;
266
+ margin-bottom: var(--clampography-spacing-md);
267
+ padding-inline-start: var(--clampography-list-indent);
268
+ }
269
+
270
+ :root li {
271
+ position: relative;
272
+ }
273
+
274
+ :root li + li {
275
+ margin-top: var(--clampography-spacing-xs);
276
+ }
277
+
278
+ :root li > :where(p, dl, figure, table, pre) {
279
+ margin-top: 0;
280
+ margin-bottom: 0;
281
+ }
282
+
283
+ :root li > blockquote {
284
+ margin-top: var(--clampography-spacing-sm);
285
+ margin-bottom: var(--clampography-spacing-sm);
286
+ }
287
+
288
+ :root li > :where(ul, ol) {
289
+ margin-top: var(--clampography-spacing-xs);
290
+ margin-bottom: 0;
291
+ }
292
+
293
+ :root ul > li::before {
294
+ content: '';
295
+ position: absolute;
296
+ inset-inline-end: 100%;
297
+ margin-inline-end: 0.75em;
298
+ top: 0.65em;
299
+ width: 0.375em;
300
+ height: 0.375em;
301
+ background-color: currentColor;
302
+ border-radius: 50%;
303
+ }
304
+
305
+ :root ol {
306
+ counter-reset: list-counter;
307
+ }
308
+
309
+ :root ol > li {
310
+ counter-increment: list-counter;
311
+ }
312
+
313
+ :root ol > li::before {
314
+ content: counter(list-counter) '.';
315
+ position: absolute;
316
+ inset-inline-end: 100%;
317
+ margin-inline-end: 0.5em;
318
+ font-weight: 600;
319
+ font-variant-numeric: tabular-nums;
320
+ text-align: end;
321
+ color: currentColor;
322
+ }
323
+
324
+ :root dl {
325
+ margin-top: var(--clampography-spacing-md);
326
+ margin-bottom: var(--clampography-spacing-md);
327
+ }
328
+
329
+ :root dt {
330
+ font-weight: 600;
331
+ margin-top: var(--clampography-spacing-sm);
332
+ }
333
+
334
+ :root dt:first-child {
335
+ margin-top: 0;
336
+ }
337
+
338
+ :root dd {
339
+ margin-inline-start: var(--clampography-spacing-md);
340
+ }
341
+
342
+ :root dt + dd {
343
+ margin-top: var(--clampography-spacing-xs);
344
+ }
345
+
346
+ :root dd + dd {
347
+ margin-top: var(--clampography-spacing-xs);
348
+ }
349
+
350
+ :root dd:last-child {
351
+ margin-bottom: 0;
352
+ }
353
+
354
+ :root pre {
355
+ margin-top: var(--clampography-spacing-md);
356
+ margin-bottom: var(--clampography-spacing-md);
357
+ font-family: var(--clampography-font-mono);
358
+ line-height: 1.6;
359
+ overflow-x: auto;
360
+ -webkit-font-smoothing: auto;
361
+ -moz-osx-font-smoothing: auto;
362
+ }
363
+
364
+ :root pre code {
365
+ font-size: inherit;
366
+ padding: 0;
367
+ background: none;
368
+ border-radius: 0;
369
+ }
370
+
371
+ :root input, :root button, :root textarea, :root select, :root optgroup {
372
+ font-family: inherit;
373
+ font-size: 100%;
374
+ line-height: inherit;
375
+ }
376
+
377
+ :root textarea {
378
+ line-height: 1.5;
379
+ }
380
+
381
+ :root button, :root [type='button'], :root [type='reset'], :root [type='submit'] {
382
+ cursor: pointer;
383
+ }
384
+
385
+ :root fieldset {
386
+ margin-top: var(--clampography-spacing-md);
387
+ margin-bottom: var(--clampography-spacing-md);
388
+ padding: var(--clampography-spacing-sm);
389
+ }
390
+
391
+ :root legend {
392
+ font-weight: 600;
393
+ padding: 0 var(--clampography-spacing-xs);
394
+ }
395
+
396
+ :root label {
397
+ display: inline-block;
398
+ font-weight: 600;
399
+ margin-bottom: var(--clampography-spacing-xs);
400
+ }
401
+
402
+ :root output {
403
+ display: inline-block;
404
+ font-variant-numeric: tabular-nums;
405
+ }
406
+
407
+ :root :where(meter, progress) {
408
+ display: inline-block;
409
+ vertical-align: middle;
410
+ }
411
+
412
+ :root :where(img, video, canvas, audio, iframe, svg) {
413
+ max-width: 100%;
414
+ height: auto;
415
+ vertical-align: middle;
416
+ }
417
+
418
+ :root figure {
419
+ margin-top: var(--clampography-spacing-lg);
420
+ margin-bottom: var(--clampography-spacing-lg);
421
+ }
422
+
423
+ :root figcaption {
424
+ margin-top: 0.375rem;
425
+ font-size: 0.875em;
426
+ line-height: 1.5;
427
+ }
428
+
429
+ :root table {
430
+ width: 100%;
431
+ margin-top: var(--clampography-spacing-md);
432
+ margin-bottom: var(--clampography-spacing-md);
433
+ border-collapse: collapse;
434
+ font-size: 1em;
435
+ line-height: 1.6;
436
+ }
437
+
438
+ :root caption {
439
+ margin-bottom: var(--clampography-spacing-xs);
440
+ font-size: 0.875em;
441
+ font-weight: 600;
442
+ text-align: start;
443
+ }
444
+
445
+ :root th, :root td {
446
+ padding: var(--clampography-spacing-xs) var(--clampography-spacing-sm);
447
+ text-align: start;
448
+ }
449
+
450
+ :root th {
451
+ font-weight: 600;
452
+ }
453
+
454
+ :root thead th {
455
+ vertical-align: bottom;
456
+ }
457
+
458
+ :root tbody th, :root tbody td {
459
+ vertical-align: top;
460
+ }
461
+
462
+ :root tfoot th, :root tfoot td {
463
+ vertical-align: top;
464
+ }
465
+
466
+ :root tbody + tbody {
467
+ border-top-width: 2px;
468
+ }
469
+
470
+ :root hr {
471
+ margin-top: var(--clampography-spacing-xl);
472
+ margin-bottom: var(--clampography-spacing-xl);
473
+ border: 0;
474
+ border-top: 1px solid;
475
+ }
476
+
477
+ :root :where(:focus, :focus-visible) {
478
+ outline-offset: 2px;
479
+ }
480
+
481
+ :root details {
482
+ margin-top: var(--clampography-spacing-md);
483
+ margin-bottom: var(--clampography-spacing-md);
484
+ }
485
+
486
+ :root summary {
487
+ cursor: pointer;
488
+ font-weight: 600;
489
+ }
490
+
491
+ :root details[open] > summary {
492
+ margin-bottom: var(--clampography-spacing-xs);
493
+ }
494
+
495
+ :root dialog {
496
+ font-size: inherit;
497
+ line-height: inherit;
498
+ }
499
+
500
+ :root :where(h1, h2, h3, h4, h5, h6, p, ul:not(li > ul, li > ol), ol:not(li > ul, li > ol), dl, blockquote, figure, table, pre):first-child {
501
+ margin-top: 0;
502
+ }
503
+
504
+ :root :where(p, ul, ol, dl, blockquote, figure, table, pre):last-child {
505
+ margin-bottom: 0;
506
+ }
507
+ }
508
+
509
+ /* --- theme.js --- */
510
+ @layer base {
511
+
512
+ :where(:root) {
513
+ color-scheme: light;
514
+ --clampography-background: oklch(100.0% 0.000 89.9);
515
+ --clampography-border: oklch(94.6% 0.000 89.9);
516
+ --clampography-error: oklch(65.4% 0.229 27.0);
517
+ --clampography-heading: oklch(15.0% 0.021 264.3);
518
+ --clampography-info: oklch(68.3% 0.166 259.7);
519
+ --clampography-link: oklch(60.3% 0.216 259.8);
520
+ --clampography-muted: oklch(51.9% 0.014 259.8);
521
+ --clampography-primary: oklch(60.3% 0.216 259.8);
522
+ --clampography-secondary: oklch(54.9% 0.280 300.0);
523
+ --clampography-success: oklch(75.8% 0.166 161.7);
524
+ --clampography-surface: oklch(98.5% 0.000 89.9);
525
+ --clampography-text: oklch(31.1% 0.020 257.3);
526
+ --clampography-warning: oklch(79.9% 0.136 72.2);
527
+ }
528
+
529
+ @media (prefers-color-scheme: dark) {
530
+
531
+ :root {
532
+ color-scheme: dark;
533
+ --clampography-background: oklch(13.3% 0.016 284.0);
534
+ --clampography-border: oklch(43.4% 0.006 258.3);
535
+ --clampography-error: oklch(62.9% 0.220 27.0);
536
+ --clampography-heading: oklch(94.6% 0.000 89.9);
537
+ --clampography-info: oklch(71.2% 0.155 251.4);
538
+ --clampography-link: oklch(75.3% 0.133 248.6);
539
+ --clampography-muted: oklch(68.9% 0.006 264.5);
540
+ --clampography-primary: oklch(75.3% 0.133 248.6);
541
+ --clampography-secondary: oklch(62.6% 0.243 301.2);
542
+ --clampography-success: oklch(66.3% 0.148 160.6);
543
+ --clampography-surface: oklch(21.2% 0.009 255.6);
544
+ --clampography-text: oklch(88.8% 0.007 268.5);
545
+ --clampography-warning: oklch(72.1% 0.164 63.1);
546
+ }
547
+ }
548
+
549
+ [data-theme="dark"] {
550
+ color-scheme: dark;
551
+ --clampography-background: oklch(13.3% 0.016 284.0);
552
+ --clampography-border: oklch(43.4% 0.006 258.3);
553
+ --clampography-error: oklch(62.9% 0.220 27.0);
554
+ --clampography-heading: oklch(94.6% 0.000 89.9);
555
+ --clampography-info: oklch(71.2% 0.155 251.4);
556
+ --clampography-link: oklch(75.3% 0.133 248.6);
557
+ --clampography-muted: oklch(68.9% 0.006 264.5);
558
+ --clampography-primary: oklch(75.3% 0.133 248.6);
559
+ --clampography-secondary: oklch(62.6% 0.243 301.2);
560
+ --clampography-success: oklch(66.3% 0.148 160.6);
561
+ --clampography-surface: oklch(21.2% 0.009 255.6);
562
+ --clampography-text: oklch(88.8% 0.007 268.5);
563
+ --clampography-warning: oklch(72.1% 0.164 63.1);
564
+ }
565
+
566
+ [data-theme="light"] {
567
+ color-scheme: light;
568
+ --clampography-background: oklch(100.0% 0.000 89.9);
569
+ --clampography-border: oklch(94.6% 0.000 89.9);
570
+ --clampography-error: oklch(65.4% 0.229 27.0);
571
+ --clampography-heading: oklch(15.0% 0.021 264.3);
572
+ --clampography-info: oklch(68.3% 0.166 259.7);
573
+ --clampography-link: oklch(60.3% 0.216 259.8);
574
+ --clampography-muted: oklch(51.9% 0.014 259.8);
575
+ --clampography-primary: oklch(60.3% 0.216 259.8);
576
+ --clampography-secondary: oklch(54.9% 0.280 300.0);
577
+ --clampography-success: oklch(75.8% 0.166 161.7);
578
+ --clampography-surface: oklch(98.5% 0.000 89.9);
579
+ --clampography-text: oklch(31.1% 0.020 257.3);
580
+ --clampography-warning: oklch(79.9% 0.136 72.2);
581
+ }
582
+ }
583
+
584
+ /* --- extra.js --- */
585
+ @layer base {
586
+
587
+ :where(:root) {
588
+ --clampography-transition-duration: 200ms;
589
+ }
590
+
591
+ body {
592
+ background-color: var(--clampography-background);
593
+ color: var(--clampography-text);
594
+ font-family: var(--font-sans, var(--clampography-font-base));
595
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
596
+ transition-duration: var(--clampography-transition-duration, 200ms);
597
+ transition-timing-function: ease;
598
+ }
599
+
600
+ :root :where(h1, h2, h3, h4, h5, h6) {
601
+ color: var(--clampography-heading);
602
+ }
603
+
604
+ :root a {
605
+ color: var(--clampography-link);
606
+ font-weight: 600;
607
+ letter-spacing: 0.025em;
608
+ text-decoration-line: underline;
609
+ text-decoration-thickness: 2px;
610
+ text-underline-offset: 4px;
611
+ text-decoration-color: color-mix(in oklab, var(--clampography-link) 30%, transparent);
612
+ transition-property: color, text-decoration-color;
613
+ transition-duration: 150ms;
614
+ }
615
+
616
+ :root a:hover {
617
+ text-decoration-color: var(--clampography-link);
618
+ }
619
+
620
+ :root ul > li::before {
621
+ background-color: var(--clampography-primary);
622
+ }
623
+
624
+ :root ol > li::before {
625
+ color: var(--clampography-primary);
626
+ }
627
+
628
+ :root :where(code:not(pre code), kbd, samp) {
629
+ background-color: var(--clampography-surface);
630
+ color: var(--clampography-heading);
631
+ border: 1px solid var(--clampography-border);
632
+ border-radius: 0.25rem;
633
+ padding: 0.125rem var(--clampography-spacing-xs);
634
+ white-space: nowrap;
635
+ }
636
+
637
+ :root kbd {
638
+ transform: translateY(-0.15em);
639
+ }
640
+
641
+ :root pre {
642
+ background-color: var(--clampography-surface);
643
+ border: 1px solid var(--clampography-border);
644
+ border-radius: 0.375rem;
645
+ padding: var(--clampography-spacing-md);
646
+ }
647
+
648
+ :root table {
649
+ padding: var(--clampography-spacing-sm);
650
+ border: 1px solid var(--clampography-border);
651
+ }
652
+
653
+ :root th {
654
+ color: var(--clampography-heading);
655
+ }
656
+
657
+ :root th, :root td {
658
+ border: 1px solid var(--clampography-border);
659
+ }
660
+
661
+ :root thead th {
662
+ border-bottom-width: 2px;
663
+ }
664
+
665
+ :root tbody tr:nth-child(even) {
666
+ background-color: var(--clampography-surface);
667
+ }
668
+
669
+ :root caption, :root figcaption, :root .muted {
670
+ color: var(--clampography-muted);
671
+ }
672
+
673
+ :root hr {
674
+ height: 1px;
675
+ border-width: 0;
676
+ margin-top: var(--clampography-spacing-xl);
677
+ margin-bottom: var(--clampography-spacing-xl);
678
+ background-color: var(--clampography-border);
679
+ }
680
+
681
+ :root blockquote {
682
+ border-inline-start-width: 4px;
683
+ border-inline-start-color: var(--clampography-primary);
684
+ background-color: var(--clampography-surface);
685
+ padding: var(--clampography-spacing-md);
686
+ border-radius: 0.25rem;
687
+ font-style: italic;
688
+ color: var(--clampography-heading);
689
+ }
690
+
691
+ :root mark {
692
+ background-color: var(--clampography-primary);
693
+ color: var(--clampography-background);
694
+ padding: 0.125rem var(--clampography-spacing-xs);
695
+ border-radius: 0.25rem;
696
+ }
697
+
698
+ :root del {
699
+ text-decoration-color: var(--clampography-error);
700
+ text-decoration-thickness: 2px;
701
+ }
702
+
703
+ :root details {
704
+ border: 1px solid var(--clampography-border);
705
+ border-radius: 0.375rem;
706
+ padding: var(--clampography-spacing-sm);
707
+ }
708
+
709
+ :root summary {
710
+ color: var(--clampography-heading);
711
+ border-bottom: 0px solid var(--clampography-border);
712
+ }
713
+
714
+ :root details[open] > summary {
715
+ border-bottom-width: 1px;
716
+ padding-bottom: var(--clampography-spacing-sm);
717
+ }
718
+
719
+ @media (prefers-reduced-motion: reduce) {
720
+
721
+ body {
722
+ transition: none;
723
+ --clampography-transition-duration: 0ms;
724
+ }
725
+ }
726
+
727
+ @media (prefers-contrast: more) {
728
+
729
+ body {
730
+ background-color: white;
731
+ color: black;
732
+ }
733
+
734
+ :root :where(h1, h2, h3, h4, h5, h6) {
735
+ color: black;
736
+ }
737
+
738
+ :root a {
739
+ color: black;
740
+ text-decoration: underline;
741
+ text-decoration-thickness: 2px;
742
+ font-weight: 700;
743
+ }
744
+
745
+ :root :where(code:not(pre code), kbd, samp) {
746
+ background-color: #f0f0f0;
747
+ color: black;
748
+ border: 2px solid black;
749
+ }
750
+
751
+ :root pre {
752
+ background-color: #f0f0f0;
753
+ color: black;
754
+ border: 2px solid black;
755
+ }
756
+
757
+ :root blockquote {
758
+ background-color: #f0f0f0;
759
+ border-inline-start-color: black;
760
+ border-inline-start-width: 6px;
761
+ color: black;
762
+ }
763
+
764
+ :root th, :root td {
765
+ border: 2px solid black;
766
+ }
767
+
768
+ :root hr {
769
+ background-color: black;
770
+ height: 2px;
771
+ }
772
+ }
773
+ }
774
+
775
+ /* --- forms.js --- */
776
+ @layer base {
777
+
778
+ :root :where(button, [type='button'], [type='reset'], [type='submit']) {
779
+ display: inline-flex;
780
+ align-items: center;
781
+ justify-content: center;
782
+ gap: 0.375em;
783
+ padding: var(--clampography-spacing-xs) var(--clampography-spacing-sm);
784
+ background-color: var(--clampography-surface);
785
+ color: var(--clampography-text);
786
+ border: 1px solid var(--clampography-border);
787
+ border-radius: 0.375rem;
788
+ font-weight: 500;
789
+ white-space: nowrap;
790
+ transition-property: background-color, border-color, color, box-shadow;
791
+ transition-duration: 150ms;
792
+ }
793
+
794
+ :root :where(button, [type='button'], [type='reset'], [type='submit']):hover {
795
+ background-color: var(--clampography-background);
796
+ border-color: var(--clampography-primary);
797
+ }
798
+
799
+ :root :where(button, [type='button'], [type='submit']).primary, :root [type='submit'] {
800
+ background-color: var(--clampography-primary);
801
+ color: var(--clampography-background);
802
+ border-color: var(--clampography-primary);
803
+ }
804
+
805
+ :root :where(button, [type='button'], [type='submit']).primary:hover, :root [type='submit']:hover {
806
+ filter: brightness(1.1);
807
+ }
808
+
809
+ :root :where(input:not([type='checkbox'], [type='radio'], [type='range'], [type='color']), textarea, select) {
810
+ display: block;
811
+ width: 100%;
812
+ padding: var(--clampography-spacing-xs) var(--clampography-spacing-sm);
813
+ background-color: var(--clampography-background);
814
+ color: var(--clampography-text);
815
+ border: 1px solid var(--clampography-border);
816
+ border-radius: 0.375rem;
817
+ transition-property: border-color, box-shadow;
818
+ transition-duration: 150ms;
819
+ }
820
+
821
+ :root :where(input:not([type='checkbox'], [type='radio'], [type='range'], [type='color']), textarea, select):focus {
822
+ outline: none;
823
+ border-color: var(--clampography-primary);
824
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--clampography-primary) 20%, transparent);
825
+ }
826
+
827
+ :root :where(input, textarea, select):disabled {
828
+ opacity: 0.5;
829
+ cursor: not-allowed;
830
+ }
831
+
832
+ :root :where(input, textarea, select)[readonly] {
833
+ background-color: color-mix(in oklab, var(--clampography-surface) 50%, transparent);
834
+ cursor: default;
835
+ }
836
+
837
+ :root :where(input, textarea, select):user-invalid {
838
+ border-color: var(--clampography-error);
839
+ }
840
+
841
+ :root :where(input, textarea, select):user-invalid:focus {
842
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--clampography-error) 20%, transparent);
843
+ }
844
+
845
+ :root [type='search']::-webkit-search-cancel-button, :root [type='search']::-webkit-search-decoration {
846
+ -webkit-appearance: none;
847
+ appearance: none;
848
+ }
849
+
850
+ :root [type='number']::-webkit-inner-spin-button, :root [type='number']::-webkit-outer-spin-button {
851
+ height: auto;
852
+ }
853
+
854
+ :root :where(input, textarea, select)::placeholder {
855
+ color: var(--clampography-muted);
856
+ }
857
+
858
+ :root select {
859
+ appearance: none;
860
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
861
+ background-position: inline-end 0.5rem center;
862
+ background-repeat: no-repeat;
863
+ background-size: 1.5em 1.5em;
864
+ padding-inline-end: 2.5rem;
865
+ }
866
+
867
+ :root [type='file'] {
868
+ padding: 0;
869
+ background-color: transparent;
870
+ border: none;
871
+ cursor: pointer;
872
+ }
873
+
874
+ :root [type='file']::file-selector-button {
875
+ display: inline-flex;
876
+ align-items: center;
877
+ padding: var(--clampography-spacing-xs) var(--clampography-spacing-sm);
878
+ margin-inline-end: var(--clampography-spacing-sm);
879
+ background-color: var(--clampography-surface);
880
+ color: var(--clampography-text);
881
+ border: 1px solid var(--clampography-border);
882
+ border-radius: 0.375rem;
883
+ font-family: inherit;
884
+ font-size: inherit;
885
+ cursor: pointer;
886
+ transition-property: background-color, border-color;
887
+ transition-duration: 150ms;
888
+ }
889
+
890
+ :root [type='file']:hover::file-selector-button {
891
+ background-color: var(--clampography-background);
892
+ border-color: var(--clampography-primary);
893
+ }
894
+
895
+ :root [type='checkbox'], :root [type='radio'] {
896
+ width: 1em;
897
+ height: 1em;
898
+ accent-color: var(--clampography-primary);
899
+ vertical-align: middle;
900
+ cursor: pointer;
901
+ }
902
+
903
+ :root [type='checkbox']:focus-visible, :root [type='radio']:focus-visible {
904
+ outline: 2px solid var(--clampography-primary);
905
+ outline-offset: 2px;
906
+ }
907
+
908
+ :root [type='range'] {
909
+ accent-color: var(--clampography-primary);
910
+ width: 100%;
911
+ cursor: pointer;
912
+ }
913
+
914
+ :root [type='color'] {
915
+ padding: 0.125rem;
916
+ width: 2.5rem;
917
+ height: 2.5rem;
918
+ border: 1px solid var(--clampography-border);
919
+ border-radius: 0.375rem;
920
+ background-color: var(--clampography-background);
921
+ cursor: pointer;
922
+ }
923
+
924
+ :root fieldset {
925
+ border: 1px solid var(--clampography-border);
926
+ border-radius: 0.5rem;
927
+ background-color: var(--clampography-surface);
928
+ }
929
+
930
+ :root legend {
931
+ color: var(--clampography-heading);
932
+ }
933
+
934
+ :root label {
935
+ color: var(--clampography-text);
936
+ }
937
+
938
+ :root output {
939
+ color: var(--clampography-primary);
940
+ font-weight: 600;
941
+ }
942
+
943
+ :root progress {
944
+ -webkit-appearance: none;
945
+ appearance: none;
946
+ width: 100%;
947
+ height: 1em;
948
+ background: transparent;
949
+ }
950
+
951
+ :root progress::-webkit-progress-bar {
952
+ background: color-mix(in oklab, var(--clampography-text) 20%, transparent);
953
+ }
954
+
955
+ :root progress::-webkit-progress-value {
956
+ background: var(--clampography-success);
957
+ }
958
+
959
+ :root progress::-moz-progress-bar {
960
+ background: var(--clampography-success);
961
+ }
962
+
963
+ :root meter {
964
+ -webkit-appearance: none;
965
+ appearance: none;
966
+ width: 100%;
967
+ height: 1em;
968
+ background: transparent;
969
+ }
970
+
971
+ @supports (-moz-appearance: none) {
972
+
973
+ :root progress {
974
+ background: color-mix(in oklab, var(--clampography-text) 20%, transparent);
975
+ }
976
+
977
+ :root meter {
978
+ background: color-mix(in oklab, var(--clampography-text) 20%, transparent);
979
+ }
980
+ }
981
+
982
+ :root meter::-webkit-meter-inner-element {
983
+ display: flex;
984
+ align-items: stretch;
985
+ height: 1em;
986
+ }
987
+
988
+ :root meter::-webkit-meter-bar {
989
+ background: color-mix(in oklab, var(--clampography-text) 20%, transparent);
990
+ height: 100%;
991
+ }
992
+
993
+ :root meter::-webkit-meter-optimum-value {
994
+ background: var(--clampography-success);
995
+ height: 100%;
996
+ }
997
+
998
+ :root meter:-moz-meter-optimum::-moz-meter-bar {
999
+ background: var(--clampography-success);
1000
+ }
1001
+
1002
+ :root meter::-webkit-meter-suboptimum-value {
1003
+ background: var(--clampography-warning);
1004
+ height: 100%;
1005
+ }
1006
+
1007
+ :root meter:-moz-meter-sub-optimum::-moz-meter-bar {
1008
+ background: var(--clampography-warning);
1009
+ }
1010
+
1011
+ :root meter::-webkit-meter-even-less-good-value {
1012
+ background: var(--clampography-error);
1013
+ height: 100%;
1014
+ }
1015
+
1016
+ :root meter:-moz-meter-sub-sub-optimum::-moz-meter-bar {
1017
+ background: var(--clampography-error);
1018
+ }
1019
+ }
1020
+
1021
+ /* --- kbd.js --- */
1022
+ @layer base {
1023
+
1024
+ :root kbd {
1025
+ display: inline-block;
1026
+ padding: 0.1em 0.45em;
1027
+ min-width: 2em;
1028
+ text-align: center;
1029
+ font-size: 0.8em;
1030
+ font-weight: 700;
1031
+ line-height: 1.5;
1032
+ white-space: nowrap;
1033
+ vertical-align: 0.1em;
1034
+ cursor: default;
1035
+ user-select: none;
1036
+ background-color: var(--clampography-surface, oklch(94% 0.004 264));
1037
+ color: var(--clampography-text, oklch(18% 0.015 264));
1038
+ border: 1px solid var(--clampography-border, oklch(76% 0.008 264));
1039
+ border-radius: 4px;
1040
+ box-shadow: 0 2px 0 color-mix(in oklab, var(--clampography-border, oklch(60% 0.008 264)) 100%, black 18%), 0 3px 2px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5);
1041
+ transition-property: box-shadow, transform, border-bottom-width;
1042
+ transition-duration: 80ms;
1043
+ }
1044
+
1045
+ :root kbd:active {
1046
+ transform: translateY(2px);
1047
+ box-shadow: 0 0 0 color-mix(in oklab, var(--clampography-border, oklch(60% 0.008 264)) 100%, black 18%), 0 1px 1px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.3);
1048
+ }
1049
+ }
1050
+