@slotted/styles 0.1.0-beta.2 → 0.1.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/accordion/accordion.css +10 -10
- package/src/action-bar/action-bar.css +45 -42
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +36 -36
- package/src/alert/alert.css +68 -67
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +452 -314
- package/src/app-shell/app-shell.tokens.json +5 -2
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +91 -99
- package/src/avatar/avatar.css +71 -41
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +21 -22
- package/src/badge/badge.css +45 -37
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +37 -37
- package/src/button/button.css +149 -68
- package/src/button/button.tokens.json +10 -0
- package/src/button-group/button-group.css +79 -74
- package/src/button-group/button-group.tokens.json +2 -0
- package/src/calendar/calendar.css +133 -103
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/card/card.css +54 -61
- package/src/carousel/carousel.css +150 -161
- package/src/cascader/cascader.css +154 -153
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +258 -248
- package/src/chart/chart.tokens.json +1 -0
- package/src/checkbox/checkbox.css +119 -124
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +81 -85
- package/src/collapsible/collapsible.css +72 -76
- package/src/color-picker/color-picker.css +83 -91
- package/src/column-manager/column-manager.css +106 -114
- package/src/combobox/combobox.css +157 -124
- package/src/combobox/combobox.tokens.json +2 -0
- package/src/command-palette/command-palette.css +103 -90
- package/src/command-palette/command-palette.tokens.json +1 -0
- package/src/container/container.css +24 -24
- package/src/context-menu/context-menu.css +8 -8
- package/src/currency-field/currency-field.css +212 -88
- package/src/currency-field/currency-field.tokens.json +13 -0
- package/src/dashboard-grid/dashboard-grid.css +184 -114
- package/src/data-grid/data-grid.css +535 -470
- package/src/data-grid/data-grid.tokens.json +4 -0
- package/src/data-list/data-list.css +81 -70
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +57 -52
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +75 -57
- package/src/date-picker/date-picker.tokens.json +1 -0
- package/src/date-range-picker/date-range-picker.css +116 -118
- package/src/datetime-field/datetime-field.css +80 -80
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +63 -63
- package/src/datetime-range-picker/datetime-range-picker.css +151 -156
- package/src/description-list/description-list.css +80 -65
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +376 -153
- package/src/dialog/dialog.tokens.json +6 -0
- package/src/divider/divider.css +18 -18
- package/src/drawer/drawer.css +513 -217
- package/src/drawer/drawer.tokens.json +6 -0
- package/src/entity-picker/entity-picker.css +273 -256
- package/src/entity-picker/entity-picker.tokens.json +2 -0
- package/src/event-calendar/event-calendar.css +343 -385
- package/src/field/field.css +74 -78
- package/src/field-group/field-group.css +22 -25
- package/src/filter-bar/filter-bar.css +193 -209
- package/src/form/form.css +34 -24
- package/src/form/form.tokens.json +1 -0
- package/src/fullscreen/fullscreen.css +24 -25
- package/src/grid/grid.css +28 -28
- package/src/highlight/highlight.css +6 -6
- package/src/hover-card/hover-card.css +6 -6
- package/src/icon/icon.css +62 -15
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +39 -39
- package/src/import-export-center/import-export-center.css +135 -156
- package/src/inline/inline.css +27 -27
- package/src/inline-message/inline-message.css +153 -77
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +48 -36
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/link/link.css +36 -15
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +44 -17
- package/src/list/list.tokens.json +4 -0
- package/src/list-item/list-item.css +80 -66
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +56 -59
- package/src/loading-overlay/loading-overlay.css +75 -92
- package/src/markdown/markdown.css +17 -17
- package/src/menu/menu.css +117 -74
- package/src/menu/menu.tokens.json +1 -0
- package/src/menubar/menubar.css +13 -13
- package/src/message/message.css +192 -202
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +41 -42
- package/src/multi-select/multi-select.css +177 -160
- package/src/multi-select/multi-select.tokens.json +1 -0
- package/src/navigation-menu/navigation-menu.css +167 -188
- package/src/notification-center/notification-center.css +140 -148
- package/src/notification-center/notification-center.tokens.json +3 -0
- package/src/number-field/number-field.css +83 -83
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +67 -57
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +39 -23
- package/src/page/page.tokens.json +1 -0
- package/src/page-header/page-header.css +339 -284
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +68 -72
- package/src/popover/popover.css +73 -61
- package/src/popover/popover.tokens.json +1 -0
- package/src/progress-indicator/progress-indicator.css +169 -113
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +251 -104
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +71 -75
- package/src/radio-group/radio-group.css +98 -103
- package/src/rating/rating.css +136 -132
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +74 -77
- package/src/runtime-properties.mjs +2 -0
- package/src/saved-views/saved-views.css +41 -47
- package/src/scroll-area/scroll-area.css +39 -32
- package/src/section/section.css +178 -43
- package/src/section/section.tokens.json +8 -2
- package/src/segmented-control/segmented-control.css +254 -97
- package/src/segmented-control/segmented-control.tokens.json +15 -11
- package/src/select/select.css +153 -132
- package/src/select/select.tokens.json +2 -0
- package/src/side-navigation/side-navigation.css +179 -182
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +47 -48
- package/src/slider/slider.css +86 -88
- package/src/sparkline/sparkline.css +62 -40
- 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 +30 -31
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +35 -35
- package/src/stack/stack.css +24 -24
- package/src/stat-card/stat-card.css +380 -241
- package/src/stat-card/stat-card.tokens.json +5 -0
- package/src/status-indicator/status-indicator.css +107 -82
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +58 -62
- package/src/switch/switch.css +86 -92
- package/src/table/table.css +340 -175
- package/src/table/table.tokens.json +6 -0
- package/src/table-of-contents/table-of-contents.css +57 -56
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +322 -289
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +91 -71
- package/src/tag/tag.tokens.json +9 -0
- package/src/tags-input/tags-input.css +147 -82
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +134 -136
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +33 -28
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +74 -69
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +58 -58
- package/src/time-range-picker/time-range-picker.css +128 -133
- package/src/timeline/timeline.css +254 -266
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +115 -98
- package/src/toast/toast.tokens.json +6 -0
- package/src/toggle/toggle.css +62 -25
- package/src/toggle/toggle.tokens.json +8 -0
- package/src/toggle-group/toggle-group.css +106 -60
- package/src/toggle-group/toggle-group.tokens.json +10 -0
- package/src/toolbar/toolbar.css +30 -35
- package/src/tooltip/tooltip.css +59 -38
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +243 -259
- package/src/tour/tour.css +51 -60
- package/src/transfer/transfer.css +160 -164
- package/src/tree/tree.css +103 -111
- package/src/typography/typography.css +40 -36
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +224 -224
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +185 -197
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* scrolling surface are all `select`'s decisions, taken in the same session
|
|
29
29
|
* and written out in `packages/styles/src/select/select.css`. They are
|
|
30
30
|
* repeated here rather than shared because the two families have two public
|
|
31
|
-
* identifiers, and a stylesheet that painted `[data-ui
|
|
31
|
+
* identifiers, and a stylesheet that painted `[data-ui-select]` from a
|
|
32
32
|
* combobox would make one family's selector match the other's DOM. The
|
|
33
33
|
* duplication is the price of that boundary and it is paid on purpose.
|
|
34
34
|
*
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
/* ── The control ──────────────────────────────────────────────────────── */
|
|
56
56
|
|
|
57
|
-
[data-ui
|
|
57
|
+
[data-ui-combobox][data-part-root] {
|
|
58
58
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
59
59
|
--_height: var(--slotted-control-height-md, 34px);
|
|
60
60
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -83,6 +83,8 @@
|
|
|
83
83
|
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
84
84
|
font-size: var(--_font-size);
|
|
85
85
|
gap: var(--slotted-space-1, 0.125rem);
|
|
86
|
+
/* In a flex row the item's basis is its content, not the whole row. */
|
|
87
|
+
flex-basis: content;
|
|
86
88
|
inline-size: 100%;
|
|
87
89
|
min-inline-size: 0;
|
|
88
90
|
min-block-size: var(--_height);
|
|
@@ -102,7 +104,7 @@
|
|
|
102
104
|
box-shadow var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
103
105
|
}
|
|
104
106
|
|
|
105
|
-
[data-ui
|
|
107
|
+
[data-ui-combobox][data-part-root]:not([data-full-width]) {
|
|
106
108
|
inline-size: auto;
|
|
107
109
|
}
|
|
108
110
|
|
|
@@ -113,7 +115,7 @@
|
|
|
113
115
|
* `autocomplete="both"` writes as a selected range rather than as text, so
|
|
114
116
|
* the next character typed replaces it.
|
|
115
117
|
*/
|
|
116
|
-
[data-ui
|
|
118
|
+
[data-ui-combobox] > [data-part-input] {
|
|
117
119
|
background-color: transparent;
|
|
118
120
|
/* The frame's border box, not its content box: on a coarse pointer the frame
|
|
119
121
|
is the touch target's height and the control it holds is too. Stretched
|
|
@@ -135,7 +137,7 @@
|
|
|
135
137
|
text-overflow: ellipsis;
|
|
136
138
|
}
|
|
137
139
|
|
|
138
|
-
[data-ui
|
|
140
|
+
[data-ui-combobox] > [data-part-input]::placeholder {
|
|
139
141
|
color: var(--slotted-combobox-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
140
142
|
text-overflow: ellipsis;
|
|
141
143
|
}
|
|
@@ -146,7 +148,7 @@
|
|
|
146
148
|
* the theme's accent tone is what that paint should be, rather than the
|
|
147
149
|
* browser's blue in a form that is not blue.
|
|
148
150
|
*/
|
|
149
|
-
[data-ui
|
|
151
|
+
[data-ui-combobox] > [data-part-input]::selection {
|
|
150
152
|
background-color: var(
|
|
151
153
|
--slotted-combobox-completion-background,
|
|
152
154
|
var(--slotted-tone-accent-surface)
|
|
@@ -155,20 +157,32 @@
|
|
|
155
157
|
}
|
|
156
158
|
|
|
157
159
|
/**
|
|
158
|
-
* Autofill. Chrome paints its own ground over the
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
160
|
+
* Autofill. Chrome paints its own ground over the input, and a hundred-pixel
|
|
161
|
+
* inset shadow is the only way to reach it. The signal is kept rather than
|
|
162
|
+
* erased, in the accent surface the theme owns, and it is the whole
|
|
163
|
+
* control's: the frame takes the tint under its border and inside its
|
|
164
|
+
* corner, and the input repaints the browser's ground in the same colour.
|
|
165
|
+
* Painted on the input alone, the tint left the frame's padding, the slots
|
|
166
|
+
* and the buttons bare, and covered the border the input overlaps by one width.
|
|
162
167
|
*/
|
|
163
|
-
[data-ui
|
|
168
|
+
[data-ui-combobox][data-part-root]:has(> [data-part-input]:autofill) {
|
|
169
|
+
background-color: var(
|
|
170
|
+
--slotted-combobox-autofill-background,
|
|
171
|
+
var(--slotted-tone-accent-surface)
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
[data-ui-combobox] > [data-part-input]:autofill {
|
|
164
176
|
box-shadow: inset 0 0 0 100px
|
|
165
177
|
var(--slotted-combobox-autofill-background, var(--slotted-tone-accent-surface));
|
|
178
|
+
/* The input overlaps the frame's border by one width; the tint stops at it. */
|
|
179
|
+
clip-path: inset(var(--slotted-control-border-width, 1px) 0);
|
|
166
180
|
-webkit-text-fill-color: var(--slotted-combobox-color, var(--slotted-text, CanvasText));
|
|
167
181
|
}
|
|
168
182
|
|
|
169
183
|
/* ── The two buttons inside the frame ─────────────────────────────────── */
|
|
170
184
|
|
|
171
|
-
[data-ui
|
|
185
|
+
[data-ui-combobox] > :is([data-part-clear], [data-part-trigger]) {
|
|
172
186
|
align-items: center;
|
|
173
187
|
appearance: none;
|
|
174
188
|
background-color: transparent;
|
|
@@ -199,7 +213,7 @@
|
|
|
199
213
|
* control is 24 pixels tall — the WCAG 2.2 minimum — so nothing drawn inside
|
|
200
214
|
* it can also be 24.
|
|
201
215
|
*/
|
|
202
|
-
[data-ui
|
|
216
|
+
[data-ui-combobox] > :is([data-part-clear], [data-part-trigger])::after {
|
|
203
217
|
content: '';
|
|
204
218
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
205
219
|
position: absolute;
|
|
@@ -210,22 +224,22 @@
|
|
|
210
224
|
the hit area above grows to 44 pixels around them. Side by side, neither
|
|
211
225
|
button reaches across the edge the two share. */
|
|
212
226
|
@media (pointer: coarse) {
|
|
213
|
-
[data-ui
|
|
227
|
+
[data-ui-combobox] > :is([data-part-clear], [data-part-trigger])::after {
|
|
214
228
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
215
229
|
}
|
|
216
230
|
|
|
217
|
-
[data-ui
|
|
231
|
+
[data-ui-combobox] > [data-part-clear]:has(+ [data-part-trigger]:not([hidden]))::after {
|
|
218
232
|
inset-inline-end: 0;
|
|
219
233
|
}
|
|
220
234
|
|
|
221
|
-
[data-ui
|
|
235
|
+
[data-ui-combobox] > [data-part-clear]:not([hidden]) + [data-part-trigger]::after {
|
|
222
236
|
inset-inline-start: 0;
|
|
223
237
|
}
|
|
224
238
|
}
|
|
225
239
|
|
|
226
240
|
/* The cross and the chevron are `Glyph` elements the binding draws, sized
|
|
227
241
|
here to the control's icon step. */
|
|
228
|
-
[data-ui
|
|
242
|
+
[data-ui-combobox] > :is([data-part-clear], [data-part-trigger]) {
|
|
229
243
|
--slotted-icon-size: var(--_icon-size);
|
|
230
244
|
}
|
|
231
245
|
|
|
@@ -234,7 +248,7 @@
|
|
|
234
248
|
* button is what a reader presses and the arrow is what turns over. The
|
|
235
249
|
* library's own `Glyph` in an `icon` box; a character is never an icon.
|
|
236
250
|
*/
|
|
237
|
-
[data-ui
|
|
251
|
+
[data-ui-combobox] [data-part-arrow] {
|
|
238
252
|
align-items: center;
|
|
239
253
|
block-size: var(--_icon-size);
|
|
240
254
|
display: flex;
|
|
@@ -242,12 +256,12 @@
|
|
|
242
256
|
justify-content: center;
|
|
243
257
|
}
|
|
244
258
|
|
|
245
|
-
[data-ui
|
|
259
|
+
[data-ui-combobox] [data-part-arrow] > [data-ui-icon] {
|
|
246
260
|
transition: rotate var(--slotted-control-transition-duration)
|
|
247
261
|
var(--slotted-control-transition-easing);
|
|
248
262
|
}
|
|
249
263
|
|
|
250
|
-
[data-ui
|
|
264
|
+
[data-ui-combobox][data-open] [data-part-arrow] > [data-ui-icon] {
|
|
251
265
|
rotate: 180deg;
|
|
252
266
|
}
|
|
253
267
|
|
|
@@ -258,7 +272,7 @@
|
|
|
258
272
|
* draws for every family that waits, worn as `data-ui='spinner'` beside this
|
|
259
273
|
* family's own part.
|
|
260
274
|
*/
|
|
261
|
-
[data-ui
|
|
275
|
+
[data-ui-combobox] [data-part-busy] {
|
|
262
276
|
--slotted-spinner-size: var(--_icon-size);
|
|
263
277
|
|
|
264
278
|
color: var(--slotted-combobox-arrow-color, var(--slotted-text-muted, GrayText));
|
|
@@ -267,7 +281,7 @@
|
|
|
267
281
|
|
|
268
282
|
/* ── Size ─────────────────────────────────────────────────────────────── */
|
|
269
283
|
|
|
270
|
-
[data-ui
|
|
284
|
+
[data-ui-combobox][data-part-root][data-size='sm'] {
|
|
271
285
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
272
286
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
273
287
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
@@ -276,7 +290,7 @@
|
|
|
276
290
|
--_inner-size: var(--slotted-control-inner-size-sm, 22px);
|
|
277
291
|
}
|
|
278
292
|
|
|
279
|
-
[data-ui
|
|
293
|
+
[data-ui-combobox][data-part-root][data-size='md'] {
|
|
280
294
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
281
295
|
--_height: var(--slotted-control-height-md, 34px);
|
|
282
296
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -285,7 +299,7 @@
|
|
|
285
299
|
--_inner-size: var(--slotted-control-inner-size-md, 24px);
|
|
286
300
|
}
|
|
287
301
|
|
|
288
|
-
[data-ui
|
|
302
|
+
[data-ui-combobox][data-part-root][data-size='lg'] {
|
|
289
303
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
290
304
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
291
305
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
@@ -296,7 +310,7 @@
|
|
|
296
310
|
|
|
297
311
|
/* ── Variant ──────────────────────────────────────────────────────────── */
|
|
298
312
|
|
|
299
|
-
[data-ui
|
|
313
|
+
[data-ui-combobox][data-part-root][data-variant='subtle'] {
|
|
300
314
|
background-color: var(
|
|
301
315
|
--slotted-combobox-subtle-background,
|
|
302
316
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -310,7 +324,7 @@
|
|
|
310
324
|
/* No edge, no lift, no ground and no corner of its own: the cell it sits in
|
|
311
325
|
is the box, the row is the ground, a cell has no corner, and the resting
|
|
312
326
|
shadow would draw the cell where there is none. */
|
|
313
|
-
[data-ui
|
|
327
|
+
[data-ui-combobox][data-part-root][data-variant='plain'] {
|
|
314
328
|
background-color: transparent;
|
|
315
329
|
border-color: transparent;
|
|
316
330
|
border-radius: var(--slotted-radius-none, 0px);
|
|
@@ -318,31 +332,31 @@
|
|
|
318
332
|
}
|
|
319
333
|
|
|
320
334
|
@media (forced-colors: active) {
|
|
321
|
-
[data-ui
|
|
335
|
+
[data-ui-combobox][data-part-root][data-variant='plain'] {
|
|
322
336
|
border-color: ButtonBorder;
|
|
323
337
|
}
|
|
324
338
|
}
|
|
325
339
|
|
|
326
340
|
/* ── States on the control ────────────────────────────────────────────── */
|
|
327
341
|
|
|
328
|
-
[data-ui
|
|
342
|
+
[data-ui-combobox][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
|
|
329
343
|
[data-invalid]
|
|
330
344
|
) {
|
|
331
345
|
border-color: var(--slotted-combobox-hover-border-color, var(--slotted-tone-accent-border));
|
|
332
346
|
}
|
|
333
347
|
|
|
334
|
-
[data-ui
|
|
348
|
+
[data-ui-combobox][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
|
|
335
349
|
[data-readonly]
|
|
336
|
-
):not([data-invalid]) {
|
|
350
|
+
):not([data-invalid]):not(:has(> [data-part-input]:autofill)) {
|
|
337
351
|
background-color: var(
|
|
338
352
|
--slotted-combobox-subtle-hover-background,
|
|
339
353
|
var(--slotted-tone-secondary-subtle-hover)
|
|
340
354
|
);
|
|
341
355
|
}
|
|
342
356
|
|
|
343
|
-
[data-ui
|
|
357
|
+
[data-ui-combobox][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
|
|
344
358
|
[data-readonly]
|
|
345
|
-
):not([data-invalid]) {
|
|
359
|
+
):not([data-invalid]):not(:has(> [data-part-input]:autofill)) {
|
|
346
360
|
background-color: var(
|
|
347
361
|
--slotted-combobox-plain-hover-background,
|
|
348
362
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -351,11 +365,11 @@
|
|
|
351
365
|
border-color: transparent;
|
|
352
366
|
}
|
|
353
367
|
|
|
354
|
-
[data-ui
|
|
368
|
+
[data-ui-combobox][data-part-root]:has(> [data-part-input]:focus-visible) {
|
|
355
369
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
356
370
|
var(--slotted-focus-ring-color, Highlight);
|
|
357
371
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
358
|
-
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
372
|
+
outline-offset: var(--slotted-control-focus-ring-offset, var(--slotted-focus-ring-offset, 2px));
|
|
359
373
|
}
|
|
360
374
|
|
|
361
375
|
/**
|
|
@@ -365,18 +379,16 @@
|
|
|
365
379
|
* shadow that appears only under focus is a cell that changes size when it
|
|
366
380
|
* is used.
|
|
367
381
|
*/
|
|
368
|
-
[data-ui
|
|
369
|
-
> [data-part='input']:focus-visible
|
|
370
|
-
) {
|
|
382
|
+
[data-ui-combobox][data-part-root][data-variant='plain']:has(> [data-part-input]:focus-visible) {
|
|
371
383
|
box-shadow: none;
|
|
372
384
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
373
385
|
}
|
|
374
386
|
|
|
375
|
-
[data-ui
|
|
387
|
+
[data-ui-combobox][data-part-root][data-open]:not([data-disabled]) {
|
|
376
388
|
border-color: var(--slotted-combobox-open-border-color, var(--slotted-tone-accent-border));
|
|
377
389
|
}
|
|
378
390
|
|
|
379
|
-
[data-ui
|
|
391
|
+
[data-ui-combobox][data-part-root][data-invalid] {
|
|
380
392
|
--slotted-focus-ring-color: var(
|
|
381
393
|
--slotted-combobox-invalid-focus-ring-color,
|
|
382
394
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -401,15 +413,15 @@
|
|
|
401
413
|
box-shadow: var(--_invalid-edge);
|
|
402
414
|
}
|
|
403
415
|
|
|
404
|
-
[data-ui
|
|
416
|
+
[data-ui-combobox][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible) {
|
|
405
417
|
box-shadow:
|
|
406
418
|
var(--_invalid-edge),
|
|
407
419
|
var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
408
420
|
var(--slotted-focus-ring-color, Highlight);
|
|
409
421
|
}
|
|
410
422
|
|
|
411
|
-
[data-ui
|
|
412
|
-
> [data-part
|
|
423
|
+
[data-ui-combobox][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
424
|
+
> [data-part-input]:focus-visible
|
|
413
425
|
) {
|
|
414
426
|
/* The ring lies inside the box here, over the border and an edge as wide as
|
|
415
427
|
it; the edge reaches past the ring. */
|
|
@@ -427,21 +439,24 @@
|
|
|
427
439
|
* control draws its ring double, which a valid ring is not.
|
|
428
440
|
*/
|
|
429
441
|
@media (forced-colors: active) {
|
|
430
|
-
[data-ui
|
|
442
|
+
[data-ui-combobox][data-part-root][data-invalid] {
|
|
431
443
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
432
444
|
outline-offset: calc(
|
|
433
445
|
-1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
|
|
434
446
|
);
|
|
435
447
|
}
|
|
436
448
|
|
|
437
|
-
[data-ui
|
|
449
|
+
[data-ui-combobox][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible) {
|
|
438
450
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
439
451
|
var(--slotted-focus-ring-color, Highlight);
|
|
440
|
-
outline-offset: var(
|
|
452
|
+
outline-offset: var(
|
|
453
|
+
--slotted-control-focus-ring-offset,
|
|
454
|
+
var(--slotted-focus-ring-offset, 2px)
|
|
455
|
+
);
|
|
441
456
|
}
|
|
442
457
|
|
|
443
|
-
[data-ui
|
|
444
|
-
> [data-part
|
|
458
|
+
[data-ui-combobox][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
459
|
+
> [data-part-input]:focus-visible
|
|
445
460
|
) {
|
|
446
461
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
447
462
|
var(--slotted-focus-ring-color, Highlight);
|
|
@@ -456,14 +471,14 @@
|
|
|
456
471
|
* popup. The native `readonly` gives the first three; the second is the
|
|
457
472
|
* family's, because the pattern has no readonly for a combobox.
|
|
458
473
|
*/
|
|
459
|
-
[data-ui
|
|
474
|
+
[data-ui-combobox][data-part-root][data-readonly] {
|
|
460
475
|
background-color: var(
|
|
461
476
|
--slotted-combobox-readonly-background,
|
|
462
477
|
var(--slotted-tone-secondary-subtle-hover)
|
|
463
478
|
);
|
|
464
479
|
}
|
|
465
480
|
|
|
466
|
-
[data-ui
|
|
481
|
+
[data-ui-combobox][data-part-root][data-readonly] [data-part-arrow] {
|
|
467
482
|
opacity: 0.5;
|
|
468
483
|
}
|
|
469
484
|
|
|
@@ -472,8 +487,8 @@
|
|
|
472
487
|
* because a disabled `fieldset` disables every control inside it and the
|
|
473
488
|
* control has no way to say so.
|
|
474
489
|
*/
|
|
475
|
-
[data-ui
|
|
476
|
-
[data-ui
|
|
490
|
+
[data-ui-combobox][data-part-root][data-disabled],
|
|
491
|
+
[data-ui-combobox][data-part-root]:has(> [data-part-input]:disabled) {
|
|
477
492
|
background-color: var(
|
|
478
493
|
--slotted-combobox-disabled-background,
|
|
479
494
|
var(--slotted-disabled-background)
|
|
@@ -484,16 +499,16 @@
|
|
|
484
499
|
cursor: not-allowed;
|
|
485
500
|
}
|
|
486
501
|
|
|
487
|
-
[data-ui
|
|
488
|
-
> :is([data-part
|
|
502
|
+
[data-ui-combobox]
|
|
503
|
+
> :is([data-part-clear], [data-part-trigger]):hover:not(:disabled):not([data-disabled]) {
|
|
489
504
|
background-color: var(
|
|
490
505
|
--slotted-combobox-action-hover-background,
|
|
491
506
|
var(--slotted-tone-secondary-subtle-hover)
|
|
492
507
|
);
|
|
493
508
|
}
|
|
494
509
|
|
|
495
|
-
[data-ui
|
|
496
|
-
> :is([data-part
|
|
510
|
+
[data-ui-combobox]
|
|
511
|
+
> :is([data-part-clear], [data-part-trigger]):active:not(:disabled):not([data-disabled]) {
|
|
497
512
|
background-color: var(
|
|
498
513
|
--slotted-combobox-action-active-background,
|
|
499
514
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -507,14 +522,14 @@
|
|
|
507
522
|
* it. The trigger is not in the tab sequence and takes the same rule anyway,
|
|
508
523
|
* because a script may focus it.
|
|
509
524
|
*/
|
|
510
|
-
[data-ui
|
|
525
|
+
[data-ui-combobox] > :is([data-part-clear], [data-part-trigger]):focus-visible {
|
|
511
526
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
512
527
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
513
528
|
}
|
|
514
529
|
|
|
515
530
|
/* ── The layer ────────────────────────────────────────────────────────── */
|
|
516
531
|
|
|
517
|
-
[data-ui
|
|
532
|
+
[data-ui-combobox][data-part-positioner] {
|
|
518
533
|
--_surface: var(--slotted-combobox-surface, var(--slotted-surface-raised, #ffffff));
|
|
519
534
|
--_text: var(--slotted-combobox-content-text, var(--slotted-text, #0f172a));
|
|
520
535
|
--_muted: var(--slotted-combobox-content-text-muted, var(--slotted-text-muted, #5b6b7f));
|
|
@@ -568,7 +583,6 @@
|
|
|
568
583
|
box-sizing: border-box;
|
|
569
584
|
pointer-events: none;
|
|
570
585
|
|
|
571
|
-
opacity: 0;
|
|
572
586
|
/**
|
|
573
587
|
* R7: the layer arrives along the axis it opens on — from one space step
|
|
574
588
|
* above its place when it opens downward, from one step below when it
|
|
@@ -578,17 +592,15 @@
|
|
|
578
592
|
*/
|
|
579
593
|
--_enter-distance: var(--slotted-space-2, 0.25rem);
|
|
580
594
|
translate: 0 calc(-1 * var(--_enter-distance));
|
|
581
|
-
transition:
|
|
582
|
-
opacity var(--slotted-duration-short) var(--slotted-easing-exit),
|
|
583
|
-
translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
595
|
+
transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
584
596
|
}
|
|
585
597
|
|
|
586
|
-
[data-ui
|
|
598
|
+
[data-ui-combobox][data-part-positioner][data-side='top'] {
|
|
587
599
|
translate: 0 var(--_enter-distance);
|
|
588
600
|
}
|
|
589
601
|
|
|
590
602
|
/* A lateral side has no block direction to arrive from, so it only fades. */
|
|
591
|
-
[data-ui
|
|
603
|
+
[data-ui-combobox][data-part-positioner]:is([data-side='left'], [data-side='right']) {
|
|
592
604
|
translate: 0 0;
|
|
593
605
|
}
|
|
594
606
|
|
|
@@ -601,8 +613,7 @@
|
|
|
601
613
|
* A keyframe states where it starts. The exit stays a transition: it
|
|
602
614
|
* leaves from wherever the layer is, on the closed rule's durations.
|
|
603
615
|
*/
|
|
604
|
-
[data-ui
|
|
605
|
-
opacity: 1;
|
|
616
|
+
[data-ui-combobox][data-part-positioner][data-open] {
|
|
606
617
|
translate: 0 0;
|
|
607
618
|
transition: none;
|
|
608
619
|
}
|
|
@@ -612,32 +623,23 @@
|
|
|
612
623
|
* with the side, and a layer written open in static markup — the harness,
|
|
613
624
|
* a docs snippet — is simply there, and is photographed where it stands.
|
|
614
625
|
*/
|
|
615
|
-
[data-ui
|
|
626
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned] {
|
|
616
627
|
animation: slotted-combobox-enter-down var(--slotted-duration-medium)
|
|
617
628
|
var(--slotted-easing-enter);
|
|
618
629
|
}
|
|
619
630
|
|
|
620
|
-
[data-ui
|
|
631
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned][data-side='top'] {
|
|
621
632
|
animation-name: slotted-combobox-enter-up;
|
|
622
633
|
}
|
|
623
634
|
|
|
624
|
-
[data-ui='combobox'][data-part='positioner'][data-open][data-positioned]:is(
|
|
625
|
-
[data-side='left'],
|
|
626
|
-
[data-side='right']
|
|
627
|
-
) {
|
|
628
|
-
animation-name: slotted-combobox-fade;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
635
|
@keyframes slotted-combobox-enter-down {
|
|
632
636
|
from {
|
|
633
|
-
opacity: 0;
|
|
634
637
|
translate: 0 calc(-1 * var(--_enter-distance));
|
|
635
638
|
}
|
|
636
639
|
}
|
|
637
640
|
|
|
638
641
|
@keyframes slotted-combobox-enter-up {
|
|
639
642
|
from {
|
|
640
|
-
opacity: 0;
|
|
641
643
|
translate: 0 var(--_enter-distance);
|
|
642
644
|
}
|
|
643
645
|
}
|
|
@@ -648,39 +650,60 @@
|
|
|
648
650
|
}
|
|
649
651
|
}
|
|
650
652
|
|
|
653
|
+
/**
|
|
654
|
+
* The fade belongs to the part that paints the surface, and the layer only
|
|
655
|
+
* moves. In Chromium an ancestor with `opacity` below one is the Backdrop Root
|
|
656
|
+
* of what it holds, so a `backdrop-filter` on the content blurs nothing until
|
|
657
|
+
* the layer is opaque and then appears at once. The content's own opacity
|
|
658
|
+
* leaves its own filter drawn on every frame of the motion.
|
|
659
|
+
*/
|
|
660
|
+
[data-ui-combobox][data-part-positioner] > [data-part-content] {
|
|
661
|
+
opacity: 0;
|
|
662
|
+
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
[data-ui-combobox][data-part-positioner][data-open] > [data-part-content] {
|
|
666
|
+
opacity: 1;
|
|
667
|
+
transition: none;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned] > [data-part-content] {
|
|
671
|
+
animation: slotted-combobox-fade var(--slotted-duration-medium) var(--slotted-easing-enter);
|
|
672
|
+
}
|
|
673
|
+
|
|
651
674
|
/* Stillness keeps the fade and drops the movement (R7). */
|
|
652
675
|
@media (prefers-reduced-motion: reduce) {
|
|
653
|
-
[data-ui
|
|
654
|
-
[data-ui
|
|
655
|
-
[data-ui
|
|
656
|
-
[data-ui
|
|
676
|
+
[data-ui-combobox][data-part-positioner],
|
|
677
|
+
[data-ui-combobox][data-part-positioner][data-side='top'],
|
|
678
|
+
[data-ui-combobox][data-part-positioner][data-side='left'],
|
|
679
|
+
[data-ui-combobox][data-part-positioner][data-side='right'] {
|
|
657
680
|
translate: 0 0;
|
|
658
|
-
transition:
|
|
681
|
+
transition: translate var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
659
682
|
}
|
|
660
683
|
|
|
661
|
-
[data-ui
|
|
662
|
-
[data-ui
|
|
663
|
-
[data-ui
|
|
664
|
-
[data-ui
|
|
665
|
-
animation-name:
|
|
684
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned],
|
|
685
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned][data-side='top'],
|
|
686
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned][data-side='left'],
|
|
687
|
+
[data-ui-combobox][data-part-positioner][data-open][data-positioned][data-side='right'] {
|
|
688
|
+
animation-name: none;
|
|
666
689
|
}
|
|
667
690
|
}
|
|
668
691
|
|
|
669
|
-
[data-ui
|
|
692
|
+
[data-ui-combobox][data-part-positioner][data-detached] {
|
|
670
693
|
visibility: hidden;
|
|
671
694
|
}
|
|
672
695
|
|
|
673
|
-
[data-ui
|
|
696
|
+
[data-ui-combobox][data-part-positioner][data-width='anchor'] {
|
|
674
697
|
inline-size: var(--slotted-positioner-anchor-width, auto);
|
|
675
698
|
}
|
|
676
699
|
|
|
677
|
-
[data-ui
|
|
700
|
+
[data-ui-combobox][data-part-positioner][data-width='content'] {
|
|
678
701
|
inline-size: max-content;
|
|
679
702
|
max-inline-size: min(var(--_measure), var(--slotted-positioner-available-width, 100vw));
|
|
680
703
|
min-inline-size: var(--slotted-positioner-anchor-width, auto);
|
|
681
704
|
}
|
|
682
705
|
|
|
683
|
-
[data-ui
|
|
706
|
+
[data-ui-combobox][data-part-positioner][data-size='sm'] {
|
|
684
707
|
--_item-inset: var(--slotted-control-padding-inline-sm, 0.625rem);
|
|
685
708
|
--_item-height: var(--slotted-control-height-sm, 30px);
|
|
686
709
|
--_content-font-size: var(--slotted-control-font-size-sm, 12px);
|
|
@@ -689,7 +712,7 @@
|
|
|
689
712
|
--_column-gap: var(--slotted-control-gap-sm, 0.375rem);
|
|
690
713
|
}
|
|
691
714
|
|
|
692
|
-
[data-ui
|
|
715
|
+
[data-ui-combobox][data-part-positioner][data-size='lg'] {
|
|
693
716
|
--_item-inset: var(--slotted-control-padding-inline-lg, 1rem);
|
|
694
717
|
--_item-height: var(--slotted-control-height-lg, 38px);
|
|
695
718
|
--_content-font-size: var(--slotted-control-font-size-lg, 14px);
|
|
@@ -700,7 +723,7 @@
|
|
|
700
723
|
|
|
701
724
|
/* ── The surface ──────────────────────────────────────────────────────── */
|
|
702
725
|
|
|
703
|
-
[data-ui
|
|
726
|
+
[data-ui-combobox] > [data-part-content] {
|
|
704
727
|
background: var(--_surface);
|
|
705
728
|
border: var(--_border-width) solid var(--_border-color);
|
|
706
729
|
border-radius: var(--_radius);
|
|
@@ -720,21 +743,31 @@
|
|
|
720
743
|
padding-block: var(--_inset-block);
|
|
721
744
|
padding-inline: var(--_inset-inline);
|
|
722
745
|
pointer-events: auto;
|
|
746
|
+
/* A theme that paints this surface as a translucent material blurs what moves behind it. */
|
|
747
|
+
-webkit-backdrop-filter: var(--slotted-combobox-content-backdrop-filter, none);
|
|
748
|
+
backdrop-filter: var(--slotted-combobox-content-backdrop-filter, none);
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
|
|
752
|
+
[data-ui-combobox] > [data-part-content] {
|
|
753
|
+
-webkit-backdrop-filter: none;
|
|
754
|
+
backdrop-filter: none;
|
|
755
|
+
}
|
|
723
756
|
}
|
|
724
757
|
|
|
725
|
-
[data-ui
|
|
758
|
+
[data-ui-combobox] > [data-part-content]:focus-visible {
|
|
726
759
|
outline: none;
|
|
727
760
|
}
|
|
728
761
|
|
|
729
762
|
/* ── Groups ───────────────────────────────────────────────────────────── */
|
|
730
763
|
|
|
731
|
-
[data-ui
|
|
764
|
+
[data-ui-combobox] [data-part-group] {
|
|
732
765
|
display: grid;
|
|
733
766
|
grid-column: 1 / -1;
|
|
734
767
|
grid-template-columns: subgrid;
|
|
735
768
|
}
|
|
736
769
|
|
|
737
|
-
[data-ui
|
|
770
|
+
[data-ui-combobox] [data-part-group-label] {
|
|
738
771
|
color: var(--_muted);
|
|
739
772
|
font-size: var(--_secondary-font-size);
|
|
740
773
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
@@ -753,12 +786,12 @@
|
|
|
753
786
|
* either beats the user agent's own `[hidden] { display: none }`, because an
|
|
754
787
|
* author rule wins over the user agent sheet.
|
|
755
788
|
*/
|
|
756
|
-
[data-ui
|
|
757
|
-
[data-ui
|
|
789
|
+
[data-ui-combobox] [data-part-item][hidden],
|
|
790
|
+
[data-ui-combobox] [data-part-group][hidden] {
|
|
758
791
|
display: none;
|
|
759
792
|
}
|
|
760
793
|
|
|
761
|
-
[data-ui
|
|
794
|
+
[data-ui-combobox] [data-part-item] {
|
|
762
795
|
align-content: center;
|
|
763
796
|
border-radius: var(--_item-radius);
|
|
764
797
|
box-sizing: border-box;
|
|
@@ -784,7 +817,7 @@
|
|
|
784
817
|
var(--slotted-control-transition-easing, var(--slotted-easing-standard));
|
|
785
818
|
}
|
|
786
819
|
|
|
787
|
-
[data-ui
|
|
820
|
+
[data-ui-combobox] [data-part-item][data-current] {
|
|
788
821
|
background-color: var(--_highlight);
|
|
789
822
|
/**
|
|
790
823
|
* A ring as well as a ground. Nothing on this surface holds focus — DOM
|
|
@@ -798,11 +831,11 @@
|
|
|
798
831
|
var(--slotted-combobox-highlight-ring, var(--slotted-tone-accent-border));
|
|
799
832
|
}
|
|
800
833
|
|
|
801
|
-
[data-ui
|
|
834
|
+
[data-ui-combobox] [data-part-item]:not([data-disabled]):active {
|
|
802
835
|
background-color: var(--_highlight-active);
|
|
803
836
|
}
|
|
804
837
|
|
|
805
|
-
[data-ui
|
|
838
|
+
[data-ui-combobox] [data-part-item][data-selected] {
|
|
806
839
|
color: var(--_selected-color);
|
|
807
840
|
}
|
|
808
841
|
|
|
@@ -815,21 +848,21 @@
|
|
|
815
848
|
* selection begins and ends. `select` and `combobox` draw the same ground
|
|
816
849
|
* and answer the same way; `selection-block.test.mjs` holds the three to it.
|
|
817
850
|
*/
|
|
818
|
-
[data-ui
|
|
851
|
+
[data-ui-combobox] [data-part-item][data-selected] + [data-part-item][data-selected] {
|
|
819
852
|
border-start-end-radius: 0;
|
|
820
853
|
border-start-start-radius: 0;
|
|
821
854
|
}
|
|
822
855
|
|
|
823
|
-
[data-ui
|
|
856
|
+
[data-ui-combobox] [data-part-item][data-selected]:has(+ [data-part-item][data-selected]) {
|
|
824
857
|
border-end-end-radius: 0;
|
|
825
858
|
border-end-start-radius: 0;
|
|
826
859
|
}
|
|
827
860
|
|
|
828
|
-
[data-ui
|
|
861
|
+
[data-ui-combobox] [data-part-item][data-selected] > [data-part-label] {
|
|
829
862
|
font-weight: var(--slotted-font-weight-medium, 500);
|
|
830
863
|
}
|
|
831
864
|
|
|
832
|
-
[data-ui
|
|
865
|
+
[data-ui-combobox] [data-part-item][data-disabled] {
|
|
833
866
|
color: var(--slotted-disabled-foreground, #64748b);
|
|
834
867
|
cursor: not-allowed;
|
|
835
868
|
}
|
|
@@ -855,7 +888,7 @@
|
|
|
855
888
|
* would watch it disappear. A cursor lifts, always. What the row cannot do is
|
|
856
889
|
* said by the ink and by the ring, which both step down to the disabled pair.
|
|
857
890
|
*/
|
|
858
|
-
[data-ui
|
|
891
|
+
[data-ui-combobox] [data-part-item][data-disabled][data-current] {
|
|
859
892
|
box-shadow: inset 0 0 0 var(--slotted-border-width-thin, 1px)
|
|
860
893
|
var(--slotted-disabled-border, #cbd5e1);
|
|
861
894
|
color: var(--slotted-disabled-foreground, #64748b);
|
|
@@ -863,13 +896,13 @@
|
|
|
863
896
|
|
|
864
897
|
/* ── The cells ────────────────────────────────────────────────────────── */
|
|
865
898
|
|
|
866
|
-
[data-ui
|
|
899
|
+
[data-ui-combobox] :is([data-part-indicator], [data-part-icon]) {
|
|
867
900
|
block-size: 1lh;
|
|
868
901
|
}
|
|
869
902
|
|
|
870
903
|
/* Column one holds content and paints none: a `Glyph` in an `Icon` box, or
|
|
871
904
|
artwork of the consumer's own, centred and sized from the column. */
|
|
872
|
-
[data-ui
|
|
905
|
+
[data-ui-combobox] [data-part-icon] {
|
|
873
906
|
--slotted-icon-size: var(--_content-icon-size);
|
|
874
907
|
|
|
875
908
|
align-items: center;
|
|
@@ -882,7 +915,7 @@
|
|
|
882
915
|
margin-inline-end: var(--_column-gap);
|
|
883
916
|
}
|
|
884
917
|
|
|
885
|
-
[data-ui
|
|
918
|
+
[data-ui-combobox] [data-part-label] {
|
|
886
919
|
grid-column: 2;
|
|
887
920
|
grid-row: 1;
|
|
888
921
|
min-inline-size: 0;
|
|
@@ -906,7 +939,7 @@
|
|
|
906
939
|
* run moved on every keystroke as the filter re-marked the label (CB6).
|
|
907
940
|
*/
|
|
908
941
|
|
|
909
|
-
[data-ui
|
|
942
|
+
[data-ui-combobox] [data-part-description] {
|
|
910
943
|
color: var(--_muted);
|
|
911
944
|
font-size: var(--_secondary-font-size);
|
|
912
945
|
grid-column: 2;
|
|
@@ -916,12 +949,12 @@
|
|
|
916
949
|
overflow-wrap: anywhere;
|
|
917
950
|
}
|
|
918
951
|
|
|
919
|
-
[data-ui
|
|
952
|
+
[data-ui-combobox] [data-part-item][data-disabled] > [data-part-description] {
|
|
920
953
|
color: inherit;
|
|
921
954
|
}
|
|
922
955
|
|
|
923
956
|
/* The tick is a `Glyph` the binding draws, at the content's icon step. */
|
|
924
|
-
[data-ui
|
|
957
|
+
[data-ui-combobox] [data-part-indicator] {
|
|
925
958
|
--slotted-icon-size: var(--_content-icon-size);
|
|
926
959
|
|
|
927
960
|
align-items: center;
|
|
@@ -936,13 +969,13 @@
|
|
|
936
969
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
937
970
|
}
|
|
938
971
|
|
|
939
|
-
[data-ui
|
|
972
|
+
[data-ui-combobox] [data-part-item][data-selected] > [data-part-indicator] {
|
|
940
973
|
opacity: 1;
|
|
941
974
|
}
|
|
942
975
|
|
|
943
976
|
/* ── Separator, empty, status ─────────────────────────────────────────── */
|
|
944
977
|
|
|
945
|
-
[data-ui
|
|
978
|
+
[data-ui-combobox] [data-part-separator] {
|
|
946
979
|
background-color: var(--slotted-combobox-separator-color, var(--_border-color));
|
|
947
980
|
block-size: var(--_border-width);
|
|
948
981
|
border: 0;
|
|
@@ -957,7 +990,7 @@
|
|
|
957
990
|
* when the results land — which is the gap none of the surveyed
|
|
958
991
|
* implementations closes.
|
|
959
992
|
*/
|
|
960
|
-
[data-ui
|
|
993
|
+
[data-ui-combobox] :is([data-part-empty], [data-part-status]) {
|
|
961
994
|
color: var(--_muted);
|
|
962
995
|
/**
|
|
963
996
|
* Its own bidi run, ordered by its own content. "3 results" is a European
|
|
@@ -990,7 +1023,7 @@
|
|
|
990
1023
|
* often present with nothing to draw. A row with no text takes no space, and
|
|
991
1024
|
* a row with text takes the same space as the empty message beside it.
|
|
992
1025
|
*/
|
|
993
|
-
[data-ui
|
|
1026
|
+
[data-ui-combobox] [data-part-status]:empty {
|
|
994
1027
|
display: none;
|
|
995
1028
|
}
|
|
996
1029
|
|
|
@@ -1003,7 +1036,7 @@
|
|
|
1003
1036
|
* about how a placeholder is painted — and they are hidden from assistive
|
|
1004
1037
|
* technology, because the `status` row beside them is the live region.
|
|
1005
1038
|
*/
|
|
1006
|
-
[data-ui
|
|
1039
|
+
[data-ui-combobox] [data-part-placeholder] {
|
|
1007
1040
|
display: grid;
|
|
1008
1041
|
/* The surface is a grid of option columns; the rows span all of them, as
|
|
1009
1042
|
the status and empty rows do. */
|
|
@@ -1012,23 +1045,23 @@
|
|
|
1012
1045
|
padding-inline: var(--_item-inset);
|
|
1013
1046
|
}
|
|
1014
1047
|
|
|
1015
|
-
[data-ui
|
|
1048
|
+
[data-ui-combobox] [data-part-placeholder] > * {
|
|
1016
1049
|
align-items: center;
|
|
1017
1050
|
display: flex;
|
|
1018
1051
|
min-block-size: var(--_item-height);
|
|
1019
1052
|
}
|
|
1020
1053
|
|
|
1021
|
-
[data-ui
|
|
1054
|
+
[data-ui-combobox] [data-part-placeholder] > [data-ui-skeleton] {
|
|
1022
1055
|
align-self: center;
|
|
1023
1056
|
}
|
|
1024
1057
|
|
|
1025
1058
|
/* Three ragged widths: three identical bars read as a table, and a list of
|
|
1026
1059
|
labels is ragged. */
|
|
1027
|
-
[data-ui
|
|
1060
|
+
[data-ui-combobox] [data-part-placeholder] > :nth-child(2) [data-ui-skeleton] {
|
|
1028
1061
|
inline-size: 78%;
|
|
1029
1062
|
}
|
|
1030
1063
|
|
|
1031
|
-
[data-ui
|
|
1064
|
+
[data-ui-combobox] [data-part-placeholder] > :nth-child(3) [data-ui-skeleton] {
|
|
1032
1065
|
inline-size: 56%;
|
|
1033
1066
|
}
|
|
1034
1067
|
|
|
@@ -1039,20 +1072,20 @@
|
|
|
1039
1072
|
* many for one wait (SL6/CB5).
|
|
1040
1073
|
*/
|
|
1041
1074
|
|
|
1042
|
-
[data-ui
|
|
1075
|
+
[data-ui-combobox] > [data-part-content][data-loading] {
|
|
1043
1076
|
cursor: progress;
|
|
1044
1077
|
}
|
|
1045
1078
|
|
|
1046
1079
|
/* ── Forced colours ───────────────────────────────────────────────────── */
|
|
1047
1080
|
|
|
1048
1081
|
@media (forced-colors: active) {
|
|
1049
|
-
[data-ui
|
|
1082
|
+
[data-ui-combobox] [data-part-item][data-current] {
|
|
1050
1083
|
background-color: Highlight;
|
|
1051
1084
|
color: HighlightText;
|
|
1052
1085
|
forced-color-adjust: none;
|
|
1053
1086
|
}
|
|
1054
1087
|
|
|
1055
|
-
[data-ui
|
|
1088
|
+
[data-ui-combobox] [data-part-item][data-disabled][data-current] {
|
|
1056
1089
|
background-color: Highlight;
|
|
1057
1090
|
color: GrayText;
|
|
1058
1091
|
}
|