@zazz-ui/core 0.8.4 → 0.9.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.
- package/AUTHORING.md +1 -1
- package/CHANGELOG.md +53 -0
- package/README.md +2 -2
- package/dist/sri.json +14 -14
- package/dist/zazz.css +1 -1
- package/editor/zazz.css-data.json +19 -15
- package/editor/zazz.html-data.json +12 -0
- package/editor/zazz.language-data.json +227 -85
- package/package.json +1 -1
- package/src/base/_typography.css +166 -35
- package/src/base/_variables.css +47 -38
- package/src/primitives/checkbox/checkbox.css +2 -2
- package/src/primitives/command/command.css +2 -3
- package/src/primitives/fields/fields.css +5 -5
- package/src/primitives/input-group/input-group.css +4 -4
- package/src/primitives/layout/layout.css +2 -2
- package/src/primitives/lightbox/lightbox.css +4 -4
- package/src/primitives/mobile-menu/mobile-menu.css +2 -2
- package/src/primitives/password-group/password-group.css +4 -4
- package/src/primitives/radio/radio.css +3 -3
- package/src/primitives/switch/switch.css +5 -5
- package/src/primitives/tabs/tabs.css +3 -3
package/src/base/_typography.css
CHANGED
|
@@ -1,26 +1,83 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* _typography.css —
|
|
2
|
+
* _typography.css — Fluid type scale, prose ([data-ui~="prose"]), and figcaption reset
|
|
3
3
|
*
|
|
4
4
|
* @layer variables, reset, components
|
|
5
5
|
* @requires _layers.css, _variables.css, _reset.css (figcaption baseline)
|
|
6
|
-
* @uses Type tokens — consumes --font-family-*, --font-
|
|
7
|
-
* --
|
|
8
|
-
*
|
|
6
|
+
* @uses Type tokens — consumes --font-family-*, --font-weight-*,
|
|
7
|
+
* --leading-*, --tracking-* and the type scale controls
|
|
8
|
+
* (--fluid-*, --typeset-base-*, --typeset-scale-*, --typeset-<sm|xs|2xs>-*)
|
|
9
|
+
* from _variables.css; exposes the data-ui="text-*" roles; weight, family, style,
|
|
9
10
|
* and decoration are utilities (--font-weight, --font-family, --font-style, --text-decoration)
|
|
11
|
+
* @uses tan(atan2()) — divides two lengths into a plain number (a stand-in for
|
|
12
|
+
* progress() that every engine supports); pow() — the type scale's steps
|
|
10
13
|
* @uses font-optical-sizing — heading optical size
|
|
11
14
|
* @uses @scope (prose) to (not-prose): prose rules stop at a not-prose
|
|
12
15
|
* element; a prose nested inside it starts its own scope
|
|
13
|
-
* @tokens --
|
|
16
|
+
* @tokens --fluid, --typeset-base, --typeset-scale, --font-size-* (@layer variables);
|
|
17
|
+
* --ui-prose-* (@layer variables); presets data-prose-size="sm" | "lg"
|
|
14
18
|
*/
|
|
15
19
|
|
|
16
20
|
@layer variables {
|
|
17
21
|
:root {
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
/* multiplies the space between prose blocks, on top of
|
|
23
|
+
--paragraph-spacing-multiplier and a data-prose-size preset */
|
|
24
|
+
--ui-prose-flow: 1;
|
|
25
|
+
--ui-prose-figcaption-mt: var(--space-xs);
|
|
26
|
+
/* 0 preserves the figcaption-mt spacing; a length adds flex gap on top */
|
|
20
27
|
--ui-prose-figcaption-gap: 0px;
|
|
21
28
|
--ui-prose-img-radius: var(--radius-md);
|
|
22
29
|
--ui-prose-img-border: none;
|
|
23
30
|
}
|
|
31
|
+
|
|
32
|
+
/* ===========================================================================
|
|
33
|
+
FLUID TYPE SCALE — calculations, don't touch; tune the controls in
|
|
34
|
+
_variables.css. A sized prose re-runs them, so its preset scales the base
|
|
35
|
+
and a :root control still reaches it.
|
|
36
|
+
=========================================================================== */
|
|
37
|
+
|
|
38
|
+
:where(:root, [data-ui~="prose"][data-prose-size]) {
|
|
39
|
+
/* 0 at --fluid-min, 1 at --fluid-max, linear between, clamped outside:
|
|
40
|
+
(100vi − min) ÷ (max − min). tan(atan2(a, b)) is a ÷ b as a plain number,
|
|
41
|
+
which calc() can't do with two lengths in every engine yet. Same result as
|
|
42
|
+
progress(100vi, var(--fluid-min), var(--fluid-max)). */
|
|
43
|
+
--fluid: clamp(0, tan(atan2(100vi - var(--fluid-min), var(--fluid-max) - var(--fluid-min))), 1);
|
|
44
|
+
--typeset-base: calc(
|
|
45
|
+
(
|
|
46
|
+
var(--typeset-base-min) + var(--fluid) *
|
|
47
|
+
(var(--typeset-base-max) - var(--typeset-base-min))
|
|
48
|
+
) *
|
|
49
|
+
var(--_prose-size, 1)
|
|
50
|
+
);
|
|
51
|
+
--typeset-scale: calc(
|
|
52
|
+
var(--typeset-scale-min) + var(--fluid) *
|
|
53
|
+
(var(--typeset-scale-max) - var(--typeset-scale-min))
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
--font-size-2xs: calc(
|
|
57
|
+
var(--typeset-base) *
|
|
58
|
+
(var(--typeset-2xs-min) + var(--fluid) * (var(--typeset-2xs-max) - var(--typeset-2xs-min)))
|
|
59
|
+
);
|
|
60
|
+
--font-size-xs: calc(
|
|
61
|
+
var(--typeset-base) *
|
|
62
|
+
(var(--typeset-xs-min) + var(--fluid) * (var(--typeset-xs-max) - var(--typeset-xs-min)))
|
|
63
|
+
);
|
|
64
|
+
--font-size-sm: calc(
|
|
65
|
+
var(--typeset-base) *
|
|
66
|
+
(var(--typeset-sm-min) + var(--fluid) * (var(--typeset-sm-max) - var(--typeset-sm-min)))
|
|
67
|
+
);
|
|
68
|
+
--font-size-eyebrow: var(--font-size-2xs);
|
|
69
|
+
--font-size-md: var(--typeset-base);
|
|
70
|
+
--font-size-lg: calc(var(--typeset-base) * var(--typeset-scale));
|
|
71
|
+
--font-size-xl: calc(var(--typeset-base) * pow(var(--typeset-scale), 2));
|
|
72
|
+
--font-size-2xl: calc(var(--typeset-base) * pow(var(--typeset-scale), 3));
|
|
73
|
+
--font-size-h6: var(--font-size-xl);
|
|
74
|
+
--font-size-h5: var(--font-size-2xl);
|
|
75
|
+
--font-size-h4: calc(var(--typeset-base) * pow(var(--typeset-scale), 4));
|
|
76
|
+
--font-size-h3: calc(var(--typeset-base) * pow(var(--typeset-scale), 5));
|
|
77
|
+
--font-size-h2: calc(var(--typeset-base) * pow(var(--typeset-scale), 6));
|
|
78
|
+
--font-size-h1: calc(var(--typeset-base) * pow(var(--typeset-scale), 7));
|
|
79
|
+
--font-size-display: calc(var(--typeset-base) * pow(var(--typeset-scale), 8));
|
|
80
|
+
}
|
|
24
81
|
}
|
|
25
82
|
|
|
26
83
|
@layer ui.components {
|
|
@@ -33,6 +90,26 @@
|
|
|
33
90
|
display: flex;
|
|
34
91
|
}
|
|
35
92
|
|
|
93
|
+
/* a sized prose sets its own body text; a plain one inherits the page's */
|
|
94
|
+
:where([data-ui~="prose"][data-prose-size]) {
|
|
95
|
+
font-size: var(--font-size-md);
|
|
96
|
+
line-height: var(--_prose-leading, var(--leading-md));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* size presets: a multiple of the base, a body leading, and a multiple of
|
|
100
|
+
the space between blocks; each composes with the :root controls and hooks */
|
|
101
|
+
:where([data-ui~="prose"][data-prose-size="sm"]) {
|
|
102
|
+
--_prose-size: 0.875;
|
|
103
|
+
--_prose-leading: 1.5;
|
|
104
|
+
--_prose-flow: 0.75;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:where([data-ui~="prose"][data-prose-size="lg"]) {
|
|
108
|
+
--_prose-size: 1.125;
|
|
109
|
+
--_prose-leading: 1.8;
|
|
110
|
+
--_prose-flow: 1.25;
|
|
111
|
+
}
|
|
112
|
+
|
|
36
113
|
/* Prose styles its descendants up to a not-prose boundary; a prose nested
|
|
37
114
|
inside not-prose starts its own scope, so the nearest root wins. */
|
|
38
115
|
@scope ([data-ui~="prose"]) to ([data-ui~="not-prose"]) {
|
|
@@ -54,7 +131,7 @@
|
|
|
54
131
|
|
|
55
132
|
:where(figure:has(img, video) > figcaption) {
|
|
56
133
|
display: flex;
|
|
57
|
-
margin: var(--ui-prose-figcaption-
|
|
134
|
+
margin-block-start: var(--ui-prose-figcaption-mt);
|
|
58
135
|
font-style: italic;
|
|
59
136
|
font-family: var(--font-family-body);
|
|
60
137
|
font-size: var(--font-size-sm);
|
|
@@ -111,19 +188,27 @@
|
|
|
111
188
|
|
|
112
189
|
:where(hgroup:not(:first-child)) {
|
|
113
190
|
font-size: var(--font-size-xl);
|
|
114
|
-
margin-block-start:
|
|
191
|
+
margin-block-start: calc(
|
|
192
|
+
var(--paragraph-spacing-xl) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
193
|
+
);
|
|
115
194
|
}
|
|
116
195
|
|
|
117
196
|
:where(ul:not(:first-child)) {
|
|
118
|
-
margin-block-start:
|
|
197
|
+
margin-block-start: calc(
|
|
198
|
+
var(--paragraph-spacing-md) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
199
|
+
);
|
|
119
200
|
}
|
|
120
201
|
|
|
121
202
|
:where(ol:not(:first-child)) {
|
|
122
|
-
margin-block-start:
|
|
203
|
+
margin-block-start: calc(
|
|
204
|
+
var(--paragraph-spacing-md) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
205
|
+
);
|
|
123
206
|
}
|
|
124
207
|
|
|
125
208
|
:where(dl:not(:first-child)) {
|
|
126
|
-
margin-block-start:
|
|
209
|
+
margin-block-start: calc(
|
|
210
|
+
var(--paragraph-spacing-md) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
211
|
+
);
|
|
127
212
|
}
|
|
128
213
|
|
|
129
214
|
:where(li:not(:first-child)) {
|
|
@@ -150,95 +235,141 @@
|
|
|
150
235
|
}
|
|
151
236
|
|
|
152
237
|
:where([data-ui~="text-display"]:not(:first-child)) {
|
|
153
|
-
margin-block-start:
|
|
238
|
+
margin-block-start: calc(
|
|
239
|
+
var(--paragraph-spacing-display) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
240
|
+
);
|
|
154
241
|
}
|
|
155
242
|
|
|
156
243
|
:where([data-ui~="text-h1"]:not(:first-child), h1:not(:first-child)) {
|
|
157
|
-
margin-block-start:
|
|
244
|
+
margin-block-start: calc(
|
|
245
|
+
var(--paragraph-spacing-h1) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
246
|
+
);
|
|
158
247
|
}
|
|
159
248
|
|
|
160
249
|
:where([data-ui~="text-h2"]:not(:first-child), h2:not(:first-child)) {
|
|
161
|
-
margin-block-start:
|
|
250
|
+
margin-block-start: calc(
|
|
251
|
+
var(--paragraph-spacing-h2) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
252
|
+
);
|
|
162
253
|
}
|
|
163
254
|
|
|
164
255
|
:where([data-ui~="text-h3"]:not(:first-child), h3:not(:first-child)) {
|
|
165
|
-
margin-block-start:
|
|
256
|
+
margin-block-start: calc(
|
|
257
|
+
var(--paragraph-spacing-h3) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
258
|
+
);
|
|
166
259
|
}
|
|
167
260
|
|
|
168
261
|
:where([data-ui~="text-h4"]:not(:first-child), h4:not(:first-child)) {
|
|
169
|
-
margin-block-start:
|
|
262
|
+
margin-block-start: calc(
|
|
263
|
+
var(--paragraph-spacing-h4) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
264
|
+
);
|
|
170
265
|
}
|
|
171
266
|
|
|
172
267
|
:where([data-ui~="text-h5"]:not(:first-child), h5:not(:first-child)) {
|
|
173
|
-
margin-block-start:
|
|
268
|
+
margin-block-start: calc(
|
|
269
|
+
var(--paragraph-spacing-h5) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
270
|
+
);
|
|
174
271
|
}
|
|
175
272
|
|
|
176
273
|
:where([data-ui~="text-h6"]:not(:first-child), h6:not(:first-child)) {
|
|
177
|
-
margin-block-start:
|
|
274
|
+
margin-block-start: calc(
|
|
275
|
+
var(--paragraph-spacing-h6) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
276
|
+
);
|
|
178
277
|
}
|
|
179
278
|
|
|
180
279
|
:where([data-ui~="text-2xl"]:not(:first-child)) {
|
|
181
|
-
margin-block-start:
|
|
280
|
+
margin-block-start: calc(
|
|
281
|
+
var(--paragraph-spacing-2xl) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
282
|
+
);
|
|
182
283
|
}
|
|
183
284
|
|
|
184
285
|
:where([data-ui~="text-xl"]:not(:first-child)) {
|
|
185
|
-
margin-block-start:
|
|
286
|
+
margin-block-start: calc(
|
|
287
|
+
var(--paragraph-spacing-xl) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
288
|
+
);
|
|
186
289
|
}
|
|
187
290
|
|
|
188
291
|
:where([data-ui~="text-lg"]:not(:first-child)) {
|
|
189
|
-
margin-block-start:
|
|
292
|
+
margin-block-start: calc(
|
|
293
|
+
var(--paragraph-spacing-lg) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
294
|
+
);
|
|
190
295
|
}
|
|
191
296
|
|
|
192
297
|
:where([data-ui~="text-md"]:not(:first-child), :is(p, pre):not(:first-child)) {
|
|
193
|
-
margin-block-start:
|
|
298
|
+
margin-block-start: calc(
|
|
299
|
+
var(--paragraph-spacing-md) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
300
|
+
);
|
|
194
301
|
}
|
|
195
302
|
|
|
196
303
|
:where([data-ui~="text-sm"]:not(:first-child)) {
|
|
197
|
-
margin-block-start:
|
|
304
|
+
margin-block-start: calc(
|
|
305
|
+
var(--paragraph-spacing-sm) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
306
|
+
);
|
|
198
307
|
}
|
|
199
308
|
|
|
200
309
|
:where([data-ui~="text-xs"]:not(:first-child)) {
|
|
201
|
-
margin-block-start:
|
|
310
|
+
margin-block-start: calc(
|
|
311
|
+
var(--paragraph-spacing-xs) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
312
|
+
);
|
|
202
313
|
}
|
|
203
314
|
|
|
204
315
|
:where([data-ui~="text-2xs"]:not(:first-child)) {
|
|
205
|
-
margin-block-start:
|
|
316
|
+
margin-block-start: calc(
|
|
317
|
+
var(--paragraph-spacing-2xs) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
318
|
+
);
|
|
206
319
|
}
|
|
207
320
|
|
|
208
321
|
:where([data-ui~="text-eyebrow"]:not(:first-child)) {
|
|
209
|
-
margin-block-start:
|
|
322
|
+
margin-block-start: calc(
|
|
323
|
+
var(--paragraph-spacing-eyebrow) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
324
|
+
);
|
|
210
325
|
}
|
|
211
326
|
|
|
212
327
|
:where(hr:first-child) {
|
|
213
|
-
margin-block-end: calc(
|
|
328
|
+
margin-block-end: calc(
|
|
329
|
+
var(--space-md) * var(--paragraph-spacing-multiplier) * var(--ui-prose-flow)
|
|
330
|
+
);
|
|
214
331
|
}
|
|
215
332
|
|
|
216
333
|
:where(hr:not(:first-child)) {
|
|
217
|
-
margin-block: calc(
|
|
334
|
+
margin-block: calc(
|
|
335
|
+
var(--space-lg) * var(--paragraph-spacing-multiplier) * var(--ui-prose-flow)
|
|
336
|
+
);
|
|
218
337
|
}
|
|
219
338
|
|
|
220
339
|
:where([data-ui~="text-eyebrow"] + *) {
|
|
221
|
-
margin-block-start:
|
|
340
|
+
margin-block-start: calc(
|
|
341
|
+
var(--paragraph-spacing-xs) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
342
|
+
);
|
|
222
343
|
}
|
|
223
344
|
|
|
224
345
|
:where(figure:not(:first-child)) {
|
|
225
|
-
margin-block-start:
|
|
346
|
+
margin-block-start: calc(
|
|
347
|
+
var(--paragraph-spacing-md) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
348
|
+
);
|
|
226
349
|
}
|
|
227
350
|
|
|
228
351
|
:where(figure:not(:first-child):has(:is(img, video))) {
|
|
229
|
-
margin-block-start: calc(
|
|
352
|
+
margin-block-start: calc(
|
|
353
|
+
var(--paragraph-spacing-md) * 2 * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
354
|
+
);
|
|
230
355
|
}
|
|
231
356
|
|
|
232
357
|
:where(dl > dt:not(:first-child)) {
|
|
233
|
-
margin-block-start:
|
|
358
|
+
margin-block-start: calc(
|
|
359
|
+
var(--paragraph-spacing-md) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
360
|
+
);
|
|
234
361
|
}
|
|
235
362
|
|
|
236
363
|
:where(blockquote:not(:first-child)) {
|
|
237
|
-
margin-block-start:
|
|
364
|
+
margin-block-start: calc(
|
|
365
|
+
var(--paragraph-spacing-lg) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
366
|
+
);
|
|
238
367
|
}
|
|
239
368
|
|
|
240
369
|
:where(blockquote:not(:last-child)) {
|
|
241
|
-
margin-block-end:
|
|
370
|
+
margin-block-end: calc(
|
|
371
|
+
var(--paragraph-spacing-lg) * var(--ui-prose-flow) * var(--_prose-flow, 1)
|
|
372
|
+
);
|
|
242
373
|
}
|
|
243
374
|
}
|
|
244
375
|
}
|
package/src/base/_variables.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* _variables.css — Global design tokens (Tier 1).
|
|
3
3
|
*
|
|
4
4
|
* @layer variables
|
|
5
|
-
* @requires _layers.css
|
|
5
|
+
* @requires _layers.css, _typography.css (--fluid, which --spacing reads)
|
|
6
6
|
* @uses light-dark() — theme roles re-resolve per color-scheme (system,
|
|
7
7
|
* data-ui="theme-dark" | "theme-light"); tokens stay unregistered on purpose
|
|
8
8
|
* @uses oklch(from …) — shade/tint scales and shadow alphas
|
|
@@ -237,22 +237,27 @@
|
|
|
237
237
|
--font-optical-sizing-heading: auto;
|
|
238
238
|
--font-optical-sizing-body: auto;
|
|
239
239
|
|
|
240
|
-
/*
|
|
241
|
-
|
|
242
|
-
--
|
|
243
|
-
--
|
|
244
|
-
|
|
245
|
-
--font-size
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
--
|
|
250
|
-
--
|
|
251
|
-
--
|
|
252
|
-
--
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
--
|
|
240
|
+
/* fluid range — the viewport widths fluid type and spacing grow between;
|
|
241
|
+
below --fluid-min they hold their small end, above --fluid-max their large end */
|
|
242
|
+
--fluid-min: 25rem;
|
|
243
|
+
--fluid-max: 80rem;
|
|
244
|
+
|
|
245
|
+
/* typeset — the fluid type scale behind --font-size-*. md is the base; each step above it
|
|
246
|
+
multiplies by the scale (lg = 1 step, xl = 2, … display = 8). The base and
|
|
247
|
+
the scale each grow from -min to -max across the fluid range; the math
|
|
248
|
+
lives in _typography.css. */
|
|
249
|
+
--typeset-base-min: 1rem;
|
|
250
|
+
--typeset-base-max: 1rem;
|
|
251
|
+
--typeset-scale-min: 1.125;
|
|
252
|
+
--typeset-scale-max: 1.25;
|
|
253
|
+
|
|
254
|
+
/* sizes below md — multiples of the base at each end of the fluid range */
|
|
255
|
+
--typeset-sm-min: 0.8;
|
|
256
|
+
--typeset-sm-max: 0.8;
|
|
257
|
+
--typeset-xs-min: 0.64;
|
|
258
|
+
--typeset-xs-max: 0.64;
|
|
259
|
+
--typeset-2xs-min: 0.5787;
|
|
260
|
+
--typeset-2xs-max: 0.5787;
|
|
256
261
|
|
|
257
262
|
/* font-weight */
|
|
258
263
|
--font-weight-body: 400;
|
|
@@ -294,32 +299,36 @@
|
|
|
294
299
|
--leading-2xs: 1.5;
|
|
295
300
|
--leading-eyebrow: 1.2;
|
|
296
301
|
|
|
297
|
-
/* paragraph-spacing
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
--paragraph-spacing-
|
|
302
|
-
--paragraph-spacing-
|
|
303
|
-
--paragraph-spacing-
|
|
304
|
-
--paragraph-spacing-
|
|
305
|
-
--paragraph-spacing-
|
|
306
|
-
--paragraph-spacing-
|
|
307
|
-
--paragraph-spacing-
|
|
308
|
-
--paragraph-spacing-
|
|
309
|
-
--paragraph-spacing-
|
|
310
|
-
--paragraph-spacing-
|
|
311
|
-
--paragraph-spacing-
|
|
312
|
-
--paragraph-spacing-
|
|
313
|
-
--paragraph-spacing-
|
|
314
|
-
--paragraph-spacing-
|
|
302
|
+
/* paragraph-spacing — the space above a block in prose; the multiplier
|
|
303
|
+
loosens or tightens every step at once (--ui-prose-flow scales it again per prose) */
|
|
304
|
+
--paragraph-spacing-multiplier: 1;
|
|
305
|
+
|
|
306
|
+
--paragraph-spacing-display: calc(3.5rlh * var(--paragraph-spacing-multiplier));
|
|
307
|
+
--paragraph-spacing-h1: calc(3.5rlh * var(--paragraph-spacing-multiplier));
|
|
308
|
+
--paragraph-spacing-h2: calc(3rlh * var(--paragraph-spacing-multiplier));
|
|
309
|
+
--paragraph-spacing-h3: calc(3rlh * var(--paragraph-spacing-multiplier));
|
|
310
|
+
--paragraph-spacing-h4: calc(2rlh * var(--paragraph-spacing-multiplier));
|
|
311
|
+
--paragraph-spacing-h5: calc(2rlh * var(--paragraph-spacing-multiplier));
|
|
312
|
+
--paragraph-spacing-h6: calc(2rlh * var(--paragraph-spacing-multiplier));
|
|
313
|
+
--paragraph-spacing-2xl: calc(1rlh * var(--paragraph-spacing-multiplier));
|
|
314
|
+
--paragraph-spacing-xl: calc(0.75rlh * var(--paragraph-spacing-multiplier));
|
|
315
|
+
--paragraph-spacing-lg: calc(0.75rlh * var(--paragraph-spacing-multiplier));
|
|
316
|
+
--paragraph-spacing-md: calc(0.75rlh * var(--paragraph-spacing-multiplier));
|
|
317
|
+
--paragraph-spacing-sm: calc(0.5rlh * var(--paragraph-spacing-multiplier));
|
|
318
|
+
--paragraph-spacing-xs: calc(0.5rlh * var(--paragraph-spacing-multiplier));
|
|
319
|
+
--paragraph-spacing-2xs: calc(0.5rlh * var(--paragraph-spacing-multiplier));
|
|
320
|
+
--paragraph-spacing-eyebrow: calc(1rlh * var(--paragraph-spacing-multiplier));
|
|
315
321
|
|
|
316
322
|
/* ==========================================================================
|
|
317
323
|
* Spacing — the --spacing unit and the --space-* scale
|
|
318
324
|
* ========================================================================== */
|
|
319
325
|
|
|
320
|
-
/* the utility scale unit: `--p: 4` is 4 × --spacing. Fluid between
|
|
321
|
-
|
|
322
|
-
|
|
326
|
+
/* the utility scale unit: `--p: 4` is 4 × --spacing. Fluid between its
|
|
327
|
+
min and max across the fluid range (--fluid comes from _typography.css);
|
|
328
|
+
set them equal, or pin `:root { --spacing: 0.25rem }`, for a fixed scale. */
|
|
329
|
+
--spacing-min: 0.225rem;
|
|
330
|
+
--spacing-max: 0.25rem;
|
|
331
|
+
--spacing: calc(var(--spacing-min) + var(--fluid) * (var(--spacing-max) - var(--spacing-min)));
|
|
323
332
|
|
|
324
333
|
/* named spacing scale — for CSS and component hooks. In style utilities write the
|
|
325
334
|
number instead (`--gap: 6`, not `var(--space-md)`). */
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
/* surface + border follow --ui-field-* */
|
|
17
17
|
--ui-checkbox-size: calc(var(--spacing) * 4.5);
|
|
18
18
|
--ui-checkbox-bg: var(--ui-field-bg);
|
|
19
|
-
--ui-checkbox-
|
|
19
|
+
--ui-checkbox-glyph-color: var(--color-primary-foreground);
|
|
20
20
|
--ui-checkbox-border-width: var(--ui-field-border-width);
|
|
21
21
|
--ui-checkbox-border-style: var(--ui-field-border-style);
|
|
22
22
|
--ui-checkbox-border-color: var(--ui-field-border-color);
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
) {
|
|
104
104
|
background-color: var(--_bg-resolved, var(--ui-checkbox-bg--checked));
|
|
105
105
|
border-color: var(--_border-color-resolved, var(--ui-checkbox-border-color--checked));
|
|
106
|
-
color: var(--ui-checkbox-
|
|
106
|
+
color: var(--ui-checkbox-glyph-color);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
/* The glyph is a masked ::before painted in currentColor (pseudo-elements
|
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
--ui-command-option-gap: var(--ui-field-option-gap);
|
|
20
20
|
--ui-command-input-p: calc(var(--spacing) * 3);
|
|
21
21
|
--ui-command-input-border: 1px solid var(--color-border);
|
|
22
|
-
--ui-command-group-label-
|
|
23
|
-
var(--spacing);
|
|
22
|
+
--ui-command-group-label-p: calc(var(--spacing) * 2) calc(var(--spacing) * 2) var(--spacing);
|
|
24
23
|
--ui-command-footer-p: calc(var(--spacing) * 2);
|
|
25
24
|
--ui-command-footer-border: 1px solid var(--color-border);
|
|
26
25
|
--ui-command-shadow: var(--ui-menu-shadow);
|
|
@@ -121,7 +120,7 @@
|
|
|
121
120
|
}
|
|
122
121
|
|
|
123
122
|
:where(ui-command, [data-ui~="command"]) [data-command-slot~="group-label"] {
|
|
124
|
-
padding: var(--ui-command-group-label-
|
|
123
|
+
padding: var(--ui-command-group-label-p);
|
|
125
124
|
/* Score ranking writes order -1000..0 on sibling items; keep the label first */
|
|
126
125
|
order: -1001;
|
|
127
126
|
}
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
--ui-field-font-size: var(--font-size-sm);
|
|
50
50
|
--ui-field-leading: 1;
|
|
51
51
|
--ui-field-px: calc(var(--spacing) * 2.5);
|
|
52
|
-
--ui-field-addon-
|
|
52
|
+
--ui-field-addon-p: var(--spacing);
|
|
53
53
|
--ui-field-gap: calc(var(--spacing) * 2);
|
|
54
54
|
--ui-field-option-gap: 1px;
|
|
55
55
|
--ui-field-icon-size: calc(var(--spacing) * 4);
|
|
@@ -255,14 +255,14 @@
|
|
|
255
255
|
:where([data-ui~="field"][data-field-orientation="horizontal"]) {
|
|
256
256
|
--ui-field-horizontal-display: flex;
|
|
257
257
|
--ui-field-horizontal-flex-direction: row;
|
|
258
|
-
--ui-field-horizontal-
|
|
259
|
-
--ui-field-horizontal-justify
|
|
258
|
+
--ui-field-horizontal-items: center;
|
|
259
|
+
--ui-field-horizontal-justify: flex-start;
|
|
260
260
|
--ui-field-horizontal-gap: var(--space-xs);
|
|
261
261
|
|
|
262
262
|
display: var(--_display-resolved, var(--ui-field-horizontal-display));
|
|
263
263
|
flex-direction: var(--_flex-direction-resolved, var(--ui-field-horizontal-flex-direction));
|
|
264
|
-
align-items: var(--_items-resolved, var(--ui-field-horizontal-
|
|
265
|
-
justify-content: var(--_justify-resolved, var(--ui-field-horizontal-justify
|
|
264
|
+
align-items: var(--_items-resolved, var(--ui-field-horizontal-items));
|
|
265
|
+
justify-content: var(--_justify-resolved, var(--ui-field-horizontal-justify));
|
|
266
266
|
--_gap-len: var(--_gap-resolved, var(--ui-field-horizontal-gap));
|
|
267
267
|
--_gap-num: var(--_gap-resolved, var(--ui-field-horizontal-gap));
|
|
268
268
|
}
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
white-space: nowrap;
|
|
182
182
|
block-size: var(--ui-field-h);
|
|
183
183
|
min-inline-size: var(--ui-field-h);
|
|
184
|
-
padding-inline: var(--ui-field-addon-
|
|
184
|
+
padding-inline: var(--ui-field-addon-p);
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
:where([data-ui~="input-group"]) [data-input-group-slot~="addon"] > svg {
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
[data-input-group-slot~="addon"][data-input-group-align="block-start"] {
|
|
206
206
|
order: -2;
|
|
207
207
|
flex-basis: 100%;
|
|
208
|
-
padding-block: var(--ui-field-addon-
|
|
208
|
+
padding-block: var(--ui-field-addon-p);
|
|
209
209
|
align-items: flex-start;
|
|
210
210
|
}
|
|
211
211
|
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
[data-input-group-slot~="addon"][data-input-group-align="block-end"] {
|
|
214
214
|
order: 2;
|
|
215
215
|
flex-basis: 100%;
|
|
216
|
-
padding-block: var(--ui-field-addon-
|
|
216
|
+
padding-block: var(--ui-field-addon-p);
|
|
217
217
|
align-items: flex-end;
|
|
218
218
|
}
|
|
219
219
|
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
display: inline-flex;
|
|
223
223
|
align-items: center;
|
|
224
224
|
gap: var(--space-xs);
|
|
225
|
-
padding-inline: var(--ui-field-addon-
|
|
225
|
+
padding-inline: var(--ui-field-addon-p);
|
|
226
226
|
font-size: var(--ui-input-group-font-size);
|
|
227
227
|
font-weight: var(--ui-input-group-font-weight);
|
|
228
228
|
color: var(--ui-input-group-text);
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
/* each child's container type: inline-size so tiers inside a band follow it;
|
|
36
36
|
set normal on a layout to opt its children out */
|
|
37
37
|
--ui-layout-child-container: inline-size;
|
|
38
|
-
--ui-layout-template-
|
|
38
|
+
--ui-layout-template-cols: [layout-bleed-start] var(--ui-layout-gutters) [layout-full-start]
|
|
39
39
|
minmax(0, 1fr) [layout-2xl-start]
|
|
40
40
|
clamp(
|
|
41
41
|
0rem,
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
@layer ui.components {
|
|
92
92
|
:where(ui-layout, [data-ui~="layout"]) {
|
|
93
93
|
display: grid;
|
|
94
|
-
grid-template-columns: var(--ui-layout-template-
|
|
94
|
+
grid-template-columns: var(--ui-layout-template-cols);
|
|
95
95
|
/* the bands are positioned exactly by the template: no column gap */
|
|
96
96
|
column-gap: 0;
|
|
97
97
|
/* children sit at the block start and stretch across their band */
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
--ui-lightbox-thumb-size: calc(var(--spacing) * 16);
|
|
20
20
|
--ui-lightbox-thumb-opacity: 0.5;
|
|
21
21
|
--ui-lightbox-thumb-opacity--active: 1;
|
|
22
|
-
--ui-lightbox-thumb-
|
|
22
|
+
--ui-lightbox-thumb-cols: 6;
|
|
23
23
|
--ui-lightbox-thumb-gap: calc(var(--spacing) * 1.5);
|
|
24
24
|
--ui-lightbox-img-border: 1px solid var(--color-faded);
|
|
25
25
|
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
|
|
60
60
|
@container (width <= 40rem) {
|
|
61
61
|
:where(ui-lightbox, [data-ui~="lightbox"]) {
|
|
62
|
-
--ui-lightbox-thumb-
|
|
62
|
+
--ui-lightbox-thumb-cols: 4;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -242,8 +242,8 @@
|
|
|
242
242
|
[data-lightbox-slot~="stage"]
|
|
243
243
|
[data-lightbox-slot~="thumb"] {
|
|
244
244
|
max-inline-size: calc(
|
|
245
|
-
(100% - (var(--ui-lightbox-thumb-gap) * (var(--ui-lightbox-thumb-
|
|
246
|
-
var(--ui-lightbox-thumb-
|
|
245
|
+
(100% - (var(--ui-lightbox-thumb-gap) * (var(--ui-lightbox-thumb-cols) - 1))) /
|
|
246
|
+
var(--ui-lightbox-thumb-cols)
|
|
247
247
|
);
|
|
248
248
|
}
|
|
249
249
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
--ui-mobile-menu-bg: var(--color-background);
|
|
19
19
|
--ui-mobile-menu-text: var(--color-foreground);
|
|
20
20
|
--ui-mobile-menu-backdrop-color: var(--color-faded-foreground);
|
|
21
|
-
--ui-mobile-menu-header-
|
|
21
|
+
--ui-mobile-menu-header-px: var(--space-md) var(--space-xs);
|
|
22
22
|
--ui-mobile-menu-header-py: var(--space-xs);
|
|
23
23
|
--ui-mobile-menu-body-px: var(--space-sm);
|
|
24
24
|
--ui-mobile-menu-body-py: var(--space-md);
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
display: flex;
|
|
89
89
|
align-items: center;
|
|
90
90
|
justify-content: space-between;
|
|
91
|
-
padding-inline: var(--ui-mobile-menu-header-
|
|
91
|
+
padding-inline: var(--ui-mobile-menu-header-px);
|
|
92
92
|
padding-block: var(--ui-mobile-menu-header-py);
|
|
93
93
|
border-block-end: 1px solid var(--color-border);
|
|
94
94
|
position: sticky;
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
white-space: nowrap;
|
|
172
172
|
block-size: var(--ui-field-h);
|
|
173
173
|
min-inline-size: var(--ui-field-h);
|
|
174
|
-
padding-inline: var(--ui-field-addon-
|
|
174
|
+
padding-inline: var(--ui-field-addon-p);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
:where([data-ui~="password-group"]) [data-password-group-slot~="addon"] > svg {
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
[data-password-group-slot~="addon"][data-password-group-align="block-start"] {
|
|
196
196
|
order: -2;
|
|
197
197
|
flex-basis: 100%;
|
|
198
|
-
padding-block: var(--ui-field-addon-
|
|
198
|
+
padding-block: var(--ui-field-addon-p);
|
|
199
199
|
align-items: flex-start;
|
|
200
200
|
}
|
|
201
201
|
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
[data-password-group-slot~="addon"][data-password-group-align="block-end"] {
|
|
204
204
|
order: 2;
|
|
205
205
|
flex-basis: 100%;
|
|
206
|
-
padding-block: var(--ui-field-addon-
|
|
206
|
+
padding-block: var(--ui-field-addon-p);
|
|
207
207
|
align-items: flex-end;
|
|
208
208
|
}
|
|
209
209
|
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
display: inline-flex;
|
|
212
212
|
align-items: center;
|
|
213
213
|
gap: var(--space-xs);
|
|
214
|
-
padding-inline: var(--ui-field-addon-
|
|
214
|
+
padding-inline: var(--ui-field-addon-p);
|
|
215
215
|
font-size: var(--ui-password-group-font-size);
|
|
216
216
|
font-weight: var(--ui-password-group-font-weight);
|
|
217
217
|
color: var(--ui-password-group-text);
|