clampography 2.0.0-beta.2 → 2.0.0-beta.21

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.
package/src/base.js CHANGED
@@ -1,11 +1,40 @@
1
- /**
2
- * Base typography and layout styles (structure only, no colors).
3
- * Converted from base.css.
4
- */
5
- export default {
6
- // Global CSS Variables (Spacing & Fonts)
7
- "@layer base": {
8
- ":root": {
1
+ export default (options = {}) => {
2
+ const root = options.root || ":root";
3
+
4
+ // Helper to scope selectors safely (ignoring commas inside parentheses)
5
+ const scope = (selector) => {
6
+ const parts = [];
7
+ let current = "";
8
+ let depth = 0;
9
+
10
+ for (let i = 0; i < selector.length; i++) {
11
+ const char = selector[i];
12
+ if (char === "(") depth++;
13
+ if (char === ")") depth--;
14
+
15
+ if (char === "," && depth === 0) {
16
+ parts.push(current.trim());
17
+ current = "";
18
+ } else {
19
+ current += char;
20
+ }
21
+ }
22
+ parts.push(current.trim());
23
+
24
+ return parts
25
+ .filter(Boolean) // Remove empty strings
26
+ .map((part) => {
27
+ if (part === ":root" || part === "body") return root;
28
+ // Avoid double spacing
29
+ return `${root} ${part}`;
30
+ })
31
+ .join(", ");
32
+ };
33
+
34
+ return {
35
+ // ROOT CONFIGURATION
36
+ [root]: {
37
+ "--spacing-xs": "clamp(0.5rem, 0.375rem + 0.625vw, 0.75rem)",
9
38
  "--spacing-sm": "clamp(0.75rem, 0.5625rem + 0.9375vw, 1.25rem)",
10
39
  "--spacing-md": "clamp(1rem, 0.75rem + 1.25vw, 1.5rem)",
11
40
  "--spacing-lg": "clamp(1.5rem, 1.125rem + 1.875vw, 2.5rem)",
@@ -15,418 +44,459 @@ export default {
15
44
  "system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif",
16
45
  "--font-family-mono":
17
46
  "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
47
+
48
+ // Body styles applied to the root container
49
+ "font-family": "var(--font-family-base)",
50
+ "font-size": "clamp(1rem, 0.95rem + 0.25vw, 1.125rem)",
51
+ "line-height": "1.75",
52
+ "text-rendering": "optimizeLegibility",
53
+ "-webkit-font-smoothing": "antialiased",
54
+ "-moz-osx-font-smoothing": "grayscale",
55
+ "text-wrap": "pretty",
56
+ },
57
+
58
+ // HEADINGS (H1-H6)
59
+ [scope(":where(h1, h2, h3, h4, h5, h6)")]: {
60
+ "font-weight": "600",
61
+ "scroll-margin-top": "var(--scroll-offset)",
62
+ },
63
+
64
+ [scope("h1")]: {
65
+ "font-size": "clamp(2.25rem, 1.95rem + 1.5vw, 3rem)",
66
+ "line-height": "1.1111",
67
+ "font-weight": "800",
68
+ "margin-top": "0",
69
+ "margin-bottom": "var(--spacing-xl)",
70
+ },
71
+
72
+ [scope("h2")]: {
73
+ "font-size": "clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem)",
74
+ "line-height": "1.3333",
75
+ "font-weight": "700",
76
+ "margin-top": "var(--spacing-xl)",
77
+ "margin-bottom": "var(--spacing-md)",
78
+ },
79
+
80
+ [scope("h3")]: {
81
+ "font-size": "clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem)",
82
+ "line-height": "1.5",
83
+ "margin-top": "var(--spacing-lg)",
84
+ "margin-bottom": "var(--spacing-sm)",
85
+ },
86
+
87
+ [scope("h4")]: {
88
+ "font-size": "clamp(1rem, 0.975rem + 0.125vw, 1.125rem)",
89
+ "line-height": "1.5",
90
+ "margin-top": "var(--spacing-lg)",
91
+ "margin-bottom": "var(--spacing-sm)",
92
+ },
93
+
94
+ [scope("h5")]: {
95
+ "font-size": "1rem",
96
+ "line-height": "1.5",
97
+ "margin-top": "var(--spacing-md)",
98
+ "margin-bottom": "var(--spacing-xs)",
99
+ },
100
+
101
+ [scope("h6")]: {
102
+ "font-size": "0.875rem",
103
+ "line-height": "1.5",
104
+ "margin-top": "var(--spacing-md)",
105
+ "margin-bottom": "var(--spacing-xs)",
106
+ },
107
+
108
+ [scope(":is(h1, h2, h3, h4, h5, h6):first-child")]: {
109
+ "margin-top": "0",
110
+ },
111
+
112
+ // LINKS
113
+ [scope("a")]: {
114
+ "text-decoration-line": "underline",
115
+ cursor: "pointer",
116
+ },
117
+
118
+ [scope(":where(h1, h2, h3, h4, h5, h6) a")]: {
119
+ "text-decoration": "none",
120
+ },
121
+
122
+ // MENU
123
+ [scope("menu")]: {
124
+ "list-style": "none",
125
+ "margin-bottom": "var(--spacing-md)",
126
+ "padding-left": "0",
127
+ },
128
+
129
+ [scope("menu > li::before")]: {
130
+ display: "none",
131
+ },
132
+
133
+ // HGROUP
134
+ [scope("hgroup")]: {
135
+ "margin-bottom": "var(--spacing-lg)",
136
+ },
137
+
138
+ [scope("hgroup :where(h1, h2, h3, h4, h5, h6)")]: {
139
+ "margin-bottom": "var(--spacing-xs)",
140
+ },
141
+
142
+ [scope("hgroup :where(p)")]: {
143
+ "margin-top": "0",
144
+ "margin-bottom": "0",
145
+ "font-size": "0.875em",
146
+ "font-weight": "400",
147
+ "line-height": "1.5",
148
+ },
149
+
150
+ // TEXT CONTENT
151
+ [scope("p")]: {
152
+ "line-height": "1.75",
153
+ "margin-bottom": "var(--spacing-md)",
154
+ },
155
+
156
+ [scope(":where(strong, b)")]: {
157
+ "font-weight": "700",
158
+ },
159
+
160
+ [scope(":where(em, i, cite, var)")]: {
161
+ "font-style": "italic",
162
+ },
163
+
164
+ [scope("dfn")]: {
165
+ "font-style": "italic",
166
+ "font-weight": "600",
167
+ },
168
+
169
+ [scope("small")]: {
170
+ "font-size": "0.875em",
171
+ "line-height": "1.5",
172
+ },
173
+
174
+ [scope(":where(code, kbd, samp)")]: {
175
+ "font-family": "var(--font-family-mono)",
176
+ "font-size": "0.875em",
177
+ },
178
+
179
+ [scope("kbd")]: {
180
+ "font-weight": "600",
181
+ },
182
+
183
+ [scope("data")]: {
184
+ "font-variant-numeric": "tabular-nums",
185
+ },
186
+
187
+ [scope(":where(sub, sup)")]: {
188
+ "font-size": "0.75em",
189
+ "line-height": "0",
190
+ position: "relative",
191
+ "vertical-align": "baseline",
192
+ },
193
+
194
+ [scope("sup")]: {
195
+ top: "-0.5em",
196
+ },
197
+
198
+ [scope("sub")]: {
199
+ bottom: "-0.25em",
200
+ },
201
+
202
+ [scope("abbr[title]")]: {
203
+ "text-decoration": "underline dotted",
204
+ cursor: "help",
205
+ },
206
+
207
+ [scope("del")]: {
208
+ "text-decoration": "line-through",
209
+ },
210
+
211
+ [scope("ins")]: {
212
+ "text-decoration": "underline",
213
+ },
214
+
215
+ [scope("s")]: {
216
+ "text-decoration": "line-through",
217
+ },
218
+
219
+ [scope("u")]: {
220
+ "text-decoration": "underline",
221
+ },
222
+
223
+ [scope("mark")]: {
224
+ "font-style": "normal",
225
+ "font-weight": "inherit",
226
+ },
227
+
228
+ [scope("address")]: {
229
+ "font-style": "italic",
230
+ "margin-top": "var(--spacing-md)",
231
+ "margin-bottom": "var(--spacing-md)",
232
+ },
233
+
234
+ [scope("time")]: {
235
+ "font-style": "normal",
236
+ "font-variant-numeric": "tabular-nums",
237
+ },
238
+
239
+ // BLOCKQUOTES
240
+ [scope("blockquote")]: {
241
+ "margin-top": "var(--spacing-lg)",
242
+ "margin-bottom": "var(--spacing-lg)",
243
+ "padding-left": "var(--spacing-md)",
244
+ },
245
+
246
+ [scope("blockquote blockquote")]: {
247
+ "margin-top": "var(--spacing-sm)",
248
+ "margin-bottom": "var(--spacing-sm)",
249
+ "padding-left": "var(--spacing-sm)",
250
+ },
251
+
252
+ [scope("q")]: {
253
+ "font-style": "inherit",
254
+ },
255
+
256
+ // LISTS
257
+ [scope(":where(ul, ol)")]: {
258
+ "list-style": "none",
259
+ "margin-bottom": "var(--spacing-md)",
260
+ "padding-left": "clamp(1.5rem, 1.25rem + 1.25vw, 2rem)",
261
+ },
262
+
263
+ [scope("li")]: {
264
+ position: "relative",
265
+ "padding-left": "0.375em",
266
+ },
267
+
268
+ [scope("li + li")]: {
269
+ "margin-top": "var(--spacing-xs)",
18
270
  },
19
- },
20
-
21
- // Body Structure
22
- "body": {
23
- "font-family": "var(--font-family-base)",
24
- "font-size": "clamp(1rem, 0.95rem + 0.25vw, 1.125rem)",
25
- "line-height": "1.75",
26
- "text-rendering": "optimizeLegibility",
27
- "-webkit-font-smoothing": "antialiased",
28
- "-moz-osx-font-smoothing": "grayscale",
29
- "text-wrap": "pretty",
30
- },
31
-
32
- // Headings Structure
33
- ":where(h1, h2, h3, h4, h5, h6)": {
34
- "font-weight": "700",
35
- "scroll-margin-top": "var(--scroll-offset)",
36
- "font-size": "1rem",
37
- "line-height": "1.5",
38
- "margin-top": "0",
39
- "margin-bottom": "var(--spacing-xs)",
40
- "text-decoration": "none",
41
- "break-after": "avoid",
42
- },
43
-
44
- "h1": {
45
- "font-size": "clamp(2.25rem, 1.95rem + 1.5vw, 3rem)",
46
- "line-height": "1.1111",
47
- "font-weight": "800",
48
- "margin-top": "0",
49
- "margin-bottom": "var(--spacing-xl)",
50
- },
51
-
52
- "h6": {
53
- "font-size": "0.875rem",
54
- "line-height": "1.5",
55
- "margin-top": "0",
56
- "margin-bottom": "var(--spacing-xs)",
57
- },
58
-
59
- // Links
60
- "a": {
61
- "text-decoration-line": "underline",
62
- "text-decoration-thickness": "0.0625em",
63
- "text-underline-offset": "0.15em",
64
- "cursor": "pointer",
65
- "text-decoration": "underline",
66
- },
67
-
68
- ":where(h1, h2, h3, h4, h5, h6) a": {
69
- "text-decoration": "none",
70
- },
71
-
72
- // Lists & Menus
73
- "menu": {
74
- "list-style": "none",
75
- "margin-bottom": "var(--spacing-md)",
76
- "padding-left": "0",
77
- },
78
-
79
- "menu > li::before": {
80
- "display": "none",
81
- },
82
-
83
- "hgroup": {
84
- "margin-bottom": "var(--spacing-lg)",
85
- },
86
-
87
- "hgroup :where(h1, h2, h3, h4, h5, h6)": {
88
- "margin-bottom": "var(--spacing-xs)",
89
- },
90
-
91
- "hgroup :where(p)": {
92
- "margin-top": "0",
93
- "margin-bottom": "0",
94
- "font-size": "0.875em",
95
- "font-weight": "400",
96
- "line-height": "1.5",
97
- },
98
-
99
- "p": {
100
- "line-height": "1.75",
101
- "margin-bottom": "var(--spacing-md)",
102
- "margin-top": "0",
103
- },
104
-
105
- // Inline elements
106
- ":where(strong, b)": {
107
- "font-weight": "700",
108
- },
109
-
110
- ":where(em, i, cite, var)": {
111
- "font-style": "italic",
112
- },
113
-
114
- "dfn": {
115
- "font-style": "normal",
116
- "font-weight": "600",
117
- },
118
-
119
- "small": {
120
- "font-size": "0.875em",
121
- "line-height": "1.5",
122
- },
123
-
124
- ":where(code, kbd, samp)": {
125
- "font-family": "var(--font-family-mono)",
126
- "padding":
127
- "clamp(0.0625rem, 0.05rem + 0.0625vw, 0.125rem) clamp(0.1875rem, 0.15rem + 0.1875vw, 0.3125rem)",
128
- },
129
-
130
- ":where(code:not(pre code))": {
131
- "padding":
132
- "clamp(0.0625rem, 0.05rem + 0.0625vw, 0.125rem) clamp(0.1875rem, 0.15rem + 0.1875vw, 0.3125rem)",
133
- },
134
-
135
- ":where(sub, sup)": {
136
- "font-size": "0.75em",
137
- "line-height": "0",
138
- "position": "relative",
139
- "vertical-align": "baseline",
140
- },
141
-
142
- "sup": {
143
- "top": "-0.5em",
144
- },
145
-
146
- "sub": {
147
- "bottom": "-0.25em",
148
- },
149
-
150
- "abbr[title]": {
151
- "text-decoration": "underline dotted",
152
- "cursor": "help",
153
- },
154
-
155
- "del": {
156
- "text-decoration": "line-through",
157
- },
158
-
159
- "ins": {
160
- "text-decoration": "underline",
161
- },
162
-
163
- "s": {
164
- "text-decoration": "line-through",
165
- },
166
-
167
- "u": {
168
- "text-decoration": "underline",
169
- },
170
-
171
- "mark": {
172
- "font-style": "normal",
173
- "font-weight": "inherit",
174
- },
175
-
176
- "address": {
177
- "font-style": "normal",
178
- "margin-top": "var(--spacing-md)",
179
- "margin-bottom": "var(--spacing-md)",
180
- },
181
-
182
- "time": {
183
- "font-style": "normal",
184
- "font-variant-numeric": "tabular-nums",
185
- },
186
-
187
- // Blockquotes
188
- "blockquote": {
189
- "margin-top": "0",
190
- "margin-bottom": "0",
191
- "padding-left": "var(--spacing-md)",
192
- },
193
-
194
- "blockquote blockquote": {
195
- "margin-top": "var(--spacing-sm)",
196
- "margin-bottom": "var(--spacing-sm)",
197
- "padding-left": "var(--spacing-sm)",
198
- },
199
-
200
- "q": {
201
- "font-style": "inherit",
202
- },
203
-
204
- // Lists
205
- ":where(ul, ol)": {
206
- "list-style": "none",
207
- "margin-bottom": "0",
208
- "padding-left": "var(--spacing-md)",
209
- "margin-top": "var(--spacing-xs)",
210
- },
211
-
212
- "li": {
213
- "position": "relative",
214
- "padding-left": "0.375em",
215
- },
216
-
217
- "li + li": {
218
- "margin-top": "var(--spacing-xs)",
219
- },
220
-
221
- "li > :where(ul, ol):first-child": {
222
- "margin-top": "var(--spacing-xs)",
223
- },
224
-
225
- "ul > li::before": {
226
- "content": "''",
227
- "position": "absolute",
228
- "left": "-1.125em",
229
- "top": "calc(0.875em - 0.1875em)",
230
- "width": "0.375em",
231
- "height": "0.375em",
232
- "border-radius": "50%",
233
- },
234
-
235
- "ol": {
236
- "counter-reset": "list-counter",
237
- "margin-top": "0",
238
- "margin-bottom": "0",
239
- },
240
-
241
- "ol > li": {
242
- "counter-increment": "list-counter",
243
- },
244
-
245
- "ol > li::before": {
246
- "content": "counter(list-counter) '.'",
247
- "position": "absolute",
248
- "left": "-2.5em",
249
- "width": "1.75em",
250
- "text-align": "right",
251
- "font-weight": "600",
252
- },
253
-
254
- ":where(ul, ol) :where(ul, ol)": {
255
- "margin-bottom": "0",
256
- "padding-left": "var(--spacing-md)",
257
- },
258
-
259
- "dl": {
260
- "margin-top": "0",
261
- "margin-bottom": "0",
262
- },
263
-
264
- "dt": {
265
- "font-weight": "600",
266
- "margin-top": "var(--spacing-sm)",
267
- },
268
-
269
- "dt:first-child": {
270
- "margin-top": "0",
271
- },
272
-
273
- "dd": {
274
- "margin-left": "var(--spacing-md)",
275
- },
276
-
277
- "dt + dd": {
278
- "margin-top": "var(--spacing-xs)",
279
- },
280
-
281
- "dd + dd": {
282
- "margin-top": "var(--spacing-xs)",
283
- },
284
-
285
- "dd:last-child": {
286
- "margin-bottom": "0",
287
- },
288
-
289
- // Pre / Code
290
- "pre": {
291
- "margin-top": "var(--spacing-md)",
292
- "margin-bottom": "var(--spacing-md)",
293
- "font-family": "var(--font-family-mono)",
294
- "line-height": "1.6",
295
- "overflow-x": "auto",
296
- "break-inside": "avoid",
297
- },
298
-
299
- "pre code": {
300
- "font-size": "inherit",
301
- "padding": "0",
302
- "border-radius": "0",
303
- },
304
-
305
- // Fieldset & Form
306
- "fieldset": {
307
- "margin-top": "var(--spacing-md)",
308
- "margin-bottom": "var(--spacing-md)",
309
- "padding": "var(--spacing-md)",
310
- "border": "0",
311
- },
312
-
313
- "legend": {
314
- "font-weight": "600",
315
- "padding": "0 var(--spacing-xs)",
316
- },
317
-
318
- "output": {
319
- "display": "inline-block",
320
- "font-variant-numeric": "tabular-nums",
321
- },
322
-
323
- ":where(meter, progress)": {
324
- "display": "inline-block",
325
- "vertical-align": "middle",
326
- },
327
-
328
- // Media
329
- ":where(img, video)": {
330
- "max-width": "100%",
331
- "height": "auto",
332
- "break-inside": "avoid",
333
- },
334
-
335
- "figure": {
336
- "margin-top": "0",
337
- "margin-bottom": "0",
338
- "break-inside": "avoid",
339
- },
340
-
341
- "figcaption": {
342
- "margin-top": "0.375rem",
343
- "font-size": "0.875em",
344
- "line-height": "1.5",
345
- },
346
-
347
- // Tables
348
- "table": {
349
- "width": "100%",
350
- "margin-top": "0",
351
- "margin-bottom": "0",
352
- "border-collapse": "collapse",
353
- "font-size": "0.9375em",
354
- "line-height": "1.6",
355
- },
356
-
357
- "caption": {
358
- "margin-bottom": "var(--spacing-xs)",
359
- "font-size": "0.875em",
360
- "font-weight": "600",
361
- "text-align": "left",
362
- },
363
-
364
- "th, td": {
365
- "padding": "var(--spacing-xs) var(--spacing-sm)",
366
- "text-align": "left",
367
- "font-weight": "600",
368
- },
369
-
370
- "thead th, tbody th, tbody td, tfoot th, tfoot td": {
371
- "vertical-align": "top",
372
- },
373
-
374
- "thead th": {
375
- "vertical-align": "bottom",
376
- },
377
-
378
- "tbody + tbody": {
379
- "border-top-width": "2px",
380
- },
381
-
382
- // Horizontal Rule
383
- "hr": {
384
- "margin-top": "var(--spacing-xl)",
385
- "margin-bottom": "var(--spacing-xl)",
386
- "border": "0",
387
- },
388
-
389
- // Interactive
390
- ":where(:focus, :focus-visible)": {
391
- "outline-offset": "2px",
392
- },
393
-
394
- "details": {
395
- "margin-top": "var(--spacing-md)",
396
- "margin-bottom": "var(--spacing-md)",
397
- },
398
-
399
- "summary": {
400
- "cursor": "pointer",
401
- "font-weight": "600",
402
- },
403
-
404
- "details[open] > summary": {
405
- "margin-bottom": "var(--spacing-xs)",
406
- },
407
-
408
- "dialog": {
409
- "font-size": "inherit",
410
- "line-height": "inherit",
411
- },
412
-
413
- // Resets
414
- "ul": {
415
- "margin-top": "0",
416
- "margin-bottom": "0",
417
- },
418
-
419
- ":where(p, pre):first-child": {
420
- "margin-top": "0",
421
- },
422
-
423
- ":where(p, pre):last-child": {
424
- "margin-bottom": "0",
425
- },
426
-
427
- "@media print": {
428
- "table": {
429
- "break-inside": "avoid",
430
- },
431
- },
271
+
272
+ [scope("li > ul, li > ol")]: {
273
+ "margin-top": "var(--spacing-xs)",
274
+ "margin-bottom": "var(--spacing-sm)",
275
+ "padding-left": "var(--spacing-md)",
276
+ },
277
+
278
+ [scope("ul > li::before")]: {
279
+ content: "''",
280
+ position: "absolute",
281
+ left: "-1.125em",
282
+ top: "calc(0.875em - 0.1875em)",
283
+ width: "0.375em",
284
+ height: "0.375em",
285
+ "background-color": "currentColor",
286
+ "border-radius": "50%",
287
+ },
288
+
289
+ [scope("ol")]: {
290
+ "counter-reset": "list-counter",
291
+ },
292
+
293
+ [scope("ol > li")]: {
294
+ "counter-increment": "list-counter",
295
+ },
296
+
297
+ [scope("ol > li::before")]: {
298
+ content: "counter(list-counter) '.'",
299
+ position: "absolute",
300
+ left: "-2.5em",
301
+ width: "1.75em",
302
+ "text-align": "right",
303
+ "font-weight": "600",
304
+ color: "currentColor",
305
+ },
306
+
307
+ // DEFINITION LISTS
308
+ [scope("dl")]: {
309
+ "margin-top": "var(--spacing-md)",
310
+ "margin-bottom": "var(--spacing-md)",
311
+ },
312
+
313
+ [scope("dt")]: {
314
+ "font-weight": "600",
315
+ "margin-top": "var(--spacing-sm)",
316
+ },
317
+
318
+ [scope("dt:first-child")]: {
319
+ "margin-top": "0",
320
+ },
321
+
322
+ [scope("dd")]: {
323
+ "margin-left": "var(--spacing-md)",
324
+ },
325
+
326
+ [scope("dt + dd")]: {
327
+ "margin-top": "var(--spacing-xs)",
328
+ },
329
+
330
+ [scope("dd + dd")]: {
331
+ "margin-top": "var(--spacing-xs)",
332
+ },
333
+
334
+ [scope("dd:last-child")]: {
335
+ "margin-bottom": "0",
336
+ },
337
+
338
+ // CODE BLOCKS
339
+ [scope("pre")]: {
340
+ "margin-top": "var(--spacing-md)",
341
+ "margin-bottom": "var(--spacing-md)",
342
+ "font-family": "var(--font-family-mono)",
343
+ "line-height": "1.6",
344
+ "overflow-x": "auto",
345
+ },
346
+
347
+ [scope("pre code")]: {
348
+ "font-size": "inherit",
349
+ padding: "0",
350
+ background: "none",
351
+ "border-radius": "0",
352
+ },
353
+
354
+ // FORMS
355
+ [scope("fieldset")]: {
356
+ "margin-top": "var(--spacing-md)",
357
+ "margin-bottom": "var(--spacing-md)",
358
+ padding: "var(--spacing-md)",
359
+ },
360
+
361
+ [scope("legend")]: {
362
+ "font-weight": "600",
363
+ padding: "0 var(--spacing-xs)",
364
+ },
365
+
366
+ [scope("label")]: {
367
+ display: "inline-block",
368
+ "font-weight": "600",
369
+ "margin-bottom": "var(--spacing-xs)",
370
+ },
371
+
372
+ [scope("output")]: {
373
+ display: "inline-block",
374
+ "font-variant-numeric": "tabular-nums",
375
+ },
376
+
377
+ [scope(":where(meter, progress)")]: {
378
+ display: "inline-block",
379
+ "vertical-align": "middle",
380
+ },
381
+
382
+ [scope("input, button, textarea, select, optgroup")]: {
383
+ "font-family": "inherit",
384
+ "font-size": "100%",
385
+ "line-height": "inherit",
386
+ },
387
+
388
+ [scope("textarea")]: {
389
+ "line-height": "1.5",
390
+ },
391
+
392
+ [scope("button, [type='button'], [type='reset'], [type='submit']")]: {
393
+ cursor: "pointer",
394
+ },
395
+
396
+ // MEDIA
397
+ [scope(":where(img, video, canvas, audio, iframe, svg)")]: {
398
+ "max-width": "100%",
399
+ height: "auto",
400
+ "vertical-align": "middle",
401
+ },
402
+
403
+ [scope("figure")]: {
404
+ "margin-top": "var(--spacing-lg)",
405
+ "margin-bottom": "var(--spacing-lg)",
406
+ },
407
+
408
+ [scope("figcaption")]: {
409
+ "margin-top": "0.375rem",
410
+ "font-size": "0.875em",
411
+ "line-height": "1.5",
412
+ },
413
+
414
+ // TABLES
415
+ [scope("table")]: {
416
+ width: "100%",
417
+ "margin-top": "var(--spacing-md)",
418
+ "margin-bottom": "var(--spacing-md)",
419
+ "border-collapse": "collapse",
420
+ "font-size": "1em",
421
+ "line-height": "1.6",
422
+ },
423
+
424
+ [scope("caption")]: {
425
+ "margin-bottom": "var(--spacing-xs)",
426
+ "font-size": "0.875em",
427
+ "font-weight": "600",
428
+ "text-align": "left",
429
+ },
430
+
431
+ [scope("th, td")]: {
432
+ padding: "var(--spacing-xs) var(--spacing-sm)",
433
+ "text-align": "left",
434
+ },
435
+
436
+ [scope("th")]: {
437
+ "font-weight": "600",
438
+ },
439
+
440
+ [scope("thead th")]: {
441
+ "vertical-align": "bottom",
442
+ },
443
+
444
+ [scope("tbody th, tbody td")]: {
445
+ "vertical-align": "top",
446
+ },
447
+
448
+ [scope("tfoot th, tfoot td")]: {
449
+ "vertical-align": "top",
450
+ },
451
+
452
+ [scope("tbody + tbody")]: {
453
+ "border-top-width": "2px",
454
+ },
455
+
456
+ // SEPARATORS
457
+ [scope("hr")]: {
458
+ "margin-top": "var(--spacing-xl)",
459
+ "margin-bottom": "var(--spacing-xl)",
460
+ border: "0",
461
+ "border-top": "1px solid",
462
+ },
463
+
464
+ // INTERACTIVE ELEMENTS
465
+ [scope(":where(:focus, :focus-visible)")]: {
466
+ "outline-offset": "2px",
467
+ },
468
+
469
+ [scope("details")]: {
470
+ "margin-top": "var(--spacing-md)",
471
+ "margin-bottom": "var(--spacing-md)",
472
+ },
473
+
474
+ [scope("summary")]: {
475
+ cursor: "pointer",
476
+ "font-weight": "600",
477
+ },
478
+
479
+ [scope("details[open] > summary")]: {
480
+ "margin-bottom": "var(--spacing-xs)",
481
+ },
482
+
483
+ [scope("dialog")]: {
484
+ "font-size": "inherit",
485
+ "line-height": "inherit",
486
+ },
487
+
488
+ // UTILITIES
489
+ [
490
+ scope(
491
+ ":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",
492
+ )
493
+ ]: {
494
+ "margin-top": "0",
495
+ },
496
+
497
+ [scope(":where(p, ul, ol, dl, blockquote, figure, table, pre):last-child")]:
498
+ {
499
+ "margin-bottom": "0",
500
+ },
501
+ };
432
502
  };