@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
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* used outside a field looks the same as one inside it and the field's DOM
|
|
14
14
|
* never becomes part of this stylesheet's contract.
|
|
15
15
|
*/
|
|
16
|
-
[data-ui
|
|
16
|
+
[data-ui-text-field][data-part-root] {
|
|
17
17
|
/**
|
|
18
18
|
* Type, height, inline padding, gap and glyph size all come from the
|
|
19
19
|
* control scales — the only ones the theme restates per density — so a
|
|
@@ -101,6 +101,8 @@
|
|
|
101
101
|
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
102
102
|
font-size: var(--_font-size);
|
|
103
103
|
gap: var(--_gap);
|
|
104
|
+
/* In a flex row the item's basis is its content, not the whole row. */
|
|
105
|
+
flex-basis: content;
|
|
104
106
|
inline-size: 100%;
|
|
105
107
|
/* A control in a grid track narrower than its own intrinsic width would
|
|
106
108
|
otherwise refuse to shrink and take the drawer's edge with it. */
|
|
@@ -125,20 +127,20 @@
|
|
|
125
127
|
* earlier rule aligned the glyph to the text's margin and left the hover
|
|
126
128
|
* ground nine pixels from the end and four from the top at `md`; ReUI's
|
|
127
129
|
* `c-input-group-11` measures four and four with a radius of seven inside
|
|
128
|
-
* ten
|
|
130
|
+
* ten.
|
|
129
131
|
*
|
|
130
132
|
* The cost is written down: at `md` the glyph now ends four pixels nearer
|
|
131
133
|
* the border than the text begins from it.
|
|
132
134
|
*/
|
|
133
|
-
[data-ui
|
|
134
|
-
> :is([data-part
|
|
135
|
-
> [data-part
|
|
135
|
+
[data-ui-text-field][data-part-root]:has(
|
|
136
|
+
> :is([data-part-clear], [data-part-copy], [data-part-reveal]):not([hidden]):last-child,
|
|
137
|
+
> [data-part-end]:last-child > [data-part-action]:last-child
|
|
136
138
|
) {
|
|
137
139
|
padding-inline-end: var(--_inset);
|
|
138
140
|
}
|
|
139
141
|
|
|
140
|
-
[data-ui
|
|
141
|
-
> [data-part
|
|
142
|
+
[data-ui-text-field][data-part-root]:has(
|
|
143
|
+
> [data-part-start]:first-child > [data-part-action]:first-child
|
|
142
144
|
) {
|
|
143
145
|
padding-inline-start: var(--_inset);
|
|
144
146
|
}
|
|
@@ -149,7 +151,7 @@
|
|
|
149
151
|
* it a text control: the value, the caret, the selection and every native
|
|
150
152
|
* attribute a consumer wrote.
|
|
151
153
|
*/
|
|
152
|
-
[data-ui
|
|
154
|
+
[data-ui-text-field] > [data-part-input] {
|
|
153
155
|
background-color: transparent;
|
|
154
156
|
/* The frame's border box, not its content box: on a coarse pointer the frame
|
|
155
157
|
is the touch target's height and the control it holds is too. Stretched
|
|
@@ -175,7 +177,7 @@
|
|
|
175
177
|
text-overflow: ellipsis;
|
|
176
178
|
}
|
|
177
179
|
|
|
178
|
-
[data-ui
|
|
180
|
+
[data-ui-text-field] > [data-part-input]::placeholder {
|
|
179
181
|
color: var(--slotted-text-field-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
180
182
|
/* A placeholder longer than the control is clipped at a word rather than
|
|
181
183
|
mid-glyph, which is the difference between a hint and a smear. */
|
|
@@ -187,21 +189,32 @@
|
|
|
187
189
|
* `type="search"` control would be the second. The native decorations are
|
|
188
190
|
* withdrawn rather than left to overlap.
|
|
189
191
|
*/
|
|
190
|
-
[data-ui
|
|
191
|
-
[data-ui
|
|
192
|
+
[data-ui-text-field] > [data-part-input]::-webkit-search-cancel-button,
|
|
193
|
+
[data-ui-text-field] > [data-part-input]::-webkit-search-decoration {
|
|
192
194
|
appearance: none;
|
|
193
195
|
}
|
|
194
196
|
|
|
195
197
|
/**
|
|
196
|
-
* Autofill. Chrome paints its own ground over the
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
|
|
202
|
-
|
|
198
|
+
* Autofill. Chrome paints its own ground over the input, and a hundred-pixel
|
|
199
|
+
* inset shadow is the only way to reach it. The signal is kept rather than
|
|
200
|
+
* erased, in the accent surface the theme owns, and it is the whole
|
|
201
|
+
* control's: the frame takes the tint under its border and inside its
|
|
202
|
+
* corner, and the input repaints the browser's ground in the same color.
|
|
203
|
+
* Painted on the input alone, the tint left the frame's padding, the slots
|
|
204
|
+
* and the buttons bare, and covered the border the input overlaps by one width.
|
|
205
|
+
*/
|
|
206
|
+
[data-ui-text-field][data-part-root]:has(> [data-part-input]:autofill) {
|
|
207
|
+
background-color: var(
|
|
208
|
+
--slotted-text-field-autofill-background,
|
|
209
|
+
var(--slotted-tone-accent-surface)
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
[data-ui-text-field] > [data-part-input]:autofill {
|
|
203
214
|
box-shadow: inset 0 0 0 100px
|
|
204
215
|
var(--slotted-text-field-autofill-background, var(--slotted-tone-accent-surface));
|
|
216
|
+
/* The input overlaps the frame's border by one width; the tint stops at it. */
|
|
217
|
+
clip-path: inset(var(--slotted-control-border-width, 1px) 0);
|
|
205
218
|
-webkit-text-fill-color: var(--slotted-text-field-color, var(--slotted-text, CanvasText));
|
|
206
219
|
}
|
|
207
220
|
|
|
@@ -213,7 +226,7 @@
|
|
|
213
226
|
* disagreeing about one row.
|
|
214
227
|
*/
|
|
215
228
|
|
|
216
|
-
[data-ui
|
|
229
|
+
[data-ui-text-field][data-part-root][data-size='sm'] {
|
|
217
230
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
218
231
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
219
232
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
@@ -222,7 +235,7 @@
|
|
|
222
235
|
--_inner-size: var(--slotted-control-inner-size-sm, 22px);
|
|
223
236
|
}
|
|
224
237
|
|
|
225
|
-
[data-ui
|
|
238
|
+
[data-ui-text-field][data-part-root][data-size='md'] {
|
|
226
239
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
227
240
|
--_height: var(--slotted-control-height-md, 34px);
|
|
228
241
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -231,7 +244,7 @@
|
|
|
231
244
|
--_inner-size: var(--slotted-control-inner-size-md, 24px);
|
|
232
245
|
}
|
|
233
246
|
|
|
234
|
-
[data-ui
|
|
247
|
+
[data-ui-text-field][data-part-root][data-size='lg'] {
|
|
235
248
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
236
249
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
237
250
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
@@ -246,7 +259,7 @@
|
|
|
246
259
|
* it takes the width the buttons leave rather than the whole row, so the
|
|
247
260
|
* button's label never wraps to make room for it.
|
|
248
261
|
*/
|
|
249
|
-
[data-ui
|
|
262
|
+
[data-ui-button-group] > [data-ui-text-field][data-part-root] {
|
|
250
263
|
flex: 1 1 0;
|
|
251
264
|
inline-size: auto;
|
|
252
265
|
}
|
|
@@ -265,7 +278,7 @@
|
|
|
265
278
|
* pointer crosses it.
|
|
266
279
|
*/
|
|
267
280
|
|
|
268
|
-
[data-ui
|
|
281
|
+
[data-ui-text-field][data-part-root][data-variant='subtle'] {
|
|
269
282
|
background-color: var(
|
|
270
283
|
--slotted-text-field-subtle-background,
|
|
271
284
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -279,7 +292,7 @@
|
|
|
279
292
|
/* No edge, no lift, no ground and no corner of its own: the cell it sits in
|
|
280
293
|
is the box, the row is the ground, a cell has no corner, and the resting
|
|
281
294
|
shadow would draw the cell where there is none. */
|
|
282
|
-
[data-ui
|
|
295
|
+
[data-ui-text-field][data-part-root][data-variant='plain'] {
|
|
283
296
|
background-color: transparent;
|
|
284
297
|
border-color: transparent;
|
|
285
298
|
border-radius: var(--slotted-radius-none, 0px);
|
|
@@ -288,11 +301,11 @@
|
|
|
288
301
|
|
|
289
302
|
/**
|
|
290
303
|
* The one rule the theme cannot write for the family. A transparent border
|
|
291
|
-
* has no system
|
|
304
|
+
* has no system color to be remapped to, so the `plain` control would lose
|
|
292
305
|
* its only edge exactly where an edge matters most.
|
|
293
306
|
*/
|
|
294
307
|
@media (forced-colors: active) {
|
|
295
|
-
[data-ui
|
|
308
|
+
[data-ui-text-field][data-part-root][data-variant='plain'] {
|
|
296
309
|
border-color: ButtonBorder;
|
|
297
310
|
}
|
|
298
311
|
}
|
|
@@ -302,7 +315,7 @@
|
|
|
302
315
|
* A back-office form full of identifiers, hashes and keys, which is the
|
|
303
316
|
* audience `docs/product/prd.md` names first. Primer and Polaris both ship it.
|
|
304
317
|
*/
|
|
305
|
-
[data-ui
|
|
318
|
+
[data-ui-text-field][data-part-root][data-mono] {
|
|
306
319
|
font-family: var(--slotted-font-family-mono, monospace);
|
|
307
320
|
/* Digits that do not shift as a value is typed over. */
|
|
308
321
|
font-variant-numeric: tabular-nums;
|
|
@@ -315,8 +328,8 @@
|
|
|
315
328
|
* than the value: an adornment annotates, and a reader looking for what they
|
|
316
329
|
* typed should not have to step over it.
|
|
317
330
|
*/
|
|
318
|
-
[data-ui
|
|
319
|
-
[data-ui
|
|
331
|
+
[data-ui-text-field] > [data-part-start],
|
|
332
|
+
[data-ui-text-field] > [data-part-end] {
|
|
320
333
|
align-items: center;
|
|
321
334
|
color: var(--slotted-text-field-adornment-color, var(--slotted-text-muted, GrayText));
|
|
322
335
|
display: inline-flex;
|
|
@@ -345,16 +358,16 @@
|
|
|
345
358
|
* table draws a 12-pixel glyph and nothing has to be written per instance.
|
|
346
359
|
* A bare `svg` a consumer passed instead is held to the same box.
|
|
347
360
|
*/
|
|
348
|
-
[data-ui
|
|
349
|
-
[data-ui
|
|
361
|
+
[data-ui-text-field] > [data-part-start],
|
|
362
|
+
[data-ui-text-field] > [data-part-end] {
|
|
350
363
|
--slotted-icon-size: var(--_icon-size);
|
|
351
364
|
/* And a key or a chip placed there is the height the inside of this
|
|
352
365
|
control has, from the foundation's scale for it. */
|
|
353
366
|
--slotted-control-inner-size: var(--_inner-size);
|
|
354
367
|
}
|
|
355
368
|
|
|
356
|
-
[data-ui
|
|
357
|
-
[data-ui
|
|
369
|
+
[data-ui-text-field] > [data-part-start] > svg,
|
|
370
|
+
[data-ui-text-field] > [data-part-end] > svg {
|
|
358
371
|
block-size: var(--_icon-size);
|
|
359
372
|
inline-size: var(--_icon-size);
|
|
360
373
|
}
|
|
@@ -373,10 +386,8 @@
|
|
|
373
386
|
* keeps the gap to the value equal as well, and because a symmetric padding
|
|
374
387
|
* cannot disagree with `unicode-bidi: plaintext` about which side is which.
|
|
375
388
|
*/
|
|
376
|
-
[data-ui
|
|
377
|
-
|
|
378
|
-
[data-ui='text-field']
|
|
379
|
-
> [data-part='end']:not(:has(svg, img, [data-ui='icon'], [data-part='action'])) {
|
|
389
|
+
[data-ui-text-field] > [data-part-start]:not(:has(svg, img, [data-ui-icon], [data-part-action])),
|
|
390
|
+
[data-ui-text-field] > [data-part-end]:not(:has(svg, img, [data-ui-icon], [data-part-action])) {
|
|
380
391
|
padding-inline: calc(var(--_icon-size) / 8);
|
|
381
392
|
}
|
|
382
393
|
|
|
@@ -390,8 +401,8 @@
|
|
|
390
401
|
* Their glyphs are the `Glyph` element the binding renders: a character is
|
|
391
402
|
* never an icon.
|
|
392
403
|
*/
|
|
393
|
-
[data-ui
|
|
394
|
-
[data-ui
|
|
404
|
+
[data-ui-text-field] > :is([data-part-clear], [data-part-copy], [data-part-reveal]),
|
|
405
|
+
[data-ui-text-field] > :is([data-part-start], [data-part-end]) > [data-part-action] {
|
|
395
406
|
--slotted-icon-size: var(--_icon-size);
|
|
396
407
|
|
|
397
408
|
align-items: center;
|
|
@@ -434,9 +445,9 @@
|
|
|
434
445
|
* the two, so the attribute that makes it accessible is the one that shapes
|
|
435
446
|
* it.
|
|
436
447
|
*/
|
|
437
|
-
[data-ui
|
|
438
|
-
> :is([data-part
|
|
439
|
-
> [data-part
|
|
448
|
+
[data-ui-text-field]
|
|
449
|
+
> :is([data-part-start], [data-part-end])
|
|
450
|
+
> [data-part-action]:not([aria-label], [aria-labelledby]) {
|
|
440
451
|
/* Words in the frame's quiet ink read as a suffix, not as something to
|
|
441
452
|
press: "Search" beside the value looked like a unit. A named command
|
|
442
453
|
or a chosen country code carries the value's ink; a lone mark stays
|
|
@@ -448,19 +459,19 @@
|
|
|
448
459
|
|
|
449
460
|
/**
|
|
450
461
|
* Words and a mark in one button — a country code over its chevron, a model
|
|
451
|
-
* name, a notation. The mark is
|
|
462
|
+
* name, a notation. The mark is centerd on the band the letters occupy, not
|
|
452
463
|
* on the line box: the line box keeps room under the baseline for
|
|
453
|
-
* descenders, so a box
|
|
464
|
+
* descenders, so a box centerd in it sits low beside the letters — every
|
|
454
465
|
* chevron in these buttons did. The rule is the briefing's (_A mark beside a
|
|
455
466
|
* line of text is aligned to the text_), here in a grid: items share the
|
|
456
467
|
* baseline, the mark's synthesized baseline is its bottom edge, a negative
|
|
457
468
|
* start margin takes back the height it would add above the letters, and a
|
|
458
|
-
* translate puts its
|
|
459
|
-
* midpoint of the capitals' and the lowercase letters' own
|
|
469
|
+
* translate puts its center at `(1cap + 1ex) / 4` above the baseline — the
|
|
470
|
+
* midpoint of the capitals' and the lowercase letters' own centers.
|
|
460
471
|
*/
|
|
461
|
-
[data-ui
|
|
462
|
-
> :is([data-part
|
|
463
|
-
> [data-part
|
|
472
|
+
[data-ui-text-field]
|
|
473
|
+
> :is([data-part-start], [data-part-end])
|
|
474
|
+
> [data-part-action]:not([aria-label], [aria-labelledby]) {
|
|
464
475
|
align-content: center;
|
|
465
476
|
align-items: baseline;
|
|
466
477
|
display: inline-grid;
|
|
@@ -468,10 +479,10 @@
|
|
|
468
479
|
justify-content: center;
|
|
469
480
|
}
|
|
470
481
|
|
|
471
|
-
[data-ui
|
|
472
|
-
> :is([data-part
|
|
473
|
-
> [data-part
|
|
474
|
-
> [data-ui
|
|
482
|
+
[data-ui-text-field]
|
|
483
|
+
> :is([data-part-start], [data-part-end])
|
|
484
|
+
> [data-part-action]:not([aria-label], [aria-labelledby])
|
|
485
|
+
> [data-ui-icon] {
|
|
475
486
|
margin-block-start: calc((1cap + 1ex) / 4 - var(--_icon-size) / 2);
|
|
476
487
|
translate: 0 calc(var(--_icon-size) / 2 - (1cap + 1ex) / 4);
|
|
477
488
|
}
|
|
@@ -480,7 +491,7 @@
|
|
|
480
491
|
* An adornment holding a button is not quiet text any more: its gap is the
|
|
481
492
|
* one between two buttons, and it does not pad a glyph that is not there.
|
|
482
493
|
*/
|
|
483
|
-
[data-ui
|
|
494
|
+
[data-ui-text-field] > :is([data-part-start], [data-part-end]):has(> [data-part-action]) {
|
|
484
495
|
gap: 0;
|
|
485
496
|
}
|
|
486
497
|
|
|
@@ -493,11 +504,8 @@
|
|
|
493
504
|
* correction `docs/token-foundation.md` leaves to the family rather than to
|
|
494
505
|
* the theme.
|
|
495
506
|
*/
|
|
496
|
-
[data-ui
|
|
497
|
-
|
|
498
|
-
[data-ui='text-field']
|
|
499
|
-
> :is([data-part='start'], [data-part='end'])
|
|
500
|
-
> [data-part='action']::after {
|
|
507
|
+
[data-ui-text-field] > :is([data-part-clear], [data-part-copy], [data-part-reveal])::after,
|
|
508
|
+
[data-ui-text-field] > :is([data-part-start], [data-part-end]) > [data-part-action]::after {
|
|
501
509
|
content: '';
|
|
502
510
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
503
511
|
position: absolute;
|
|
@@ -508,45 +516,42 @@
|
|
|
508
516
|
the hit area grows to 44 pixels around them. Side by side, no button
|
|
509
517
|
reaches across the edge it shares with the next. */
|
|
510
518
|
@media (pointer: coarse) {
|
|
511
|
-
[data-ui
|
|
512
|
-
|
|
513
|
-
> [data-part='action']::after,
|
|
514
|
-
[data-ui='text-field']
|
|
515
|
-
> :is([data-part='clear'], [data-part='copy'], [data-part='reveal'])::after {
|
|
519
|
+
[data-ui-text-field] > :is([data-part-start], [data-part-end]) > [data-part-action]::after,
|
|
520
|
+
[data-ui-text-field] > :is([data-part-clear], [data-part-copy], [data-part-reveal])::after {
|
|
516
521
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
517
522
|
}
|
|
518
523
|
|
|
519
|
-
[data-ui
|
|
520
|
-
> :is([data-part
|
|
521
|
-
~ :is([data-part
|
|
524
|
+
[data-ui-text-field]
|
|
525
|
+
> :is([data-part-clear], [data-part-copy]):has(
|
|
526
|
+
~ :is([data-part-copy], [data-part-reveal]):not([hidden])
|
|
522
527
|
)::after,
|
|
523
|
-
[data-ui
|
|
524
|
-
> :is([data-part
|
|
525
|
-
> [data-part
|
|
528
|
+
[data-ui-text-field]
|
|
529
|
+
> :is([data-part-start], [data-part-end])
|
|
530
|
+
> [data-part-action]:has(+ [data-part-action])::after {
|
|
526
531
|
inset-inline-end: 0;
|
|
527
532
|
}
|
|
528
533
|
|
|
529
|
-
[data-ui
|
|
530
|
-
> :is([data-part
|
|
531
|
-
~ :is([data-part
|
|
532
|
-
[data-ui
|
|
533
|
-
> :is([data-part
|
|
534
|
-
> [data-part
|
|
535
|
-
+ [data-part
|
|
534
|
+
[data-ui-text-field]
|
|
535
|
+
> :is([data-part-clear], [data-part-copy]):not([hidden])
|
|
536
|
+
~ :is([data-part-copy], [data-part-reveal])::after,
|
|
537
|
+
[data-ui-text-field]
|
|
538
|
+
> :is([data-part-start], [data-part-end])
|
|
539
|
+
> [data-part-action]
|
|
540
|
+
+ [data-part-action]::after {
|
|
536
541
|
inset-inline-start: 0;
|
|
537
542
|
}
|
|
538
543
|
}
|
|
539
544
|
|
|
540
545
|
/* An open menu keeps its button pressed under the pointer as well, and a
|
|
541
546
|
finished copy keeps its success ink until the check goes. */
|
|
542
|
-
[data-ui
|
|
543
|
-
> :is([data-part
|
|
547
|
+
[data-ui-text-field]
|
|
548
|
+
> :is([data-part-clear], [data-part-copy], [data-part-reveal]):hover:not(
|
|
544
549
|
:disabled,
|
|
545
550
|
[data-complete]
|
|
546
551
|
),
|
|
547
|
-
[data-ui
|
|
548
|
-
> :is([data-part
|
|
549
|
-
> [data-part
|
|
552
|
+
[data-ui-text-field]
|
|
553
|
+
> :is([data-part-start], [data-part-end])
|
|
554
|
+
> [data-part-action]:hover:not(:disabled, [aria-expanded='true']) {
|
|
550
555
|
background-color: var(
|
|
551
556
|
--slotted-text-field-action-hover-background,
|
|
552
557
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -559,11 +564,11 @@
|
|
|
559
564
|
* settles a pixel, and inside a 24-pixel box beside the value that reads as
|
|
560
565
|
* the value moving (dossier § 4, `recusar`).
|
|
561
566
|
*/
|
|
562
|
-
[data-ui
|
|
563
|
-
> :is([data-part
|
|
564
|
-
[data-ui
|
|
565
|
-
> :is([data-part
|
|
566
|
-
> [data-part
|
|
567
|
+
[data-ui-text-field]
|
|
568
|
+
> :is([data-part-clear], [data-part-copy], [data-part-reveal]):active:not(:disabled),
|
|
569
|
+
[data-ui-text-field]
|
|
570
|
+
> :is([data-part-start], [data-part-end])
|
|
571
|
+
> [data-part-action]:active:not(:disabled) {
|
|
567
572
|
background-color: var(
|
|
568
573
|
--slotted-text-field-action-active-background,
|
|
569
574
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -571,21 +576,19 @@
|
|
|
571
576
|
}
|
|
572
577
|
|
|
573
578
|
/* A menu or a popover the button opened keeps it pressed while it is open. */
|
|
574
|
-
[data-ui
|
|
575
|
-
> :is([data-part
|
|
576
|
-
> [data-part
|
|
579
|
+
[data-ui-text-field]
|
|
580
|
+
> :is([data-part-start], [data-part-end])
|
|
581
|
+
> [data-part-action][aria-expanded='true'] {
|
|
577
582
|
background-color: var(
|
|
578
583
|
--slotted-text-field-action-active-background,
|
|
579
584
|
var(--slotted-tone-secondary-subtle-active)
|
|
580
585
|
);
|
|
581
586
|
}
|
|
582
587
|
|
|
583
|
-
[data-ui
|
|
584
|
-
|
|
585
|
-
> [data-part
|
|
586
|
-
|
|
587
|
-
> :is([data-part='start'], [data-part='end'])
|
|
588
|
-
> [data-part='action'] {
|
|
588
|
+
[data-ui-text-field] > :is([data-part-start], [data-part-end]) > [data-part-action]:disabled,
|
|
589
|
+
[data-ui-text-field][data-part-root][data-disabled]
|
|
590
|
+
> :is([data-part-start], [data-part-end])
|
|
591
|
+
> [data-part-action] {
|
|
589
592
|
color: var(--slotted-disabled-foreground);
|
|
590
593
|
cursor: not-allowed;
|
|
591
594
|
}
|
|
@@ -595,17 +598,16 @@
|
|
|
595
598
|
* from the value to a button has to move something visible, and a ring
|
|
596
599
|
* around the whole frame would sit still while focus moved inside it.
|
|
597
600
|
*/
|
|
598
|
-
[data-ui
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
>
|
|
602
|
-
> [data-part='action']:focus-visible {
|
|
601
|
+
[data-ui-text-field] > :is([data-part-clear], [data-part-copy], [data-part-reveal]):focus-visible,
|
|
602
|
+
[data-ui-text-field]
|
|
603
|
+
> :is([data-part-start], [data-part-end])
|
|
604
|
+
> [data-part-action]:focus-visible {
|
|
603
605
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
604
606
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
605
607
|
}
|
|
606
608
|
|
|
607
609
|
/** A copy that finished: the mark changes as well as the ink, and returns on its own. */
|
|
608
|
-
[data-ui
|
|
610
|
+
[data-ui-text-field] > [data-part-copy][data-complete] {
|
|
609
611
|
color: var(
|
|
610
612
|
--slotted-text-field-copy-complete-color,
|
|
611
613
|
var(--slotted-tone-success-text, CanvasText)
|
|
@@ -618,14 +620,14 @@
|
|
|
618
620
|
* fifths of its size and transparent, on the entering curve. Nothing leaves:
|
|
619
621
|
* the old mark is gone in the same frame, so there is no exit to time.
|
|
620
622
|
*/
|
|
621
|
-
[data-ui
|
|
623
|
+
[data-ui-text-field] > :is([data-part-copy], [data-part-reveal]) > [data-ui-icon] {
|
|
622
624
|
transition:
|
|
623
625
|
opacity var(--slotted-duration-short) var(--slotted-easing-enter),
|
|
624
626
|
scale var(--slotted-duration-short) var(--slotted-easing-enter);
|
|
625
627
|
}
|
|
626
628
|
|
|
627
629
|
@starting-style {
|
|
628
|
-
[data-ui
|
|
630
|
+
[data-ui-text-field] > :is([data-part-copy], [data-part-reveal]) > [data-ui-icon] {
|
|
629
631
|
opacity: 0;
|
|
630
632
|
scale: 0.8;
|
|
631
633
|
}
|
|
@@ -641,8 +643,8 @@
|
|
|
641
643
|
* out on the leaving one, in the same short step, and `display` is held
|
|
642
644
|
* until it has gone.
|
|
643
645
|
*/
|
|
644
|
-
[data-ui
|
|
645
|
-
> :is([data-part
|
|
646
|
+
[data-ui-text-field]
|
|
647
|
+
> :is([data-part-busy], [data-part-caps-lock], [data-part-clear], [data-part-copy]) {
|
|
646
648
|
transition:
|
|
647
649
|
var(--_action-transition),
|
|
648
650
|
opacity var(--slotted-duration-short) var(--slotted-easing-enter),
|
|
@@ -650,13 +652,8 @@
|
|
|
650
652
|
display var(--slotted-duration-short) allow-discrete;
|
|
651
653
|
}
|
|
652
654
|
|
|
653
|
-
[data-ui
|
|
654
|
-
> :is(
|
|
655
|
-
[data-part='busy'],
|
|
656
|
-
[data-part='caps-lock'],
|
|
657
|
-
[data-part='clear'],
|
|
658
|
-
[data-part='copy']
|
|
659
|
-
)[hidden] {
|
|
655
|
+
[data-ui-text-field]
|
|
656
|
+
> :is([data-part-busy], [data-part-caps-lock], [data-part-clear], [data-part-copy])[hidden] {
|
|
660
657
|
display: none;
|
|
661
658
|
opacity: 0;
|
|
662
659
|
scale: 0.8;
|
|
@@ -667,8 +664,8 @@
|
|
|
667
664
|
}
|
|
668
665
|
|
|
669
666
|
@starting-style {
|
|
670
|
-
[data-ui
|
|
671
|
-
> :is([data-part
|
|
667
|
+
[data-ui-text-field]
|
|
668
|
+
> :is([data-part-busy], [data-part-caps-lock], [data-part-clear], [data-part-copy]) {
|
|
672
669
|
opacity: 0;
|
|
673
670
|
scale: 0.8;
|
|
674
671
|
}
|
|
@@ -678,7 +675,7 @@
|
|
|
678
675
|
* The ring is the one `spinner` draws for every family, at this control's
|
|
679
676
|
* glyph size, so it occupies the box a mark beside it would.
|
|
680
677
|
*/
|
|
681
|
-
[data-ui
|
|
678
|
+
[data-ui-text-field] > [data-part-busy] {
|
|
682
679
|
--slotted-spinner-size: var(--_icon-size);
|
|
683
680
|
|
|
684
681
|
color: var(--slotted-text-field-adornment-color, var(--slotted-text-muted, GrayText));
|
|
@@ -690,7 +687,7 @@
|
|
|
690
687
|
* the value, so it is the warning ink on the glyph alone and never the
|
|
691
688
|
* frame's edge — the frame's one alarming state is `invalid`.
|
|
692
689
|
*/
|
|
693
|
-
[data-ui
|
|
690
|
+
[data-ui-text-field] > [data-part-caps-lock] {
|
|
694
691
|
--slotted-icon-size: var(--_icon-size);
|
|
695
692
|
|
|
696
693
|
align-items: center;
|
|
@@ -705,24 +702,24 @@
|
|
|
705
702
|
* one it can meet, which is the order `STATE_PRECEDENCE` sets.
|
|
706
703
|
*/
|
|
707
704
|
|
|
708
|
-
[data-ui
|
|
705
|
+
[data-ui-text-field][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
|
|
709
706
|
[data-invalid]
|
|
710
707
|
) {
|
|
711
708
|
border-color: var(--slotted-text-field-hover-border-color, var(--slotted-tone-accent-border));
|
|
712
709
|
}
|
|
713
710
|
|
|
714
|
-
[data-ui
|
|
711
|
+
[data-ui-text-field][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
|
|
715
712
|
[data-readonly]
|
|
716
|
-
):not([data-invalid]) {
|
|
713
|
+
):not([data-invalid]):not(:has(> [data-part-input]:autofill)) {
|
|
717
714
|
background-color: var(
|
|
718
715
|
--slotted-text-field-subtle-hover-background,
|
|
719
716
|
var(--slotted-tone-secondary-subtle-hover)
|
|
720
717
|
);
|
|
721
718
|
}
|
|
722
719
|
|
|
723
|
-
[data-ui
|
|
720
|
+
[data-ui-text-field][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
|
|
724
721
|
[data-readonly]
|
|
725
|
-
):not([data-invalid]) {
|
|
722
|
+
):not([data-invalid]):not(:has(> [data-part-input]:autofill)) {
|
|
726
723
|
background-color: var(
|
|
727
724
|
--slotted-text-field-plain-hover-background,
|
|
728
725
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -737,16 +734,16 @@
|
|
|
737
734
|
* pointer press as well as for a Tab, which is exactly right for a control
|
|
738
735
|
* whose caret is the thing that moved.
|
|
739
736
|
*/
|
|
740
|
-
[data-ui
|
|
737
|
+
[data-ui-text-field][data-part-root]:has(> [data-part-input]:focus-visible) {
|
|
741
738
|
/**
|
|
742
|
-
* The resting shadow,
|
|
739
|
+
* The resting shadow, recolored. The geometry is the foundation's and the
|
|
743
740
|
* ink is the focus ring's, so the lift under the control and the ring
|
|
744
|
-
* around it are one
|
|
741
|
+
* around it are one color and the state decides which color that is.
|
|
745
742
|
*/
|
|
746
743
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
747
744
|
var(--slotted-focus-ring-color, Highlight);
|
|
748
745
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
749
|
-
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
746
|
+
outline-offset: var(--slotted-control-focus-ring-offset, var(--slotted-focus-ring-offset, 2px));
|
|
750
747
|
}
|
|
751
748
|
|
|
752
749
|
/**
|
|
@@ -756,8 +753,8 @@
|
|
|
756
753
|
* shadow that appears only under focus is a cell that changes size when it
|
|
757
754
|
* is used.
|
|
758
755
|
*/
|
|
759
|
-
[data-ui
|
|
760
|
-
> [data-part
|
|
756
|
+
[data-ui-text-field][data-part-root][data-variant='plain']:has(
|
|
757
|
+
> [data-part-input]:focus-visible
|
|
761
758
|
) {
|
|
762
759
|
box-shadow: none;
|
|
763
760
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
@@ -771,11 +768,11 @@
|
|
|
771
768
|
* The ring is retargeted rather than repainted. Every rule that draws focus —
|
|
772
769
|
* the frame's outline, the shadow under it, the ring on either button — reads
|
|
773
770
|
* `--slotted-focus-ring-color`, so pointing that one name at the invalid
|
|
774
|
-
*
|
|
771
|
+
* color on the element moves all of them at once. That is the whole of the
|
|
775
772
|
* rule for a family, and it is the rule `checkbox`, `radio-group` and
|
|
776
773
|
* `switch` inherit rather than restate when they arrive.
|
|
777
774
|
*/
|
|
778
|
-
[data-ui
|
|
775
|
+
[data-ui-text-field][data-part-root][data-invalid] {
|
|
779
776
|
--slotted-focus-ring-color: var(
|
|
780
777
|
--slotted-text-field-invalid-focus-ring-color,
|
|
781
778
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -792,7 +789,7 @@
|
|
|
792
789
|
|
|
793
790
|
border-color: var(--slotted-text-field-invalid-border-color, var(--slotted-tone-danger-border));
|
|
794
791
|
/*
|
|
795
|
-
*
|
|
792
|
+
* Color alone does not say the field is wrong (WCAG 1.4.1): in
|
|
796
793
|
* `high-contrast` the edge at rest, the danger border and both rings are
|
|
797
794
|
* one black. An edge inside the border makes the invalid line thicker in
|
|
798
795
|
* every scheme. It is a shadow rather than a wider border, so the box and
|
|
@@ -802,15 +799,15 @@
|
|
|
802
799
|
box-shadow: var(--_invalid-edge);
|
|
803
800
|
}
|
|
804
801
|
|
|
805
|
-
[data-ui
|
|
802
|
+
[data-ui-text-field][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible) {
|
|
806
803
|
box-shadow:
|
|
807
804
|
var(--_invalid-edge),
|
|
808
805
|
var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
809
806
|
var(--slotted-focus-ring-color, Highlight);
|
|
810
807
|
}
|
|
811
808
|
|
|
812
|
-
[data-ui
|
|
813
|
-
> [data-part
|
|
809
|
+
[data-ui-text-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
810
|
+
> [data-part-input]:focus-visible
|
|
814
811
|
) {
|
|
815
812
|
/* The ring lies inside the box here, over the border and an edge as wide as
|
|
816
813
|
it; the edge reaches past the ring. */
|
|
@@ -823,28 +820,29 @@
|
|
|
823
820
|
}
|
|
824
821
|
|
|
825
822
|
/*
|
|
826
|
-
* Forced
|
|
823
|
+
* Forced colors remove every box shadow, and the edge with them. The
|
|
827
824
|
* width comes back as an outline inside the border, and a focused invalid
|
|
828
825
|
* control draws its ring double, which a valid ring is not.
|
|
829
826
|
*/
|
|
830
827
|
@media (forced-colors: active) {
|
|
831
|
-
[data-ui
|
|
828
|
+
[data-ui-text-field][data-part-root][data-invalid] {
|
|
832
829
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
833
830
|
outline-offset: calc(
|
|
834
831
|
-1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
|
|
835
832
|
);
|
|
836
833
|
}
|
|
837
834
|
|
|
838
|
-
[data-ui
|
|
839
|
-
> [data-part='input']:focus-visible
|
|
840
|
-
) {
|
|
835
|
+
[data-ui-text-field][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible) {
|
|
841
836
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
842
837
|
var(--slotted-focus-ring-color, Highlight);
|
|
843
|
-
outline-offset: var(
|
|
838
|
+
outline-offset: var(
|
|
839
|
+
--slotted-control-focus-ring-offset,
|
|
840
|
+
var(--slotted-focus-ring-offset, 2px)
|
|
841
|
+
);
|
|
844
842
|
}
|
|
845
843
|
|
|
846
|
-
[data-ui
|
|
847
|
-
> [data-part
|
|
844
|
+
[data-ui-text-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
845
|
+
> [data-part-input]:focus-visible
|
|
848
846
|
) {
|
|
849
847
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
850
848
|
var(--slotted-focus-ring-color, Highlight);
|
|
@@ -859,7 +857,7 @@
|
|
|
859
857
|
* mistakable for disabled: the value is still real and still submitted. The
|
|
860
858
|
* ground says "not yours to change" and the ink says nothing at all.
|
|
861
859
|
*/
|
|
862
|
-
[data-ui
|
|
860
|
+
[data-ui-text-field][data-part-root][data-readonly] {
|
|
863
861
|
background-color: var(
|
|
864
862
|
--slotted-text-field-readonly-background,
|
|
865
863
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -875,8 +873,8 @@
|
|
|
875
873
|
* operable and answering nothing — a defect the deleted `input` family
|
|
876
874
|
* recorded and fixed, and one no rebuild is allowed to reintroduce.
|
|
877
875
|
*/
|
|
878
|
-
[data-ui
|
|
879
|
-
[data-ui
|
|
876
|
+
[data-ui-text-field][data-part-root][data-disabled],
|
|
877
|
+
[data-ui-text-field][data-part-root]:has(> [data-part-input]:disabled) {
|
|
880
878
|
background-color: var(
|
|
881
879
|
--slotted-text-field-disabled-background,
|
|
882
880
|
var(--slotted-disabled-background)
|
|
@@ -889,12 +887,12 @@
|
|
|
889
887
|
}
|
|
890
888
|
|
|
891
889
|
/**
|
|
892
|
-
* Muted to the
|
|
890
|
+
* Muted to the color the theme measures rather than faded by opacity: a
|
|
893
891
|
* value nobody can read is a field nobody can check, and a disabled form
|
|
894
892
|
* still has to say what it holds.
|
|
895
893
|
*/
|
|
896
|
-
[data-ui
|
|
897
|
-
[data-ui
|
|
894
|
+
[data-ui-text-field][data-part-root][data-disabled] > [data-part-start],
|
|
895
|
+
[data-ui-text-field][data-part-root][data-disabled] > [data-part-end] {
|
|
898
896
|
color: var(--slotted-disabled-foreground);
|
|
899
897
|
}
|
|
900
898
|
}
|