@slotted/styles 0.1.0-beta.4 → 0.1.0-beta.40
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/package.json +21 -1
- package/src/accordion/accordion.css +31 -13
- package/src/accordion/accordion.tokens.json +2 -0
- package/src/action-bar/action-bar.css +47 -44
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +39 -39
- package/src/alert/alert.css +97 -97
- package/src/alert/alert.tokens.json +6 -1
- package/src/app-shell/app-shell.css +472 -342
- package/src/app-shell/app-shell.tokens.json +6 -3
- package/src/aspect-ratio/aspect-ratio.css +24 -23
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +97 -67
- package/src/avatar/avatar.tokens.json +8 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +58 -47
- package/src/badge/badge.tokens.json +6 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +408 -93
- package/src/button/button.tokens.json +13 -0
- package/src/button-group/button-group.css +80 -79
- package/src/button-group/button-group.tokens.json +1 -0
- package/src/calendar/calendar.css +594 -267
- package/src/calendar/calendar.tokens.json +35 -3
- package/src/card/card.css +133 -70
- package/src/card/card.tokens.json +1 -0
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +174 -159
- package/src/cascader/cascader.tokens.json +2 -0
- package/src/chart/chart.css +300 -271
- package/src/chart/chart.tokens.json +5 -0
- package/src/checkbox/checkbox.css +190 -148
- package/src/checkbox/checkbox.tokens.json +4 -0
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/clock/clock.css +246 -0
- package/src/clock/clock.tokens.json +44 -0
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +273 -85
- package/src/collapsible/collapsible.tokens.json +6 -0
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +219 -132
- package/src/combobox/combobox.tokens.json +4 -0
- package/src/command-palette/command-palette.css +214 -102
- package/src/command-palette/command-palette.tokens.json +4 -0
- package/src/container/container.css +27 -27
- package/src/context-menu/context-menu.css +9 -9
- package/src/currency-field/currency-field.css +119 -119
- package/src/currency-field/currency-field.tokens.json +1 -0
- package/src/dashboard-grid/dashboard-grid.css +231 -115
- package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
- package/src/data-grid/data-grid.css +637 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +93 -76
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +62 -57
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +31 -269
- package/src/date-picker/date-picker.tokens.json +1 -21
- package/src/date-range-picker/date-range-picker.css +72 -528
- package/src/date-range-picker/date-range-picker.tokens.json +1 -37
- package/src/datetime-field/datetime-field.css +90 -90
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +49 -711
- package/src/datetime-picker/datetime-picker.tokens.json +1 -50
- package/src/datetime-range-picker/datetime-range-picker.css +60 -985
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
- package/src/description-list/description-list.css +120 -76
- package/src/description-list/description-list.tokens.json +1 -0
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +462 -199
- package/src/dialog/dialog.tokens.json +10 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +736 -237
- package/src/drawer/drawer.tokens.json +15 -0
- package/src/entity-picker/entity-picker.css +402 -272
- package/src/entity-picker/entity-picker.tokens.json +6 -0
- package/src/event-calendar/event-calendar.css +357 -399
- package/src/field/field.css +106 -93
- package/src/field/field.tokens.json +2 -0
- package/src/field-group/field-group.css +58 -38
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +224 -216
- package/src/floating-panel/floating-panel.css +147 -0
- package/src/floating-panel/floating-panel.tokens.json +32 -0
- package/src/form/form.css +103 -26
- package/src/form/form.tokens.json +6 -1
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +32 -31
- package/src/highlight/highlight.css +11 -11
- package/src/hover-card/hover-card.css +9 -9
- package/src/icon/icon.css +67 -20
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +42 -42
- package/src/import-export-center/import-export-center.css +147 -168
- package/src/import-export-center/import-export-center.tokens.json +1 -0
- package/src/inline/inline.css +29 -29
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +5 -0
- package/src/kbd/kbd.css +63 -51
- package/src/kbd/kbd.tokens.json +4 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +55 -24
- package/src/list/list.tokens.json +2 -0
- package/src/list-item/list-item.css +195 -80
- package/src/list-item/list-item.tokens.json +10 -0
- package/src/listbox/listbox.css +121 -72
- package/src/listbox/listbox.tokens.json +6 -1
- package/src/loading-overlay/loading-overlay.css +86 -103
- package/src/markdown/markdown.css +20 -20
- package/src/media-viewer/media-viewer.css +790 -0
- package/src/media-viewer/media-viewer.tokens.json +53 -0
- package/src/menu/menu.css +166 -83
- package/src/menu/menu.tokens.json +3 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1296 -1243
- package/src/message/message.tokens.json +14 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/meter/meter.css +136 -0
- package/src/meter/meter.tokens.json +23 -0
- package/src/multi-select/multi-select.css +246 -174
- package/src/multi-select/multi-select.tokens.json +3 -0
- package/src/navigation-menu/navigation-menu.css +170 -191
- package/src/navigation-menu/navigation-menu.tokens.json +1 -0
- package/src/notification-center/notification-center.css +155 -163
- package/src/notification-center/notification-center.tokens.json +4 -0
- package/src/number-field/number-field.css +93 -93
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +74 -64
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +109 -31
- package/src/page/page.tokens.json +8 -0
- package/src/page-header/page-header.css +342 -287
- package/src/page-header/page-header.tokens.json +6 -1
- package/src/pagination/pagination.css +75 -79
- package/src/picker-panel/picker-panel.css +1074 -0
- package/src/picker-panel/picker-panel.tokens.json +77 -0
- package/src/popover/popover.css +85 -65
- package/src/popover/popover.tokens.json +2 -0
- package/src/progress-indicator/progress-indicator.css +194 -137
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +274 -116
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +77 -82
- package/src/radio-group/radio-group.css +107 -112
- package/src/rating/rating.css +147 -143
- package/src/rating/rating.tokens.json +2 -0
- package/src/result-state/result-state.css +95 -102
- package/src/result-state/result-state.tokens.json +1 -0
- package/src/runtime-properties.mjs +44 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +50 -37
- package/src/section/section.css +311 -46
- package/src/section/section.tokens.json +13 -1
- package/src/segmented-control/segmented-control.css +221 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +226 -149
- package/src/select/select.tokens.json +4 -0
- package/src/side-navigation/side-navigation.css +204 -201
- package/src/side-navigation/side-navigation.tokens.json +2 -0
- package/src/skeleton/skeleton.css +76 -58
- package/src/slider/slider.css +108 -104
- package/src/slider/slider.tokens.json +1 -0
- package/src/sparkline/sparkline.css +75 -53
- package/src/sparkline/sparkline.tokens.json +2 -0
- package/src/spinner/spinner.css +83 -180
- package/src/spinner/spinner.tokens.json +0 -1
- package/src/split-button/split-button.css +34 -35
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +47 -48
- package/src/stack/stack.css +26 -26
- package/src/stat-card/stat-card.css +420 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +126 -101
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +143 -125
- package/src/switch/switch.tokens.json +4 -0
- package/src/table/table.css +653 -222
- package/src/table/table.tokens.json +10 -0
- package/src/table-of-contents/table-of-contents.css +60 -59
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +327 -294
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +113 -89
- package/src/tag/tag.tokens.json +11 -0
- package/src/tags-input/tags-input.css +152 -87
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +146 -148
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +38 -33
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +82 -77
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +30 -519
- package/src/time-picker/time-picker.tokens.json +1 -38
- package/src/time-range-picker/time-range-picker.css +53 -895
- package/src/time-range-picker/time-range-picker.tokens.json +1 -66
- package/src/timeline/timeline.css +280 -292
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +139 -122
- package/src/toast/toast.tokens.json +7 -0
- package/src/toggle/toggle.css +34 -38
- package/src/toggle-group/toggle-group.css +73 -77
- package/src/toolbar/toolbar.css +49 -40
- package/src/toolbar/toolbar.tokens.json +2 -1
- package/src/tooltip/tooltip.css +95 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +253 -269
- package/src/top-navigation/top-navigation.tokens.json +1 -0
- package/src/tour/tour.css +68 -74
- package/src/tour/tour.tokens.json +1 -0
- package/src/transfer/transfer.css +164 -168
- package/src/tree/tree.css +118 -122
- package/src/typography/typography.css +67 -38
- package/src/typography/typography.tokens.json +2 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
package/src/slider/slider.css
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* `--_position` on a thumb or a mark, `--_start` and `--_end` on the fill.
|
|
19
19
|
* A percentage of a track is geometry and geometry is not a token.
|
|
20
20
|
*/
|
|
21
|
-
[data-ui
|
|
21
|
+
[data-ui-slider][data-part-root] {
|
|
22
22
|
/**
|
|
23
23
|
* Type, glyph and gap come from the control scales — the only ones the
|
|
24
24
|
* theme restates per density — so a slider in a dense row shrinks whole
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
* under one. Marks are ruler ticks outside the rail rather than dots on
|
|
60
60
|
* it, because a dot on the rail has to be legible against the fill and
|
|
61
61
|
* against the empty channel at once, and in the `high-contrast` scheme —
|
|
62
|
-
* where the palette is two
|
|
62
|
+
* where the palette is two colors — it cannot be both.
|
|
63
63
|
*/
|
|
64
64
|
--_mark-gap: calc(
|
|
65
65
|
(var(--_thumb-size) - var(--_track-size)) / 2 + var(--slotted-space-1, 0.125rem)
|
|
@@ -113,23 +113,23 @@
|
|
|
113
113
|
* them and no rail at all. A vertical slider is left alone: its cross
|
|
114
114
|
* measurement is the band, and its length is its own.
|
|
115
115
|
*/
|
|
116
|
-
[data-ui
|
|
116
|
+
[data-ui-slider][data-part-root][data-orientation='horizontal'] {
|
|
117
117
|
inline-size: 100%;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
[data-ui
|
|
120
|
+
[data-ui-slider][data-part-root][data-size='sm'] {
|
|
121
121
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
122
122
|
--_gap: var(--slotted-control-gap-sm, 6px);
|
|
123
123
|
--_icon-size: var(--slotted-control-icon-size-sm, 14px);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
[data-ui
|
|
126
|
+
[data-ui-slider][data-part-root][data-size='md'] {
|
|
127
127
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
128
128
|
--_gap: var(--slotted-control-gap-md, 8px);
|
|
129
129
|
--_icon-size: var(--slotted-control-icon-size-md, 16px);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
[data-ui
|
|
132
|
+
[data-ui-slider][data-part-root][data-size='lg'] {
|
|
133
133
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
134
134
|
--_gap: var(--slotted-control-gap-lg, 8px);
|
|
135
135
|
--_icon-size: var(--slotted-control-icon-size-lg, 18px);
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
* tabular figures because a number that changes under a drag must not change
|
|
143
143
|
* width while it does.
|
|
144
144
|
*/
|
|
145
|
-
[data-ui
|
|
145
|
+
[data-ui-slider] > [data-part-output] {
|
|
146
146
|
align-self: flex-end;
|
|
147
147
|
color: var(--slotted-slider-output-color, var(--slotted-text, CanvasText));
|
|
148
148
|
font-variant-numeric: tabular-nums;
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
* and a scroll of the page are the same gesture, and the one the pointer
|
|
160
160
|
* started on the control is the drag.
|
|
161
161
|
*/
|
|
162
|
-
[data-ui
|
|
162
|
+
[data-ui-slider] [data-part-control] {
|
|
163
163
|
align-items: center;
|
|
164
164
|
/**
|
|
165
165
|
* The reserve for the two half thumbs comes out of the band rather than
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
-webkit-tap-highlight-color: transparent;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
[data-ui
|
|
181
|
+
[data-ui-slider][data-orientation='horizontal'] [data-part-control] {
|
|
182
182
|
block-size: var(--_control-size);
|
|
183
183
|
inline-size: 100%;
|
|
184
184
|
padding-inline: calc(var(--_thumb-size) / 2);
|
|
@@ -190,8 +190,8 @@
|
|
|
190
190
|
* finger's width above its own rail, reading as a separate line rather than
|
|
191
191
|
* as this control's value.
|
|
192
192
|
*/
|
|
193
|
-
[data-ui
|
|
194
|
-
[data-part
|
|
193
|
+
[data-ui-slider][data-orientation='horizontal']:not([data-value-label='none'])
|
|
194
|
+
[data-part-control] {
|
|
195
195
|
margin-block-start: max(0px, calc(var(--_bubble-size) - var(--_gap)));
|
|
196
196
|
}
|
|
197
197
|
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
* cost more than the overlap it prevented.
|
|
203
203
|
*/
|
|
204
204
|
|
|
205
|
-
[data-ui
|
|
205
|
+
[data-ui-slider][data-orientation='vertical'] [data-part-control] {
|
|
206
206
|
/**
|
|
207
207
|
* A vertical slider has no intrinsic length, so it takes one: ten thumbs
|
|
208
208
|
* is a scale a reader can point at, and a consumer who wants another one
|
|
@@ -226,21 +226,21 @@
|
|
|
226
226
|
* than discovered, so a family below the slider does not move when a label
|
|
227
227
|
* appears.
|
|
228
228
|
*/
|
|
229
|
-
[data-ui
|
|
229
|
+
[data-ui-slider][data-orientation='horizontal'][data-marks='ticks'] [data-part-control] {
|
|
230
230
|
margin-block-end: var(--_mark-length);
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
[data-ui
|
|
233
|
+
[data-ui-slider][data-orientation='horizontal'][data-marks='labelled'] [data-part-control] {
|
|
234
234
|
margin-block-end: calc(
|
|
235
235
|
var(--_mark-length) + var(--slotted-space-1, 0.125rem) + var(--_mark-label-line)
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
[data-ui
|
|
239
|
+
[data-ui-slider][data-orientation='vertical'][data-marks='ticks'] [data-part-control] {
|
|
240
240
|
margin-inline-end: var(--_mark-length);
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
-
[data-ui
|
|
243
|
+
[data-ui-slider][data-orientation='vertical'][data-marks='labelled'] [data-part-control] {
|
|
244
244
|
margin-inline-end: calc(
|
|
245
245
|
var(--_mark-length) + var(--slotted-space-1, 0.125rem) + var(--_mark-label-size)
|
|
246
246
|
);
|
|
@@ -255,11 +255,17 @@
|
|
|
255
255
|
* capture showed a black rail with a nearly black fill on it.
|
|
256
256
|
*
|
|
257
257
|
* It is inset by half a thumb at each end of the control, so the scale's two
|
|
258
|
-
* bounds are the two places a thumb's
|
|
258
|
+
* bounds are the two places a thumb's center can reach and the thumb itself
|
|
259
259
|
* stays inside the band.
|
|
260
260
|
*/
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
/* `--slotted-slider-track-background` takes any background, a gradient
|
|
262
|
+
included: a scale whose colors are what each position yields. With it,
|
|
263
|
+
`indicator={false}` leaves the scale whole on both sides of the thumb. */
|
|
264
|
+
[data-ui-slider] [data-part-track] {
|
|
265
|
+
background: var(
|
|
266
|
+
--slotted-slider-track-background,
|
|
267
|
+
var(--slotted-slider-track-color, var(--slotted-surface-sunken, Canvas))
|
|
268
|
+
);
|
|
263
269
|
border: var(--slotted-control-border-width, 1px) solid
|
|
264
270
|
var(--slotted-slider-track-border-color, var(--slotted-control-border-color, ButtonBorder));
|
|
265
271
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
@@ -267,12 +273,12 @@
|
|
|
267
273
|
position: relative;
|
|
268
274
|
}
|
|
269
275
|
|
|
270
|
-
[data-ui
|
|
276
|
+
[data-ui-slider][data-orientation='horizontal'] [data-part-track] {
|
|
271
277
|
block-size: var(--_track-size);
|
|
272
278
|
inline-size: 100%;
|
|
273
279
|
}
|
|
274
280
|
|
|
275
|
-
[data-ui
|
|
281
|
+
[data-ui-slider][data-orientation='vertical'] [data-part-track] {
|
|
276
282
|
block-size: 100%;
|
|
277
283
|
inline-size: var(--_track-size);
|
|
278
284
|
}
|
|
@@ -280,7 +286,7 @@
|
|
|
280
286
|
/**
|
|
281
287
|
* The filled portion, between the origin and the value. `--_start` and
|
|
282
288
|
* `--_end` are two percentages rather than a length and an offset, so a
|
|
283
|
-
* range fills between its thumbs and a slider with a
|
|
289
|
+
* range fills between its thumbs and a slider with a centerd origin fills
|
|
284
290
|
* outward from the middle with the same two declarations.
|
|
285
291
|
*
|
|
286
292
|
* On the cross axis it is laid against the track's *border* box and not its
|
|
@@ -297,7 +303,7 @@
|
|
|
297
303
|
* overhung there would leave a pixel of accent past the value at one end and
|
|
298
304
|
* cover the cap at the other.
|
|
299
305
|
*/
|
|
300
|
-
[data-ui
|
|
306
|
+
[data-ui-slider] [data-part-indicator] {
|
|
301
307
|
--_edge-overlap: calc(var(--slotted-control-border-width, 1px) * -1);
|
|
302
308
|
|
|
303
309
|
background-color: var(--slotted-slider-indicator-color, var(--slotted-tone-accent-solid));
|
|
@@ -305,13 +311,13 @@
|
|
|
305
311
|
position: absolute;
|
|
306
312
|
}
|
|
307
313
|
|
|
308
|
-
[data-ui
|
|
314
|
+
[data-ui-slider][data-orientation='horizontal'] [data-part-indicator] {
|
|
309
315
|
inset-block: var(--_edge-overlap);
|
|
310
316
|
inset-inline-start: calc(var(--_start, 0) * 1%);
|
|
311
317
|
inline-size: calc((var(--_end, 0) - var(--_start, 0)) * 1%);
|
|
312
318
|
}
|
|
313
319
|
|
|
314
|
-
[data-ui
|
|
320
|
+
[data-ui-slider][data-orientation='vertical'] [data-part-indicator] {
|
|
315
321
|
inset-inline: var(--_edge-overlap);
|
|
316
322
|
inset-block-end: calc(var(--_start, 0) * 1%);
|
|
317
323
|
block-size: calc((var(--_end, 0) - var(--_start, 0)) * 1%);
|
|
@@ -323,12 +329,12 @@
|
|
|
323
329
|
* the rail would have to read against the fill and against the empty channel
|
|
324
330
|
* at once; beside it, it reads against the page in every scheme.
|
|
325
331
|
*/
|
|
326
|
-
[data-ui
|
|
332
|
+
[data-ui-slider] [data-part-mark] {
|
|
327
333
|
background-color: var(--slotted-slider-mark-color, var(--slotted-border-strong, CanvasText));
|
|
328
334
|
position: absolute;
|
|
329
335
|
}
|
|
330
336
|
|
|
331
|
-
[data-ui
|
|
337
|
+
[data-ui-slider][data-orientation='horizontal'] [data-part-mark] {
|
|
332
338
|
block-size: var(--_mark-length);
|
|
333
339
|
inline-size: var(--slotted-border-width-thin, 1px);
|
|
334
340
|
inset-block-start: calc(100% + var(--_mark-gap));
|
|
@@ -336,7 +342,7 @@
|
|
|
336
342
|
margin-inline-start: calc(var(--slotted-border-width-thin, 1px) / -2);
|
|
337
343
|
}
|
|
338
344
|
|
|
339
|
-
[data-ui
|
|
345
|
+
[data-ui-slider][data-orientation='vertical'] [data-part-mark] {
|
|
340
346
|
block-size: var(--slotted-border-width-thin, 1px);
|
|
341
347
|
inline-size: var(--_mark-length);
|
|
342
348
|
inset-inline-start: calc(100% + var(--_mark-gap));
|
|
@@ -344,7 +350,7 @@
|
|
|
344
350
|
margin-block-end: calc(var(--slotted-border-width-thin, 1px) / -2);
|
|
345
351
|
}
|
|
346
352
|
|
|
347
|
-
[data-ui
|
|
353
|
+
[data-ui-slider] [data-part-mark-label] {
|
|
348
354
|
color: var(--slotted-slider-mark-label-color, var(--slotted-text-muted, GrayText));
|
|
349
355
|
display: block;
|
|
350
356
|
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
@@ -364,21 +370,21 @@
|
|
|
364
370
|
unicode-bidi: plaintext;
|
|
365
371
|
}
|
|
366
372
|
|
|
367
|
-
[data-ui
|
|
373
|
+
[data-ui-slider][data-orientation='horizontal'] [data-part-mark-label] {
|
|
368
374
|
inset-block-start: calc(100% + var(--slotted-space-1, 0.125rem));
|
|
369
375
|
inset-inline-start: 50%;
|
|
370
376
|
translate: -50% 0;
|
|
371
377
|
}
|
|
372
378
|
|
|
373
379
|
/**
|
|
374
|
-
* The label at either end of the scale is aligned inside rather than
|
|
375
|
-
* on its tick.
|
|
376
|
-
* of the `marks` scene showed "
|
|
380
|
+
* The label at either end of the scale is aligned inside rather than centerd
|
|
381
|
+
* on its tick. Centerd, half of it hangs off the control: the first capture
|
|
382
|
+
* of the `marks` scene showed "Maximum" clipped by the edge of the cell, and
|
|
377
383
|
* a scale whose last label cannot be read is a scale with four labels.
|
|
378
384
|
*/
|
|
379
|
-
[data-ui
|
|
380
|
-
[data-part
|
|
381
|
-
[data-part
|
|
385
|
+
[data-ui-slider][data-orientation='horizontal']
|
|
386
|
+
[data-part-mark][data-edge='start']
|
|
387
|
+
[data-part-mark-label] {
|
|
382
388
|
inset-inline-start: 0;
|
|
383
389
|
text-align: start;
|
|
384
390
|
translate: 0 0;
|
|
@@ -388,17 +394,17 @@
|
|
|
388
394
|
* An edge label takes its own measure and grows inward. The shared cap makes
|
|
389
395
|
* a word longer than the cap overflow toward the inline end, which for the
|
|
390
396
|
* label at the end of the scale is off the control: the 240-pixel capture
|
|
391
|
-
* printed "
|
|
397
|
+
* printed "Maximum" over the edge of its own cell.
|
|
392
398
|
*/
|
|
393
|
-
[data-ui
|
|
394
|
-
[data-part
|
|
395
|
-
[data-part
|
|
399
|
+
[data-ui-slider][data-orientation='horizontal']
|
|
400
|
+
[data-part-mark][data-edge]
|
|
401
|
+
[data-part-mark-label] {
|
|
396
402
|
max-inline-size: none;
|
|
397
403
|
}
|
|
398
404
|
|
|
399
|
-
[data-ui
|
|
400
|
-
[data-part
|
|
401
|
-
[data-part
|
|
405
|
+
[data-ui-slider][data-orientation='horizontal']
|
|
406
|
+
[data-part-mark][data-edge='end']
|
|
407
|
+
[data-part-mark-label] {
|
|
402
408
|
inset-inline-end: 0;
|
|
403
409
|
inset-inline-start: auto;
|
|
404
410
|
text-align: end;
|
|
@@ -409,15 +415,15 @@
|
|
|
409
415
|
* The one place this family names a side, and only in the mirrored document.
|
|
410
416
|
* `translate` is a physical transform: a percentage along the inline axis
|
|
411
417
|
* moves the box left in both directions, so a right-to-left page would hang
|
|
412
|
-
* every
|
|
418
|
+
* every centerd label half a box off its own tick.
|
|
413
419
|
*/
|
|
414
|
-
[data-ui
|
|
415
|
-
[data-part
|
|
416
|
-
[data-part
|
|
420
|
+
[data-ui-slider][data-orientation='horizontal']:dir(rtl)
|
|
421
|
+
[data-part-mark]:not([data-edge])
|
|
422
|
+
[data-part-mark-label] {
|
|
417
423
|
translate: 50% 0;
|
|
418
424
|
}
|
|
419
425
|
|
|
420
|
-
[data-ui
|
|
426
|
+
[data-ui-slider][data-orientation='vertical'] [data-part-mark-label] {
|
|
421
427
|
inset-block-start: 50%;
|
|
422
428
|
inset-inline-start: calc(100% + var(--slotted-space-1, 0.125rem));
|
|
423
429
|
text-align: start;
|
|
@@ -426,11 +432,11 @@
|
|
|
426
432
|
|
|
427
433
|
/* ── The thumb ────────────────────────────────────────────────────────
|
|
428
434
|
*
|
|
429
|
-
*
|
|
435
|
+
* Centerd on its position by a logical margin rather than by `translate`, so
|
|
430
436
|
* the mirrored document needs no rule of its own: `margin-inline-start`
|
|
431
437
|
* measures from whichever edge `inset-inline-start` measured from.
|
|
432
438
|
*/
|
|
433
|
-
[data-ui
|
|
439
|
+
[data-ui-slider] [data-part-thumb] {
|
|
434
440
|
background-color: var(--slotted-slider-thumb-color, var(--slotted-surface, Canvas));
|
|
435
441
|
block-size: var(--_thumb-size);
|
|
436
442
|
border: var(--slotted-border-width-thick, 2px) solid
|
|
@@ -451,14 +457,14 @@
|
|
|
451
457
|
scale var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
452
458
|
}
|
|
453
459
|
|
|
454
|
-
[data-ui
|
|
460
|
+
[data-ui-slider][data-orientation='horizontal'] [data-part-thumb] {
|
|
455
461
|
inset-block-start: 50%;
|
|
456
462
|
inset-inline-start: calc(var(--_position, 0) * 1%);
|
|
457
463
|
margin-block-start: calc(var(--_thumb-size) / -2);
|
|
458
464
|
margin-inline-start: calc(var(--_thumb-size) / -2);
|
|
459
465
|
}
|
|
460
466
|
|
|
461
|
-
[data-ui
|
|
467
|
+
[data-ui-slider][data-orientation='vertical'] [data-part-thumb] {
|
|
462
468
|
inset-block-end: calc(var(--_position, 0) * 1%);
|
|
463
469
|
inset-inline-start: 50%;
|
|
464
470
|
margin-block-end: calc(var(--_thumb-size) / -2);
|
|
@@ -470,7 +476,7 @@
|
|
|
470
476
|
* the value set and its place in the form; the box around it is what a
|
|
471
477
|
* reader sees, and the family's own pointer handling is what moves it.
|
|
472
478
|
*/
|
|
473
|
-
[data-ui
|
|
479
|
+
[data-ui-slider] [data-part-input] {
|
|
474
480
|
appearance: none;
|
|
475
481
|
block-size: 100%;
|
|
476
482
|
inline-size: 100%;
|
|
@@ -492,13 +498,13 @@
|
|
|
492
498
|
* content that ran out of its box on every dense stage. The native parts are
|
|
493
499
|
* withdrawn to nothing, as `text-field` withdraws the search decorations.
|
|
494
500
|
*/
|
|
495
|
-
[data-ui
|
|
501
|
+
[data-ui-slider] [data-part-input]::-webkit-slider-thumb {
|
|
496
502
|
appearance: none;
|
|
497
503
|
block-size: 0;
|
|
498
504
|
inline-size: 0;
|
|
499
505
|
}
|
|
500
506
|
|
|
501
|
-
[data-ui
|
|
507
|
+
[data-ui-slider] [data-part-input]::-webkit-slider-runnable-track {
|
|
502
508
|
block-size: 0;
|
|
503
509
|
}
|
|
504
510
|
|
|
@@ -509,7 +515,7 @@
|
|
|
509
515
|
* beneath it already announces the value, and a second copy would announce
|
|
510
516
|
* it twice.
|
|
511
517
|
*/
|
|
512
|
-
[data-ui
|
|
518
|
+
[data-ui-slider] [data-part-bubble] {
|
|
513
519
|
background-color: var(--slotted-slider-bubble-background, var(--slotted-surface-inverse));
|
|
514
520
|
border-radius: var(--slotted-radius-sm, 4px);
|
|
515
521
|
color: var(--slotted-slider-bubble-color, var(--slotted-text-inverse));
|
|
@@ -535,13 +541,13 @@
|
|
|
535
541
|
unicode-bidi: plaintext;
|
|
536
542
|
}
|
|
537
543
|
|
|
538
|
-
[data-ui
|
|
544
|
+
[data-ui-slider][data-orientation='horizontal'] [data-part-bubble] {
|
|
539
545
|
inset-block-end: calc(100% + var(--slotted-space-2, 0.25rem));
|
|
540
546
|
inset-inline-start: 50%;
|
|
541
547
|
translate: -50% 0;
|
|
542
548
|
}
|
|
543
549
|
|
|
544
|
-
[data-ui
|
|
550
|
+
[data-ui-slider][data-orientation='horizontal']:dir(rtl) [data-part-bubble] {
|
|
545
551
|
translate: 50% 0;
|
|
546
552
|
}
|
|
547
553
|
|
|
@@ -550,7 +556,7 @@
|
|
|
550
556
|
* on the other one. Two overlays on one edge is a scale whose labels sit
|
|
551
557
|
* under its own values.
|
|
552
558
|
*/
|
|
553
|
-
[data-ui
|
|
559
|
+
[data-ui-slider][data-orientation='vertical'] [data-part-bubble] {
|
|
554
560
|
inset-block-start: 50%;
|
|
555
561
|
inset-inline-end: calc(100% + var(--slotted-space-2, 0.25rem));
|
|
556
562
|
translate: 0 -50%;
|
|
@@ -562,15 +568,13 @@
|
|
|
562
568
|
* alone, so nothing moves under a reader who asked for stillness — the
|
|
563
569
|
* duration token collapses and the bubble simply appears.
|
|
564
570
|
*/
|
|
565
|
-
[data-ui
|
|
566
|
-
[data-ui
|
|
567
|
-
[data-ui
|
|
568
|
-
[data-part='thumb']:has(> [data-part='input']:focus-visible)
|
|
569
|
-
[data-part='bubble'] {
|
|
571
|
+
[data-ui-slider][data-value-label='always'] [data-part-bubble],
|
|
572
|
+
[data-ui-slider][data-dragging] [data-part-thumb][data-active] [data-part-bubble],
|
|
573
|
+
[data-ui-slider] [data-part-thumb]:has(> [data-part-input]:focus-visible) [data-part-bubble] {
|
|
570
574
|
opacity: 1;
|
|
571
575
|
}
|
|
572
576
|
|
|
573
|
-
[data-ui
|
|
577
|
+
[data-ui-slider][data-value-label='none'] [data-part-bubble] {
|
|
574
578
|
display: none;
|
|
575
579
|
}
|
|
576
580
|
|
|
@@ -580,8 +584,8 @@
|
|
|
580
584
|
* ones it can meet, which is the order `STATE_PRECEDENCE` sets.
|
|
581
585
|
*/
|
|
582
586
|
|
|
583
|
-
[data-ui
|
|
584
|
-
[data-part
|
|
587
|
+
[data-ui-slider]:not([data-disabled]):not([data-readonly])
|
|
588
|
+
[data-part-thumb]:hover:not(:disabled) {
|
|
585
589
|
background-color: var(
|
|
586
590
|
--slotted-slider-thumb-hover-background,
|
|
587
591
|
var(--slotted-tone-accent-surface)
|
|
@@ -589,15 +593,15 @@
|
|
|
589
593
|
}
|
|
590
594
|
|
|
591
595
|
/**
|
|
592
|
-
* The thumb grows under the press rather than only changing
|
|
596
|
+
* The thumb grows under the press rather than only changing color. It is
|
|
593
597
|
* the one movement in the family that carries information — the control has
|
|
594
598
|
* taken the gesture — and it collapses with the duration token under reduced
|
|
595
599
|
* motion.
|
|
596
600
|
*/
|
|
597
|
-
[data-ui
|
|
598
|
-
[data-part
|
|
599
|
-
[data-ui
|
|
600
|
-
[data-part
|
|
601
|
+
[data-ui-slider]:not([data-disabled]):not([data-readonly])
|
|
602
|
+
[data-part-thumb]:active:not(:disabled),
|
|
603
|
+
[data-ui-slider][data-dragging]:not([data-disabled]):not([data-readonly])
|
|
604
|
+
[data-part-thumb][data-active] {
|
|
601
605
|
cursor: grabbing;
|
|
602
606
|
scale: 1.15;
|
|
603
607
|
}
|
|
@@ -606,7 +610,7 @@
|
|
|
606
610
|
* The ring belongs to the thumb and answers the input's focus. The input is
|
|
607
611
|
* `opacity: 0`, so nothing else in the family could draw it.
|
|
608
612
|
*/
|
|
609
|
-
[data-ui
|
|
613
|
+
[data-ui-slider] [data-part-thumb]:has(> [data-part-input]:focus-visible) {
|
|
610
614
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
611
615
|
var(--slotted-focus-ring-color, Highlight);
|
|
612
616
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
@@ -617,23 +621,23 @@
|
|
|
617
621
|
* Invalid outranks hover and is written after it for that reason. The ring is
|
|
618
622
|
* retargeted rather than repainted: every rule that draws focus reads
|
|
619
623
|
* `--slotted-focus-ring-color`, so pointing that one name at the invalid
|
|
620
|
-
*
|
|
624
|
+
* color moves the outline and the shadow together.
|
|
621
625
|
*/
|
|
622
|
-
[data-ui
|
|
626
|
+
[data-ui-slider][data-part-root][data-invalid] {
|
|
623
627
|
--slotted-focus-ring-color: var(
|
|
624
628
|
--slotted-slider-invalid-focus-ring-color,
|
|
625
629
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
626
630
|
);
|
|
627
631
|
}
|
|
628
632
|
|
|
629
|
-
[data-ui
|
|
633
|
+
[data-ui-slider][data-invalid] [data-part-indicator] {
|
|
630
634
|
background-color: var(
|
|
631
635
|
--slotted-slider-invalid-indicator-color,
|
|
632
636
|
var(--slotted-tone-danger-solid)
|
|
633
637
|
);
|
|
634
638
|
}
|
|
635
639
|
|
|
636
|
-
[data-ui
|
|
640
|
+
[data-ui-slider][data-invalid] [data-part-thumb] {
|
|
637
641
|
--_invalid-edge-width: var(
|
|
638
642
|
--slotted-slider-invalid-edge-width,
|
|
639
643
|
var(--slotted-control-invalid-edge-width, 1px)
|
|
@@ -649,7 +653,7 @@
|
|
|
649
653
|
var(--slotted-tone-danger-border)
|
|
650
654
|
);
|
|
651
655
|
/*
|
|
652
|
-
* Width as well as
|
|
656
|
+
* Width as well as color (WCAG 1.4.1), the edge `text-field` draws: in
|
|
653
657
|
* `high-contrast` the danger fill and border are the accent's black. The
|
|
654
658
|
* thumb carries it, as a shadow inside its border, so the thumb keeps its
|
|
655
659
|
* size and its place on the track; it takes the resting lift's place.
|
|
@@ -657,7 +661,7 @@
|
|
|
657
661
|
box-shadow: var(--_invalid-edge);
|
|
658
662
|
}
|
|
659
663
|
|
|
660
|
-
[data-ui
|
|
664
|
+
[data-ui-slider][data-invalid] [data-part-thumb]:has(> [data-part-input]:focus-visible) {
|
|
661
665
|
box-shadow:
|
|
662
666
|
var(--_invalid-edge),
|
|
663
667
|
var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
@@ -673,12 +677,12 @@
|
|
|
673
677
|
* the first capture's defect, and it is the one `number-field` found in the
|
|
674
678
|
* same state.
|
|
675
679
|
*/
|
|
676
|
-
[data-ui
|
|
677
|
-
[data-ui
|
|
680
|
+
[data-ui-slider][data-part-root][data-readonly] [data-part-control],
|
|
681
|
+
[data-ui-slider][data-part-root][data-readonly] [data-part-thumb] {
|
|
678
682
|
cursor: default;
|
|
679
683
|
}
|
|
680
684
|
|
|
681
|
-
[data-ui
|
|
685
|
+
[data-ui-slider][data-part-root][data-readonly] [data-part-indicator] {
|
|
682
686
|
background-color: var(--slotted-slider-readonly-indicator-color, var(--slotted-text-muted));
|
|
683
687
|
}
|
|
684
688
|
|
|
@@ -689,7 +693,7 @@
|
|
|
689
693
|
* two tokens the theme keeps apart in every scheme, which is what makes the
|
|
690
694
|
* two states tell themselves apart.
|
|
691
695
|
*/
|
|
692
|
-
[data-ui
|
|
696
|
+
[data-ui-slider][data-part-root][data-readonly] [data-part-thumb] {
|
|
693
697
|
border-color: var(
|
|
694
698
|
--slotted-slider-readonly-thumb-border-color,
|
|
695
699
|
var(--slotted-control-border-color, ButtonBorder)
|
|
@@ -701,8 +705,8 @@
|
|
|
701
705
|
* because a control can be disabled by something that never told it so: a
|
|
702
706
|
* disabled `fieldset` disables every control inside it.
|
|
703
707
|
*/
|
|
704
|
-
[data-ui
|
|
705
|
-
[data-ui
|
|
708
|
+
[data-ui-slider][data-part-root][data-disabled] [data-part-track],
|
|
709
|
+
[data-ui-slider][data-part-root]:has([data-part-input]:disabled) [data-part-track] {
|
|
706
710
|
background-color: var(
|
|
707
711
|
--slotted-slider-disabled-track-color,
|
|
708
712
|
var(--slotted-disabled-background)
|
|
@@ -710,16 +714,16 @@
|
|
|
710
714
|
border-color: var(--slotted-slider-disabled-border-color, var(--slotted-disabled-border));
|
|
711
715
|
}
|
|
712
716
|
|
|
713
|
-
[data-ui
|
|
714
|
-
[data-ui
|
|
717
|
+
[data-ui-slider][data-part-root][data-disabled] [data-part-indicator],
|
|
718
|
+
[data-ui-slider][data-part-root]:has([data-part-input]:disabled) [data-part-indicator] {
|
|
715
719
|
background-color: var(
|
|
716
720
|
--slotted-slider-disabled-indicator-color,
|
|
717
721
|
var(--slotted-disabled-foreground)
|
|
718
722
|
);
|
|
719
723
|
}
|
|
720
724
|
|
|
721
|
-
[data-ui
|
|
722
|
-
[data-ui
|
|
725
|
+
[data-ui-slider][data-part-root][data-disabled] [data-part-thumb],
|
|
726
|
+
[data-ui-slider][data-part-root]:has([data-part-input]:disabled) [data-part-thumb] {
|
|
723
727
|
background-color: var(
|
|
724
728
|
--slotted-slider-disabled-thumb-color,
|
|
725
729
|
var(--slotted-disabled-background)
|
|
@@ -730,60 +734,60 @@
|
|
|
730
734
|
cursor: not-allowed;
|
|
731
735
|
}
|
|
732
736
|
|
|
733
|
-
[data-ui
|
|
734
|
-
[data-ui
|
|
735
|
-
[data-ui
|
|
737
|
+
[data-ui-slider][data-part-root][data-disabled] [data-part-control],
|
|
738
|
+
[data-ui-slider][data-part-root][data-disabled] > [data-part-output],
|
|
739
|
+
[data-ui-slider][data-part-root][data-disabled] [data-part-mark-label] {
|
|
736
740
|
color: var(--slotted-disabled-foreground);
|
|
737
741
|
cursor: not-allowed;
|
|
738
742
|
}
|
|
739
743
|
|
|
740
|
-
[data-ui
|
|
744
|
+
[data-ui-slider][data-part-root][data-disabled] [data-part-mark] {
|
|
741
745
|
background-color: var(--slotted-disabled-foreground);
|
|
742
746
|
}
|
|
743
747
|
|
|
744
748
|
/**
|
|
745
|
-
* The one block the theme cannot write for the family. Under forced
|
|
749
|
+
* The one block the theme cannot write for the family. Under forced colors
|
|
746
750
|
* a background is repainted by the operating system, and the channel, the
|
|
747
751
|
* fill and the thumb are three backgrounds that have to stay three different
|
|
748
|
-
* things — a fill flattened to the channel's
|
|
752
|
+
* things — a fill flattened to the channel's color would leave a slider
|
|
749
753
|
* with no value on it at all.
|
|
750
754
|
*/
|
|
751
755
|
@media (forced-colors: active) {
|
|
752
|
-
[data-ui
|
|
756
|
+
[data-ui-slider] [data-part-track] {
|
|
753
757
|
background-color: ButtonFace;
|
|
754
758
|
border-color: ButtonBorder;
|
|
755
759
|
}
|
|
756
760
|
|
|
757
|
-
[data-ui
|
|
761
|
+
[data-ui-slider] [data-part-indicator] {
|
|
758
762
|
background-color: Highlight;
|
|
759
763
|
}
|
|
760
764
|
|
|
761
|
-
[data-ui
|
|
765
|
+
[data-ui-slider] [data-part-thumb] {
|
|
762
766
|
background-color: ButtonFace;
|
|
763
767
|
border-color: ButtonBorder;
|
|
764
768
|
}
|
|
765
769
|
|
|
766
|
-
[data-ui
|
|
770
|
+
[data-ui-slider] [data-part-mark] {
|
|
767
771
|
background-color: CanvasText;
|
|
768
772
|
}
|
|
769
773
|
|
|
770
|
-
[data-ui
|
|
771
|
-
[data-ui
|
|
774
|
+
[data-ui-slider][data-part-root][data-disabled] [data-part-indicator],
|
|
775
|
+
[data-ui-slider][data-part-root][data-disabled] [data-part-thumb] {
|
|
772
776
|
background-color: Canvas;
|
|
773
777
|
border-color: GrayText;
|
|
774
778
|
}
|
|
775
779
|
|
|
776
|
-
/* The invalid edge is a shadow, which forced
|
|
780
|
+
/* The invalid edge is a shadow, which forced colors remove: it comes back
|
|
777
781
|
as an outline inside the thumb's border, and a focused invalid thumb
|
|
778
782
|
draws its ring double. */
|
|
779
|
-
[data-ui
|
|
783
|
+
[data-ui-slider][data-invalid] [data-part-thumb] {
|
|
780
784
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
781
785
|
outline-offset: calc(
|
|
782
786
|
-1 * (var(--slotted-border-width-thick, 2px) + var(--_invalid-edge-width))
|
|
783
787
|
);
|
|
784
788
|
}
|
|
785
789
|
|
|
786
|
-
[data-ui
|
|
790
|
+
[data-ui-slider][data-invalid] [data-part-thumb]:has(> [data-part-input]:focus-visible) {
|
|
787
791
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
788
792
|
var(--slotted-focus-ring-color, Highlight);
|
|
789
793
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"--slotted-slider-thumb-hover-background",
|
|
56
56
|
"--slotted-slider-thumb-shadow",
|
|
57
57
|
"--slotted-slider-thumb-size",
|
|
58
|
+
"--slotted-slider-track-background",
|
|
58
59
|
"--slotted-slider-track-border-color",
|
|
59
60
|
"--slotted-slider-track-color",
|
|
60
61
|
"--slotted-slider-track-size",
|