@zazz-ui/core 0.12.1 → 0.12.2
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/CHANGELOG.md +27 -0
- package/README.md +2 -2
- package/dist/sri.json +8 -8
- package/dist/zazz.css +1 -1
- package/editor/zazz.css-data.json +8 -0
- package/editor/zazz.language-data.json +24 -14
- package/editor/zazz.lint-data.json +4 -0
- package/package.json +1 -1
- package/src/base/_defaults.css +4 -4
- package/src/base/_variables.css +1 -1
- package/src/base/kit-styling.js +4 -4
- package/src/base/kit-styling.ts +4 -4
- package/src/primitives/fields/fields.css +1 -1
- package/src/primitives/slider/slider.css +142 -8
- package/src/primitives/tabs/tabs.css +5 -5
- package/src/primitives/tooltip/tooltip.css +12 -1
|
@@ -133521,6 +133521,14 @@
|
|
|
133521
133521
|
"name": "--ui-separator-thickness",
|
|
133522
133522
|
"description": "Primitive hook: the public override surface."
|
|
133523
133523
|
},
|
|
133524
|
+
{
|
|
133525
|
+
"name": "--ui-slider-fill-bg",
|
|
133526
|
+
"description": "Primitive hook: the public override surface."
|
|
133527
|
+
},
|
|
133528
|
+
{
|
|
133529
|
+
"name": "--ui-slider-fill-side",
|
|
133530
|
+
"description": "Primitive hook: the public override surface."
|
|
133531
|
+
},
|
|
133524
133532
|
{
|
|
133525
133533
|
"name": "--ui-slider-ring-color",
|
|
133526
133534
|
"description": "Primitive hook: the public override surface."
|
|
@@ -1006,7 +1006,9 @@
|
|
|
1006
1006
|
"appearance: none — redraws track + thumb from theme tokens",
|
|
1007
1007
|
"--_touch-min (touch screens): the transparent input grows to the touch floor and so does the thumb's box, through a transparent border, while the visible thumb keeps its size. A thumb can't have an ::after, so on touch screens its border and ring draw inset, it loses its drop shadow, and the visible thumb stops a border's width short of each track end.",
|
|
1008
1008
|
"sign(): switches the ring inset once the thumb has a hit border",
|
|
1009
|
-
"corner-shape — round by default, so circles stay circles; a hook takes any shape"
|
|
1009
|
+
"corner-shape — round by default, so circles stay circles; a hook takes any shape",
|
|
1010
|
+
"the track fill: ::-moz-range-progress in Firefox. Chromium and Safari have no progress part, so a view timeline on the thumb (view-timeline + timeline-scope) animates --_slider-progress on the track, which paints the fill as a gradient. The timeline needs the input to be a scroll container, so there it clips its overflow and pads its inline ends to keep the thumb's ring in view, so a padding utility on the input moves the fill off the thumb there. @supports-gated: an engine without view timelines shows no fill. Nor does a right-to-left slider there: Chromium measures an inline view timeline from the left in RTL and Safari from the right, and CSS can't tell which it got.",
|
|
1011
|
+
"@container style(--ui-slider-fill-side: end) — the fill runs from the thumb to the end; Firefox 151+ (style queries), older engines fill from the start."
|
|
1010
1012
|
],
|
|
1011
1013
|
"tokens": [
|
|
1012
1014
|
"--ui-slider-* (@layer variables, on :root so subtree hooks work); the thumb and track sizes floor at --spacing-control-min"
|
|
@@ -1168,7 +1170,7 @@
|
|
|
1168
1170
|
"uses": [
|
|
1169
1171
|
"interestfor: Interest Invokers API (Chromium 142+; polyfill via invokers)",
|
|
1170
1172
|
"data-tooltip-slot=\"content\": hint popover (light dismiss, auto-hides sibling hints)",
|
|
1171
|
-
"anchor-name, position-anchor, position-area, position-try-fallbacks: explicit anchors for polyfill; data-popover-side maps to --ui-popover-position
|
|
1173
|
+
"anchor-name, position-anchor, position-area, position-try-fallbacks: explicit anchors for polyfill; data-popover-side maps to --ui-popover-position-*. Chromium (151) draws one of a newly opened anchored element's first two frames without its scroll compensation, so in a scrolled container or page the tooltip flashes far from its trigger. Opening, the fade starts 34ms (two 60Hz frames) late, so that frame paints transparent; a later one would be nearly so. A custom --ui-tooltip-transition keeps the delay on its first entry.",
|
|
1172
1174
|
"corner-shape — superellipse corners; unsupported browsers keep plain rounded corners",
|
|
1173
1175
|
":dir(rtl): inline-side origins and slide-in mirror; the arrow uses logical insets",
|
|
1174
1176
|
"@media not (hover: hover) — hidden on touch screens (no hover to show it, and a tap would cover the trigger's own action); keep essential text visible"
|
|
@@ -1925,7 +1927,7 @@
|
|
|
1925
1927
|
"file": "primitives/fields/fields.css"
|
|
1926
1928
|
},
|
|
1927
1929
|
"--ui-field-border-color--hover": {
|
|
1928
|
-
"value": "color-mix( in oklch, var(--color-border) 90%, var(--color-
|
|
1930
|
+
"value": "color-mix( in oklch, var(--color-border) 90%, var(--color-foreground) 10% )",
|
|
1929
1931
|
"file": "primitives/fields/fields.css"
|
|
1930
1932
|
},
|
|
1931
1933
|
"--ui-field-border-style": {
|
|
@@ -3072,12 +3074,20 @@
|
|
|
3072
3074
|
"value": "1px",
|
|
3073
3075
|
"file": "primitives/separator/separator.css"
|
|
3074
3076
|
},
|
|
3077
|
+
"--ui-slider-fill-bg": {
|
|
3078
|
+
"value": "var(--color-primary)",
|
|
3079
|
+
"file": "primitives/slider/slider.css"
|
|
3080
|
+
},
|
|
3081
|
+
"--ui-slider-fill-side": {
|
|
3082
|
+
"value": "start",
|
|
3083
|
+
"file": "primitives/slider/slider.css"
|
|
3084
|
+
},
|
|
3075
3085
|
"--ui-slider-ring-color": {
|
|
3076
3086
|
"value": "var(--color-ring)",
|
|
3077
3087
|
"file": "primitives/slider/slider.css"
|
|
3078
3088
|
},
|
|
3079
3089
|
"--ui-slider-thumb-bg": {
|
|
3080
|
-
"value": "var(--color-
|
|
3090
|
+
"value": "var(--color-card)",
|
|
3081
3091
|
"file": "primitives/slider/slider.css"
|
|
3082
3092
|
},
|
|
3083
3093
|
"--ui-slider-thumb-border-color": {
|
|
@@ -3109,15 +3119,15 @@
|
|
|
3109
3119
|
"file": "primitives/slider/slider.css"
|
|
3110
3120
|
},
|
|
3111
3121
|
"--ui-slider-track-bg": {
|
|
3112
|
-
"value": "var(--
|
|
3122
|
+
"value": "var(--ui-field-bg)",
|
|
3113
3123
|
"file": "primitives/slider/slider.css"
|
|
3114
3124
|
},
|
|
3115
3125
|
"--ui-slider-track-border-color": {
|
|
3116
|
-
"value": "var(--color
|
|
3126
|
+
"value": "var(--ui-field-border-color)",
|
|
3117
3127
|
"file": "primitives/slider/slider.css"
|
|
3118
3128
|
},
|
|
3119
3129
|
"--ui-slider-track-border-width": {
|
|
3120
|
-
"value": "
|
|
3130
|
+
"value": "var(--ui-field-border-width)",
|
|
3121
3131
|
"file": "primitives/slider/slider.css"
|
|
3122
3132
|
},
|
|
3123
3133
|
"--ui-slider-track-corner-shape": {
|
|
@@ -3321,11 +3331,11 @@
|
|
|
3321
3331
|
"file": "primitives/table/table.css"
|
|
3322
3332
|
},
|
|
3323
3333
|
"--ui-tabs-gap": {
|
|
3324
|
-
"value": "
|
|
3334
|
+
"value": "0",
|
|
3325
3335
|
"file": "primitives/tabs/tabs.css"
|
|
3326
3336
|
},
|
|
3327
3337
|
"--ui-tabs-indicator-bg": {
|
|
3328
|
-
"value": "var(--color-
|
|
3338
|
+
"value": "var(--color-muted)",
|
|
3329
3339
|
"file": "primitives/tabs/tabs.css"
|
|
3330
3340
|
},
|
|
3331
3341
|
"--ui-tabs-indicator-border-color": {
|
|
@@ -3353,7 +3363,7 @@
|
|
|
3353
3363
|
"file": "primitives/tabs/tabs.css"
|
|
3354
3364
|
},
|
|
3355
3365
|
"--ui-tabs-indicator-shadow": {
|
|
3356
|
-
"value": "
|
|
3366
|
+
"value": "none",
|
|
3357
3367
|
"file": "primitives/tabs/tabs.css"
|
|
3358
3368
|
},
|
|
3359
3369
|
"--ui-tabs-label-bg": {
|
|
@@ -3433,11 +3443,11 @@
|
|
|
3433
3443
|
"file": "primitives/tabs/tabs.css"
|
|
3434
3444
|
},
|
|
3435
3445
|
"--ui-tabs-track-gap": {
|
|
3436
|
-
"value": "calc(var(--spacing) * 0.
|
|
3446
|
+
"value": "calc(var(--spacing) * 0.35)",
|
|
3437
3447
|
"file": "primitives/tabs/tabs.css"
|
|
3438
3448
|
},
|
|
3439
3449
|
"--ui-tabs-track-p": {
|
|
3440
|
-
"value": "calc(var(--spacing) * 0.
|
|
3450
|
+
"value": "calc(var(--spacing) * 0.35)",
|
|
3441
3451
|
"file": "primitives/tabs/tabs.css"
|
|
3442
3452
|
},
|
|
3443
3453
|
"--ui-tabs-track-radius": {
|
|
@@ -3979,10 +3989,10 @@
|
|
|
3979
3989
|
"dark": "oklch(0.82 0.09 242)"
|
|
3980
3990
|
},
|
|
3981
3991
|
"--color-input": {
|
|
3982
|
-
"value": "light-dark(var(--color-neutral-50), var(--color-
|
|
3992
|
+
"value": "light-dark(var(--color-neutral-50), var(--color-neutral-950))",
|
|
3983
3993
|
"file": "base/_variables.css",
|
|
3984
3994
|
"light": "oklch(0.973 0.001 287.31)",
|
|
3985
|
-
"dark": "oklch(
|
|
3995
|
+
"dark": "oklch(0.198 0.008 285.68)"
|
|
3986
3996
|
},
|
|
3987
3997
|
"--color-input-foreground": {
|
|
3988
3998
|
"value": "light-dark(var(--color-neutral-900), var(--color-white))",
|
|
@@ -1447,6 +1447,7 @@
|
|
|
1447
1447
|
254,
|
|
1448
1448
|
257,
|
|
1449
1449
|
260,
|
|
1450
|
+
269,
|
|
1450
1451
|
270,
|
|
1451
1452
|
273,
|
|
1452
1453
|
274,
|
|
@@ -1592,6 +1593,7 @@
|
|
|
1592
1593
|
254,
|
|
1593
1594
|
257,
|
|
1594
1595
|
260,
|
|
1596
|
+
269,
|
|
1595
1597
|
270,
|
|
1596
1598
|
273,
|
|
1597
1599
|
274,
|
|
@@ -1820,6 +1822,7 @@
|
|
|
1820
1822
|
253,
|
|
1821
1823
|
254,
|
|
1822
1824
|
260,
|
|
1825
|
+
269,
|
|
1823
1826
|
270
|
|
1824
1827
|
],
|
|
1825
1828
|
"pt": [
|
|
@@ -1964,6 +1967,7 @@
|
|
|
1964
1967
|
254,
|
|
1965
1968
|
257,
|
|
1966
1969
|
260,
|
|
1970
|
+
269,
|
|
1967
1971
|
270,
|
|
1968
1972
|
273,
|
|
1969
1973
|
274,
|
package/package.json
CHANGED
package/src/base/_defaults.css
CHANGED
|
@@ -196,13 +196,13 @@
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
|
|
199
|
-
:where([style*="--p--"]:not(code, kbd, select:is([multiple], [size]) optgroup option)) {
|
|
199
|
+
:where([style*="--p--"]:not(code, input[type="range"], kbd, select:is([multiple], [size]) optgroup option)) {
|
|
200
200
|
--_p-len: var(--_p-resolved, 0);
|
|
201
201
|
--_p-num: var(--_p-resolved, 0);
|
|
202
202
|
padding: calc(var(--_p-len) + var(--_p-num) * var(--spacing));
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
:where([style*="--px--"]:not(code, kbd, select:is([multiple], [size]) optgroup option)) {
|
|
205
|
+
:where([style*="--px--"]:not(code, input[type="range"], kbd, select:is([multiple], [size]) optgroup option)) {
|
|
206
206
|
--_px-len: var(--_px-resolved, 0);
|
|
207
207
|
--_px-num: var(--_px-resolved, 0);
|
|
208
208
|
padding-inline: calc(var(--_px-len) + var(--_px-num) * var(--spacing));
|
|
@@ -226,13 +226,13 @@
|
|
|
226
226
|
padding-block-end: calc(var(--_pb-len) + var(--_pb-num) * var(--spacing));
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
:where([style*="--pl--"]:not(code, kbd, select:is([multiple], [size]) optgroup option)) {
|
|
229
|
+
:where([style*="--pl--"]:not(code, input[type="range"], kbd, select:is([multiple], [size]) optgroup option)) {
|
|
230
230
|
--_pl-len: var(--_pl-resolved, 0);
|
|
231
231
|
--_pl-num: var(--_pl-resolved, 0);
|
|
232
232
|
padding-inline-start: calc(var(--_pl-len) + var(--_pl-num) * var(--spacing));
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
:where([style*="--pr--"]:not(code, kbd)) {
|
|
235
|
+
:where([style*="--pr--"]:not(code, input[type="range"], kbd)) {
|
|
236
236
|
--_pr-len: var(--_pr-resolved, 0);
|
|
237
237
|
--_pr-num: var(--_pr-resolved, 0);
|
|
238
238
|
padding-inline-end: calc(var(--_pr-len) + var(--_pr-num) * var(--spacing));
|
package/src/base/_variables.css
CHANGED
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
--color-card-foreground: light-dark(var(--color-neutral-900), var(--color-white));
|
|
64
64
|
--color-popover: light-dark(var(--color-white), var(--color-neutral-950));
|
|
65
65
|
--color-popover-foreground: light-dark(var(--color-neutral-900), var(--color-white));
|
|
66
|
-
--color-input: light-dark(var(--color-neutral-50), var(--color-
|
|
66
|
+
--color-input: light-dark(var(--color-neutral-50), var(--color-neutral-950));
|
|
67
67
|
--color-input-foreground: light-dark(var(--color-neutral-900), var(--color-white));
|
|
68
68
|
|
|
69
69
|
/* selection */
|
package/src/base/kit-styling.js
CHANGED
|
@@ -407,7 +407,7 @@ export const TIER_BLOCKS = {
|
|
|
407
407
|
112, 120, 121, 125, 130, 131, 141, 144, 145, 148, 149, 150, 151, 153, 154, 156, 157, 159, 161,
|
|
408
408
|
162, 163, 164, 175, 177, 178, 180, 181, 184, 186, 187, 188, 189, 191, 192, 193, 194, 199, 207,
|
|
409
409
|
211, 212, 214, 215, 218, 220, 221, 222, 223, 227, 230, 237, 238, 241, 245, 246, 248, 252, 253,
|
|
410
|
-
254, 257, 260, 270, 273, 274, 275,
|
|
410
|
+
254, 257, 260, 269, 270, 273, 274, 275,
|
|
411
411
|
],
|
|
412
412
|
pb: [
|
|
413
413
|
5, 6, 26, 29, 37, 46, 49, 52, 58, 59, 61, 62, 64, 65, 67, 68, 78, 83, 84, 108, 112, 120, 121,
|
|
@@ -419,7 +419,7 @@ export const TIER_BLOCKS = {
|
|
|
419
419
|
5, 6, 8, 9, 26, 29, 37, 46, 48, 49, 52, 58, 59, 61, 62, 64, 65, 67, 68, 78, 91, 108, 120, 121,
|
|
420
420
|
125, 130, 131, 141, 144, 145, 148, 149, 150, 151, 153, 154, 156, 157, 159, 161, 163, 164, 175,
|
|
421
421
|
177, 178, 184, 186, 187, 188, 191, 192, 193, 194, 199, 207, 211, 212, 218, 220, 221, 222, 227,
|
|
422
|
-
230, 237, 238, 245, 246, 248, 252, 253, 254, 257, 260, 270, 273, 274, 275,
|
|
422
|
+
230, 237, 238, 245, 246, 248, 252, 253, 254, 257, 260, 269, 270, 273, 274, 275,
|
|
423
423
|
],
|
|
424
424
|
"place-content": [
|
|
425
425
|
0, 23, 25, 37, 59, 70, 77, 78, 84, 91, 94, 121, 123, 144, 145, 149, 150, 157, 159, 161, 162,
|
|
@@ -441,7 +441,7 @@ export const TIER_BLOCKS = {
|
|
|
441
441
|
5, 6, 26, 29, 37, 46, 49, 52, 58, 59, 61, 62, 64, 65, 67, 68, 78, 108, 120, 121, 125, 130, 131,
|
|
442
442
|
141, 144, 145, 148, 149, 150, 151, 153, 154, 156, 157, 159, 161, 163, 164, 175, 177, 178, 184,
|
|
443
443
|
186, 187, 189, 191, 193, 194, 199, 207, 211, 212, 218, 220, 221, 223, 227, 230, 237, 238, 245,
|
|
444
|
-
246, 248, 252, 253, 254, 260, 270,
|
|
444
|
+
246, 248, 252, 253, 254, 260, 269, 270,
|
|
445
445
|
],
|
|
446
446
|
pt: [
|
|
447
447
|
5, 6, 26, 29, 37, 46, 49, 52, 58, 59, 61, 62, 64, 65, 67, 68, 78, 83, 84, 108, 112, 120, 121,
|
|
@@ -453,7 +453,7 @@ export const TIER_BLOCKS = {
|
|
|
453
453
|
5, 6, 8, 9, 26, 29, 37, 46, 48, 49, 52, 58, 59, 61, 62, 64, 65, 67, 68, 78, 91, 108, 120, 121,
|
|
454
454
|
125, 130, 131, 141, 144, 145, 148, 149, 150, 151, 153, 154, 156, 157, 159, 161, 163, 164, 175,
|
|
455
455
|
177, 178, 184, 186, 187, 188, 189, 191, 192, 193, 194, 199, 207, 211, 212, 218, 220, 221, 222,
|
|
456
|
-
223, 227, 230, 237, 238, 245, 246, 248, 252, 253, 254, 257, 260, 270, 273, 274, 275,
|
|
456
|
+
223, 227, 230, 237, 238, 245, 246, 248, 252, 253, 254, 257, 260, 269, 270, 273, 274, 275,
|
|
457
457
|
],
|
|
458
458
|
py: [
|
|
459
459
|
5, 6, 26, 29, 37, 46, 49, 52, 58, 59, 61, 62, 64, 65, 67, 68, 78, 83, 84, 108, 112, 120, 121,
|
package/src/base/kit-styling.ts
CHANGED
|
@@ -410,7 +410,7 @@ export const TIER_BLOCKS: Readonly<Record<string, readonly number[]>> = {
|
|
|
410
410
|
112, 120, 121, 125, 130, 131, 141, 144, 145, 148, 149, 150, 151, 153, 154, 156, 157, 159, 161,
|
|
411
411
|
162, 163, 164, 175, 177, 178, 180, 181, 184, 186, 187, 188, 189, 191, 192, 193, 194, 199, 207,
|
|
412
412
|
211, 212, 214, 215, 218, 220, 221, 222, 223, 227, 230, 237, 238, 241, 245, 246, 248, 252, 253,
|
|
413
|
-
254, 257, 260, 270, 273, 274, 275,
|
|
413
|
+
254, 257, 260, 269, 270, 273, 274, 275,
|
|
414
414
|
],
|
|
415
415
|
pb: [
|
|
416
416
|
5, 6, 26, 29, 37, 46, 49, 52, 58, 59, 61, 62, 64, 65, 67, 68, 78, 83, 84, 108, 112, 120, 121,
|
|
@@ -422,7 +422,7 @@ export const TIER_BLOCKS: Readonly<Record<string, readonly number[]>> = {
|
|
|
422
422
|
5, 6, 8, 9, 26, 29, 37, 46, 48, 49, 52, 58, 59, 61, 62, 64, 65, 67, 68, 78, 91, 108, 120, 121,
|
|
423
423
|
125, 130, 131, 141, 144, 145, 148, 149, 150, 151, 153, 154, 156, 157, 159, 161, 163, 164, 175,
|
|
424
424
|
177, 178, 184, 186, 187, 188, 191, 192, 193, 194, 199, 207, 211, 212, 218, 220, 221, 222, 227,
|
|
425
|
-
230, 237, 238, 245, 246, 248, 252, 253, 254, 257, 260, 270, 273, 274, 275,
|
|
425
|
+
230, 237, 238, 245, 246, 248, 252, 253, 254, 257, 260, 269, 270, 273, 274, 275,
|
|
426
426
|
],
|
|
427
427
|
"place-content": [
|
|
428
428
|
0, 23, 25, 37, 59, 70, 77, 78, 84, 91, 94, 121, 123, 144, 145, 149, 150, 157, 159, 161, 162,
|
|
@@ -444,7 +444,7 @@ export const TIER_BLOCKS: Readonly<Record<string, readonly number[]>> = {
|
|
|
444
444
|
5, 6, 26, 29, 37, 46, 49, 52, 58, 59, 61, 62, 64, 65, 67, 68, 78, 108, 120, 121, 125, 130, 131,
|
|
445
445
|
141, 144, 145, 148, 149, 150, 151, 153, 154, 156, 157, 159, 161, 163, 164, 175, 177, 178, 184,
|
|
446
446
|
186, 187, 189, 191, 193, 194, 199, 207, 211, 212, 218, 220, 221, 223, 227, 230, 237, 238, 245,
|
|
447
|
-
246, 248, 252, 253, 254, 260, 270,
|
|
447
|
+
246, 248, 252, 253, 254, 260, 269, 270,
|
|
448
448
|
],
|
|
449
449
|
pt: [
|
|
450
450
|
5, 6, 26, 29, 37, 46, 49, 52, 58, 59, 61, 62, 64, 65, 67, 68, 78, 83, 84, 108, 112, 120, 121,
|
|
@@ -456,7 +456,7 @@ export const TIER_BLOCKS: Readonly<Record<string, readonly number[]>> = {
|
|
|
456
456
|
5, 6, 8, 9, 26, 29, 37, 46, 48, 49, 52, 58, 59, 61, 62, 64, 65, 67, 68, 78, 91, 108, 120, 121,
|
|
457
457
|
125, 130, 131, 141, 144, 145, 148, 149, 150, 151, 153, 154, 156, 157, 159, 161, 163, 164, 175,
|
|
458
458
|
177, 178, 184, 186, 187, 188, 189, 191, 192, 193, 194, 199, 207, 211, 212, 218, 220, 221, 222,
|
|
459
|
-
223, 227, 230, 237, 238, 245, 246, 248, 252, 253, 254, 257, 260, 270, 273, 274, 275,
|
|
459
|
+
223, 227, 230, 237, 238, 245, 246, 248, 252, 253, 254, 257, 260, 269, 270, 273, 274, 275,
|
|
460
460
|
],
|
|
461
461
|
py: [
|
|
462
462
|
5, 6, 26, 29, 37, 46, 49, 52, 58, 59, 61, 62, 64, 65, 67, 68, 78, 83, 84, 108, 112, 120, 121,
|
|
@@ -11,12 +11,23 @@
|
|
|
11
11
|
* stops a border's width short of each track end.
|
|
12
12
|
* @uses sign(): switches the ring inset once the thumb has a hit border
|
|
13
13
|
* @uses corner-shape — round by default, so circles stay circles; a hook takes any shape
|
|
14
|
+
* @uses the track fill: ::-moz-range-progress in Firefox. Chromium and Safari have no
|
|
15
|
+
* progress part, so a view timeline on the thumb (view-timeline + timeline-scope)
|
|
16
|
+
* animates --_slider-progress on the track, which paints the fill as a gradient.
|
|
17
|
+
* The timeline needs the input to be a scroll container, so there it clips its
|
|
18
|
+
* overflow and pads its inline ends to keep the thumb's ring in view, so a
|
|
19
|
+
* padding utility on the input moves the fill off the thumb there.
|
|
20
|
+
* @supports-gated: an engine without view timelines shows no fill. Nor does
|
|
21
|
+
* a right-to-left slider there: Chromium measures an inline view timeline from
|
|
22
|
+
* the left in RTL and Safari from the right, and CSS can't tell which it got.
|
|
23
|
+
* @uses @container style(--ui-slider-fill-side: end) — the fill runs from the thumb
|
|
24
|
+
* to the end; Firefox 151+ (style queries), older engines fill from the start.
|
|
14
25
|
* @tokens --ui-slider-* (@layer variables, on :root so subtree hooks work); the thumb
|
|
15
26
|
* and track sizes floor at --spacing-control-min
|
|
16
27
|
*
|
|
17
|
-
* Note: The
|
|
18
|
-
*
|
|
19
|
-
*
|
|
28
|
+
* Note: The thumb is centered on the track with a calc'd negative margin so retuning
|
|
29
|
+
* either size keeps it aligned. The gradient fill runs left to right; a vertical writing
|
|
30
|
+
* mode isn't handled.
|
|
20
31
|
*/
|
|
21
32
|
|
|
22
33
|
@layer variables {
|
|
@@ -24,13 +35,18 @@
|
|
|
24
35
|
--ui-slider-ring-color: var(--color-ring);
|
|
25
36
|
|
|
26
37
|
--ui-slider-track-h: max(calc(var(--spacing) * 1.5), calc(var(--spacing-control-min) * 0.375));
|
|
27
|
-
--ui-slider-track-bg: var(--
|
|
28
|
-
--ui-slider-track-border-width:
|
|
29
|
-
--ui-slider-track-border-color: var(--color
|
|
38
|
+
--ui-slider-track-bg: var(--ui-field-bg);
|
|
39
|
+
--ui-slider-track-border-width: var(--ui-field-border-width);
|
|
40
|
+
--ui-slider-track-border-color: var(--ui-field-border-color);
|
|
30
41
|
--ui-slider-track-radius: var(--radius-full);
|
|
31
42
|
--ui-slider-track-corner-shape: round;
|
|
43
|
+
/* the part of the track between its start and the thumb; `end` fills from the thumb
|
|
44
|
+
to the end of the track instead */
|
|
45
|
+
--ui-slider-fill-bg: var(--color-primary);
|
|
46
|
+
--ui-slider-fill-side: start;
|
|
47
|
+
|
|
32
48
|
--ui-slider-thumb-size: max(calc(var(--spacing) * 4), var(--spacing-control-min));
|
|
33
|
-
--ui-slider-thumb-bg: var(--color-
|
|
49
|
+
--ui-slider-thumb-bg: var(--color-card);
|
|
34
50
|
|
|
35
51
|
/* composes into the thumb's box-shadow list with its border and ring: use a
|
|
36
52
|
transparent shadow, never `none` */
|
|
@@ -55,6 +71,39 @@
|
|
|
55
71
|
syntax: "*";
|
|
56
72
|
inherits: true;
|
|
57
73
|
}
|
|
74
|
+
@property --_slider-thumb-box {
|
|
75
|
+
syntax: "*";
|
|
76
|
+
inherits: true;
|
|
77
|
+
}
|
|
78
|
+
@property --_slider-bleed {
|
|
79
|
+
syntax: "*";
|
|
80
|
+
inherits: true;
|
|
81
|
+
}
|
|
82
|
+
@property --_slider-fill-before {
|
|
83
|
+
syntax: "*";
|
|
84
|
+
inherits: true;
|
|
85
|
+
}
|
|
86
|
+
@property --_slider-fill-after {
|
|
87
|
+
syntax: "*";
|
|
88
|
+
inherits: true;
|
|
89
|
+
}
|
|
90
|
+
/* 0 with the thumb at the start, 1 at the end; registered so the timeline can animate it */
|
|
91
|
+
@property --_slider-progress {
|
|
92
|
+
syntax: "<number>";
|
|
93
|
+
inherits: true;
|
|
94
|
+
initial-value: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* A view timeline counts up as its subject moves toward the start of the scroller, so
|
|
98
|
+
the keyframes run backward. */
|
|
99
|
+
@keyframes ui-slider-progress {
|
|
100
|
+
from {
|
|
101
|
+
--_slider-progress: 1;
|
|
102
|
+
}
|
|
103
|
+
to {
|
|
104
|
+
--_slider-progress: 0;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
58
107
|
|
|
59
108
|
@layer reset {
|
|
60
109
|
:where(input[type="range"]) {
|
|
@@ -62,7 +111,16 @@
|
|
|
62
111
|
--_slider-thumb-hit: max(0px, (var(--_touch-min) - var(--ui-slider-thumb-size)) / 2);
|
|
63
112
|
/* 1 once the thumb has a hit border: the ring then draws inside the visible thumb */
|
|
64
113
|
--_slider-thumb-in: sign(var(--_slider-thumb-hit));
|
|
114
|
+
/* the thumb's whole box, hit border included: what travels along the track */
|
|
115
|
+
--_slider-thumb-box: calc(var(--ui-slider-thumb-size) + 2 * var(--_slider-thumb-hit));
|
|
65
116
|
--_slider-thumb-drop: var(--ui-slider-thumb-shadow);
|
|
117
|
+
/* how far the ring reaches past the thumb, which the scroll container must keep in view */
|
|
118
|
+
--_slider-bleed: calc(
|
|
119
|
+
(var(--ring-offset-width) + var(--ring-width)) * (1 - var(--_slider-thumb-in))
|
|
120
|
+
);
|
|
121
|
+
/* the fill: from the start to the thumb, or from the thumb to the end */
|
|
122
|
+
--_slider-fill-before: var(--ui-slider-fill-bg);
|
|
123
|
+
--_slider-fill-after: transparent;
|
|
66
124
|
/* derived on the element so a subtree hook keeps the thumb centered on the track */
|
|
67
125
|
--ui-slider-thumb-offset: calc(
|
|
68
126
|
(var(--ui-slider-track-h) - var(--ui-slider-thumb-size)) / 2 - var(--_slider-thumb-hit) -
|
|
@@ -89,6 +147,54 @@
|
|
|
89
147
|
outline-offset: var(--outline-offset);
|
|
90
148
|
}
|
|
91
149
|
|
|
150
|
+
/* The view timeline needs the input as its scroller: it clips, so the inline padding
|
|
151
|
+
and the block size leave room for the thumb's ring and shadow, and the timeline's
|
|
152
|
+
inset takes the padding back out so the thumb's ends of travel are 0 and 1. */
|
|
153
|
+
@supports (animation-timeline: view()) {
|
|
154
|
+
:where(input[type="range"]) {
|
|
155
|
+
overflow: hidden;
|
|
156
|
+
padding-inline: var(--_slider-bleed);
|
|
157
|
+
min-block-size: max(
|
|
158
|
+
var(--_touch-min),
|
|
159
|
+
var(--ui-slider-thumb-size) + 2 * var(--_slider-bleed) + 2 * var(--spacing)
|
|
160
|
+
);
|
|
161
|
+
timeline-scope: --ui-slider-thumb;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:where(input[type="range"])::-webkit-slider-thumb {
|
|
165
|
+
view-timeline: --ui-slider-thumb inline;
|
|
166
|
+
view-timeline-inset: var(--_slider-bleed);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* On the track, not the input: Safari's timeline doesn't reach the input itself. */
|
|
170
|
+
:where(input[type="range"])::-webkit-slider-runnable-track {
|
|
171
|
+
animation: ui-slider-progress 1ms linear both;
|
|
172
|
+
animation-timeline: --ui-slider-thumb;
|
|
173
|
+
animation-range: contain;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@container style(--ui-slider-fill-side: end) {
|
|
178
|
+
:where(input[type="range"])::-webkit-slider-runnable-track {
|
|
179
|
+
--_slider-fill-before: transparent;
|
|
180
|
+
--_slider-fill-after: var(--ui-slider-fill-bg);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
:where(input[type="range"])::-moz-range-track {
|
|
184
|
+
background: var(--ui-slider-fill-bg);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:where(input[type="range"])::-moz-range-progress {
|
|
188
|
+
background: var(--ui-slider-track-bg);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* No gradient fill right to left (see the header); after the side query, so it wins */
|
|
193
|
+
:where(input[type="range"]:dir(rtl))::-webkit-slider-runnable-track {
|
|
194
|
+
--_slider-fill-before: transparent;
|
|
195
|
+
--_slider-fill-after: transparent;
|
|
196
|
+
}
|
|
197
|
+
|
|
92
198
|
/* An outer shadow would paint at the edge of the grown thumb box, not the visible thumb */
|
|
93
199
|
@media (not (hover: hover)) {
|
|
94
200
|
:where(input[type="range"]) {
|
|
@@ -98,12 +204,32 @@
|
|
|
98
204
|
:where(input[type="range"])::-webkit-slider-runnable-track {
|
|
99
205
|
block-size: var(--ui-slider-track-h);
|
|
100
206
|
inline-size: 100%;
|
|
101
|
-
|
|
207
|
+
/* the fill's edge sits at the thumb's center, which travels half a thumb in from
|
|
208
|
+
each end of the track's content box */
|
|
209
|
+
background:
|
|
210
|
+
linear-gradient(
|
|
211
|
+
to right,
|
|
212
|
+
var(--_slider-fill-before)
|
|
213
|
+
calc(
|
|
214
|
+
var(--_slider-thumb-box) / 2 + var(--_slider-progress) *
|
|
215
|
+
(100% - var(--_slider-thumb-box))
|
|
216
|
+
),
|
|
217
|
+
var(--_slider-fill-after) 0
|
|
218
|
+
)
|
|
219
|
+
content-box no-repeat,
|
|
220
|
+
var(--ui-slider-track-bg);
|
|
102
221
|
border: var(--ui-slider-track-border-width) solid var(--ui-slider-track-border-color);
|
|
103
222
|
border-radius: var(--ui-slider-track-radius);
|
|
104
223
|
corner-shape: var(--ui-slider-track-corner-shape);
|
|
105
224
|
}
|
|
106
225
|
|
|
226
|
+
/* Without a view timeline the progress never moves off 0, so the track stays plain */
|
|
227
|
+
@supports not (animation-timeline: view()) {
|
|
228
|
+
:where(input[type="range"])::-webkit-slider-runnable-track {
|
|
229
|
+
background: var(--ui-slider-track-bg);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
107
233
|
:where(input[type="range"])::-moz-range-track {
|
|
108
234
|
block-size: var(--ui-slider-track-h);
|
|
109
235
|
inline-size: 100%;
|
|
@@ -143,6 +269,14 @@
|
|
|
143
269
|
transition: var(--default-transition);
|
|
144
270
|
}
|
|
145
271
|
|
|
272
|
+
:where(input[type="range"])::-moz-range-progress {
|
|
273
|
+
/* inside the track's border, as the gradient fill is in the other engines */
|
|
274
|
+
block-size: var(--ui-slider-track-h);
|
|
275
|
+
background: var(--ui-slider-fill-bg);
|
|
276
|
+
border-radius: var(--ui-slider-track-radius);
|
|
277
|
+
corner-shape: var(--ui-slider-track-corner-shape);
|
|
278
|
+
}
|
|
279
|
+
|
|
146
280
|
:where(input[type="range"])::-moz-range-thumb {
|
|
147
281
|
appearance: none;
|
|
148
282
|
box-sizing: content-box;
|
|
@@ -19,20 +19,20 @@
|
|
|
19
19
|
:root {
|
|
20
20
|
/* metrics default to the shared --ui-field-* family so the track matches
|
|
21
21
|
adjacent fields and buttons; --ui-tabs-label-min-h is deliberately shorter */
|
|
22
|
-
--ui-tabs-gap:
|
|
23
|
-
--ui-tabs-track-p: calc(var(--spacing) * 0.
|
|
22
|
+
--ui-tabs-gap: 0;
|
|
23
|
+
--ui-tabs-track-p: calc(var(--spacing) * 0.35);
|
|
24
24
|
--ui-tabs-track-radius: var(--ui-field-radius);
|
|
25
25
|
--ui-tabs-track-corner-shape: var(--ui-field-corner-shape);
|
|
26
|
-
--ui-tabs-track-gap: calc(var(--spacing) * 0.
|
|
26
|
+
--ui-tabs-track-gap: calc(var(--spacing) * 0.35);
|
|
27
27
|
--ui-tabs-track-bg: var(--ui-field-bg);
|
|
28
28
|
--ui-tabs-track-border-width: 1px;
|
|
29
29
|
--ui-tabs-track-border-style: solid;
|
|
30
30
|
--ui-tabs-track-border-color: var(--color-border);
|
|
31
31
|
|
|
32
|
-
--ui-tabs-indicator-bg: var(--color-
|
|
32
|
+
--ui-tabs-indicator-bg: var(--color-muted);
|
|
33
33
|
--ui-tabs-indicator-radius: var(--ui-field-inset-child-radius);
|
|
34
34
|
--ui-tabs-indicator-corner-shape: var(--ui-field-corner-shape);
|
|
35
|
-
--ui-tabs-indicator-shadow:
|
|
35
|
+
--ui-tabs-indicator-shadow: none;
|
|
36
36
|
--ui-tabs-indicator-inset: var(--ui-tabs-track-p);
|
|
37
37
|
--ui-tabs-indicator-border-width: 1px;
|
|
38
38
|
--ui-tabs-indicator-border-style: solid;
|
|
@@ -6,7 +6,13 @@
|
|
|
6
6
|
* @uses interestfor: Interest Invokers API (Chromium 142+; polyfill via invokers)
|
|
7
7
|
* @uses data-tooltip-slot="content": hint popover (light dismiss, auto-hides sibling hints)
|
|
8
8
|
* @uses anchor-name, position-anchor, position-area, position-try-fallbacks:
|
|
9
|
-
* explicit anchors for polyfill; data-popover-side maps to --ui-popover-position
|
|
9
|
+
* explicit anchors for polyfill; data-popover-side maps to --ui-popover-position-*.
|
|
10
|
+
* Chromium (151) draws one of a newly opened anchored element's first two frames
|
|
11
|
+
* without its scroll compensation, so in a scrolled container or page the
|
|
12
|
+
* tooltip flashes far from its trigger. Opening, the fade starts 34ms (two
|
|
13
|
+
* 60Hz frames) late, so that frame paints transparent; a later one would be
|
|
14
|
+
* nearly so. A custom --ui-tooltip-transition keeps
|
|
15
|
+
* the delay on its first entry.
|
|
10
16
|
* @uses corner-shape — superellipse corners; unsupported browsers keep plain
|
|
11
17
|
* rounded corners
|
|
12
18
|
* @uses :dir(rtl): inline-side origins and slide-in mirror; the arrow uses logical insets
|
|
@@ -110,6 +116,11 @@
|
|
|
110
116
|
display: flex;
|
|
111
117
|
opacity: var(--ui-tooltip-opacity--end);
|
|
112
118
|
transform: scale(var(--ui-tooltip-scale--end)) translate3d(var(--ui-tooltip-translate--end));
|
|
119
|
+
/* opening, the fade waits out the frames Chromium may misplace (see the header);
|
|
120
|
+
one delay per --ui-tooltip-transition entry: opacity, transform, overlay, display */
|
|
121
|
+
transition-delay:
|
|
122
|
+
calc(var(--ui-tooltip-transition-delay) + 34ms), var(--ui-tooltip-transition-delay),
|
|
123
|
+
var(--ui-tooltip-transition-delay), var(--ui-tooltip-transition-delay);
|
|
113
124
|
|
|
114
125
|
@starting-style {
|
|
115
126
|
opacity: var(--ui-tooltip-opacity--start);
|