@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.30
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 +13 -1
- package/src/accordion/accordion.css +11 -11
- 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 +96 -96
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +455 -328
- package/src/app-shell/app-shell.tokens.json +5 -2
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +96 -66
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +54 -46
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +137 -89
- package/src/button/button.tokens.json +5 -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 +139 -109
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/card/card.css +68 -65
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +158 -157
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +288 -267
- package/src/chart/chart.tokens.json +4 -0
- package/src/checkbox/checkbox.css +143 -148
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +76 -80
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +203 -130
- package/src/combobox/combobox.tokens.json +3 -0
- package/src/command-palette/command-palette.css +155 -102
- package/src/command-palette/command-palette.tokens.json +2 -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 +185 -115
- package/src/data-grid/data-grid.css +598 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +82 -71
- 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 +117 -58
- package/src/date-picker/date-picker.tokens.json +5 -0
- package/src/date-range-picker/date-range-picker.css +157 -127
- package/src/date-range-picker/date-range-picker.tokens.json +4 -0
- 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 +123 -70
- package/src/datetime-picker/datetime-picker.tokens.json +4 -1
- package/src/datetime-range-picker/datetime-range-picker.css +191 -163
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +4 -0
- package/src/description-list/description-list.css +105 -75
- 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 +434 -198
- package/src/dialog/dialog.tokens.json +7 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +597 -236
- package/src/drawer/drawer.tokens.json +13 -0
- package/src/entity-picker/entity-picker.css +323 -270
- package/src/entity-picker/entity-picker.tokens.json +3 -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 +43 -33
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +200 -216
- package/src/form/form.css +99 -25
- package/src/form/form.tokens.json +5 -0
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +29 -29
- 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 +144 -165
- package/src/inline/inline.css +28 -28
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +62 -50
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +23 -23
- package/src/list-item/list-item.css +89 -75
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +71 -70
- package/src/listbox/listbox.tokens.json +0 -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 +162 -82
- package/src/menu/menu.tokens.json +2 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1250 -1253
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/multi-select/multi-select.css +230 -172
- package/src/multi-select/multi-select.tokens.json +2 -0
- package/src/navigation-menu/navigation-menu.css +169 -190
- package/src/notification-center/notification-center.css +153 -161
- package/src/notification-center/notification-center.tokens.json +3 -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 +41 -27
- package/src/page/page.tokens.json +1 -0
- package/src/page-header/page-header.css +341 -286
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +75 -79
- package/src/popover/popover.css +81 -64
- package/src/popover/popover.tokens.json +1 -0
- package/src/progress-indicator/progress-indicator.css +192 -136
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +260 -113
- 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 +146 -142
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +94 -101
- package/src/runtime-properties.mjs +19 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +44 -37
- package/src/section/section.css +178 -43
- package/src/section/section.tokens.json +8 -2
- package/src/segmented-control/segmented-control.css +210 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +210 -147
- package/src/select/select.tokens.json +3 -0
- package/src/side-navigation/side-navigation.css +193 -196
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +57 -58
- package/src/slider/slider.css +101 -103
- 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 +25 -25
- package/src/stat-card/stat-card.css +415 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +124 -100
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +100 -106
- package/src/table/table.css +270 -198
- package/src/table/table.tokens.json +2 -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 +109 -88
- package/src/tag/tag.tokens.json +10 -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 +116 -64
- package/src/time-picker/time-picker.tokens.json +4 -1
- package/src/time-range-picker/time-range-picker.css +168 -140
- package/src/time-range-picker/time-range-picker.tokens.json +4 -0
- package/src/timeline/timeline.css +280 -292
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +138 -121
- package/src/toast/toast.tokens.json +6 -0
- package/src/toggle/toggle.css +34 -38
- package/src/toggle-group/toggle-group.css +73 -77
- package/src/toolbar/toolbar.css +33 -38
- package/src/tooltip/tooltip.css +65 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +252 -268
- package/src/tour/tour.css +64 -73
- package/src/transfer/transfer.css +164 -168
- package/src/tree/tree.css +113 -121
- package/src/typography/typography.css +42 -38
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* The mark is a sibling of the control and not a pseudo-element of it,
|
|
11
11
|
* because Firefox renders neither `::before` nor `::after` on an `input`. It
|
|
12
12
|
* is the `Glyph` element the binding renders inside that sibling, which
|
|
13
|
-
* inherits its ink rather than baking in a
|
|
13
|
+
* inherits its ink rather than baking in a color that answers one scheme
|
|
14
14
|
* out of three.
|
|
15
15
|
*
|
|
16
16
|
* Painting reads `:checked` and `:indeterminate` rather than the mirrored
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* `data-indeterminate` are still written, because they are what a consumer
|
|
21
21
|
* styles against.
|
|
22
22
|
*/
|
|
23
|
-
[data-ui
|
|
23
|
+
[data-ui-checkbox][data-part-root] {
|
|
24
24
|
/**
|
|
25
25
|
* The box is the selection scale's square: 16px at `md`, the same square
|
|
26
26
|
* Radix, Carbon and Primer all draw, and the theme states it once. It does
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
* than one ratio (CK6).
|
|
38
38
|
*
|
|
39
39
|
* It is a whole number of pixels and not a fraction of the box, because a
|
|
40
|
-
* fraction is what separated the two
|
|
40
|
+
* fraction is what separated the two centers. Fifteen hundredths of a 16px
|
|
41
41
|
* box is an 11.19px mark offset by 2.39px, and a browser paints a box on
|
|
42
42
|
* the pixel grid: the mark was rasterised at 11px from 27px while the
|
|
43
43
|
* square stood at 25px, so the ink landed half a pixel to the start side,
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
/**
|
|
70
70
|
* The distance from the top of the label's box to the top of the square, so
|
|
71
71
|
* the box sits on the first line of a label that wraps to three rather than
|
|
72
|
-
* in the middle of the block. Stated rather than
|
|
72
|
+
* in the middle of the block. Stated rather than centerd: `align-items:
|
|
73
73
|
* center` on a wrapped label is what puts a checkbox beside the second line,
|
|
74
74
|
* and `align-content: center` stops answering the moment the label wraps.
|
|
75
75
|
*/
|
|
@@ -107,11 +107,11 @@
|
|
|
107
107
|
* so the two pseudo-elements take the root's direction rather than the
|
|
108
108
|
* label's, or they land on the far side of the row.
|
|
109
109
|
*/
|
|
110
|
-
[data-ui
|
|
110
|
+
[data-ui-checkbox][data-part-root] {
|
|
111
111
|
--_direction: ltr;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
[data-ui
|
|
114
|
+
[data-ui-checkbox][data-part-root]:dir(rtl) {
|
|
115
115
|
--_direction: rtl;
|
|
116
116
|
}
|
|
117
117
|
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
* with it. The text, the gap and the tile's inset still follow density.
|
|
125
125
|
*/
|
|
126
126
|
|
|
127
|
-
[data-ui
|
|
127
|
+
[data-ui-checkbox][data-part-root][data-size='sm'] {
|
|
128
128
|
--_size: var(--slotted-checkbox-size, var(--slotted-selection-size-sm, 14px));
|
|
129
129
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
130
130
|
--_gap: var(--slotted-control-label-gap-sm, 8px);
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
[data-ui
|
|
137
|
+
[data-ui-checkbox][data-part-root][data-size='md'] {
|
|
138
138
|
--_size: var(--slotted-checkbox-size, var(--slotted-selection-size-md, 16px));
|
|
139
139
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
140
140
|
--_gap: var(--slotted-control-label-gap-md, 12px);
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
);
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
[data-ui
|
|
147
|
+
[data-ui-checkbox][data-part-root][data-size='lg'] {
|
|
148
148
|
--_size: var(--slotted-checkbox-size, var(--slotted-selection-size-lg, 18px));
|
|
149
149
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
150
150
|
--_gap: var(--slotted-control-label-gap-lg, 12px);
|
|
@@ -156,13 +156,13 @@
|
|
|
156
156
|
|
|
157
157
|
/* ── The box ──────────────────────────────────────────────────────────── */
|
|
158
158
|
|
|
159
|
-
[data-ui
|
|
159
|
+
[data-ui-checkbox] [data-part-control] {
|
|
160
160
|
appearance: none;
|
|
161
161
|
background-color: var(--slotted-checkbox-background, var(--slotted-surface, Canvas));
|
|
162
162
|
/**
|
|
163
|
-
* The medium step of the border scale in the strong border
|
|
163
|
+
* The medium step of the border scale in the strong border color. A
|
|
164
164
|
* sixteen-pixel box is edged too lightly at one pixel and too heavily at
|
|
165
|
-
* two, and the control border
|
|
165
|
+
* two, and the control border color that separates a field from its
|
|
166
166
|
* ground is a weaker grey than a box this small can carry.
|
|
167
167
|
*/
|
|
168
168
|
border: var(--slotted-checkbox-border-width, var(--slotted-border-width-medium, 1.5px)) solid
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
* edge at every step.
|
|
203
203
|
*/
|
|
204
204
|
|
|
205
|
-
[data-ui
|
|
205
|
+
[data-ui-checkbox] [data-part-indicator] {
|
|
206
206
|
--slotted-icon-size: var(--_mark-size);
|
|
207
207
|
|
|
208
208
|
block-size: var(--_mark-size);
|
|
@@ -214,7 +214,7 @@
|
|
|
214
214
|
* the ink appears where the pen would have put it.
|
|
215
215
|
*
|
|
216
216
|
* It was `scale: 0.6` → `1` on the whole element, which grows the artwork
|
|
217
|
-
* out of the box's geometric
|
|
217
|
+
* out of the box's geometric center: the two ends arrive at once, the
|
|
218
218
|
* stroke thickens as it goes, and every subpixel error in the mark's
|
|
219
219
|
* placement travels across the box while it runs. A clip moves no edge and
|
|
220
220
|
* changes no size, so no frame of it can put ink outside the square.
|
|
@@ -239,8 +239,8 @@
|
|
|
239
239
|
opacity var(--slotted-duration-medium) var(--slotted-control-transition-easing);
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
[data-ui
|
|
243
|
-
[data-ui
|
|
242
|
+
[data-ui-checkbox] [data-part-control]:checked + [data-part-indicator],
|
|
243
|
+
[data-ui-checkbox] [data-part-control]:indeterminate + [data-part-indicator] {
|
|
244
244
|
clip-path: inset(0% 0% 0% 0%);
|
|
245
245
|
opacity: 1;
|
|
246
246
|
}
|
|
@@ -251,9 +251,9 @@
|
|
|
251
251
|
* in and only its opacity moves.
|
|
252
252
|
*/
|
|
253
253
|
@media (prefers-reduced-motion: reduce) {
|
|
254
|
-
[data-ui
|
|
255
|
-
[data-ui
|
|
256
|
-
[data-ui
|
|
254
|
+
[data-ui-checkbox] [data-part-indicator],
|
|
255
|
+
[data-ui-checkbox] [data-part-control]:checked + [data-part-indicator],
|
|
256
|
+
[data-ui-checkbox] [data-part-control]:indeterminate + [data-part-indicator] {
|
|
257
257
|
clip-path: none;
|
|
258
258
|
transition: opacity var(--slotted-duration-medium) var(--slotted-control-transition-easing);
|
|
259
259
|
}
|
|
@@ -271,7 +271,7 @@
|
|
|
271
271
|
* block of the target and the halo, which stand on the box outside it.
|
|
272
272
|
*/
|
|
273
273
|
|
|
274
|
-
[data-ui
|
|
274
|
+
[data-ui-checkbox] [data-part-label] {
|
|
275
275
|
cursor: pointer;
|
|
276
276
|
grid-column: 2;
|
|
277
277
|
grid-row: 1;
|
|
@@ -285,11 +285,11 @@
|
|
|
285
285
|
* in Arabic inside a row in Portuguese put it on the far side, against
|
|
286
286
|
* nothing, with the text against the control.
|
|
287
287
|
*/
|
|
288
|
-
[data-ui
|
|
288
|
+
[data-ui-checkbox][data-part-root]:has(> [data-part-label]) {
|
|
289
289
|
column-gap: var(--_gap);
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
[data-ui
|
|
292
|
+
[data-ui-checkbox][data-part-root]:not([data-variant='tile']) [data-part-label] {
|
|
293
293
|
justify-self: start;
|
|
294
294
|
position: relative;
|
|
295
295
|
}
|
|
@@ -302,9 +302,9 @@
|
|
|
302
302
|
* stands.
|
|
303
303
|
*
|
|
304
304
|
* The target is `::before`: a square of the WCAG minimum, hit but never
|
|
305
|
-
* seen. It is not
|
|
305
|
+
* seen. It is not centerd on the box. A positioned box that hangs past the
|
|
306
306
|
* root's end or bottom edge is scrollable overflow in whatever the checkbox
|
|
307
|
-
* stands in, and a
|
|
307
|
+
* stands in, and a centerd square hangs four pixels past the end in the
|
|
308
308
|
* label-first arrangement and two past the bottom in both; hanging past the
|
|
309
309
|
* start or the top is overflow nobody can scroll to. So the square ends
|
|
310
310
|
* where the box ends, and the eight pixels it adds are above the box and on
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
* text it stands half as far again: a line of text ends in a glyph's side
|
|
318
318
|
* bearing, lighter than the square's solid edge, and at `dense` the bare
|
|
319
319
|
* 2px read as the wash cutting into the last letter. It was a
|
|
320
|
-
* 32px circle
|
|
320
|
+
* 32px circle centerd on the box, and a circle needs room the row does not
|
|
321
321
|
* have: it reached past the gap to the label in seven of nine
|
|
322
322
|
* size-and-density pairs and drew under the label's first letter, and a
|
|
323
323
|
* table cell a little taller than the box cut it off. Material pays for the
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
* The tile has neither. Its surface is the target and answers the pointer
|
|
342
342
|
* itself, and its label's `::after` stretches over that surface instead.
|
|
343
343
|
*/
|
|
344
|
-
[data-ui
|
|
344
|
+
[data-ui-checkbox][data-part-root]:not([data-variant='tile']) [data-part-label]::before {
|
|
345
345
|
block-size: var(--_target);
|
|
346
346
|
content: '';
|
|
347
347
|
direction: var(--_direction);
|
|
@@ -352,7 +352,7 @@
|
|
|
352
352
|
z-index: -1;
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
-
[data-ui
|
|
355
|
+
[data-ui-checkbox][data-part-root]:not([data-variant='tile']) [data-part-label]::after {
|
|
356
356
|
background-color: var(--slotted-checkbox-halo-color, var(--slotted-tone-accent-text));
|
|
357
357
|
border-radius: calc(
|
|
358
358
|
var(--slotted-checkbox-radius, var(--slotted-radius-xs, 2px)) + var(--_halo-spread)
|
|
@@ -379,27 +379,26 @@
|
|
|
379
379
|
* on the end side against 4px on the start. So the gap goes, the target ends
|
|
380
380
|
* where the box ends, and the wash stands at the halo spread on all four sides.
|
|
381
381
|
*/
|
|
382
|
-
[data-ui
|
|
383
|
-
[data-label-
|
|
384
|
-
|
|
385
|
-
):not([data-label-placement='start']) {
|
|
382
|
+
[data-ui-checkbox][data-part-root]:is([data-label-hidden], :has(> [data-part-label]:empty)):not(
|
|
383
|
+
[data-label-placement='start']
|
|
384
|
+
) {
|
|
386
385
|
column-gap: 0;
|
|
387
386
|
}
|
|
388
387
|
|
|
389
|
-
[data-ui
|
|
390
|
-
[data-label-
|
|
391
|
-
|
|
392
|
-
)
|
|
393
|
-
[data-part
|
|
388
|
+
[data-ui-checkbox][data-part-root]:is([data-label-hidden], :has(> [data-part-label]:empty)):not(
|
|
389
|
+
[data-label-placement='start'],
|
|
390
|
+
[data-variant='tile']
|
|
391
|
+
)
|
|
392
|
+
[data-part-label]::before {
|
|
394
393
|
/* Ending where the box ends, as everywhere: the root ends there too. */
|
|
395
394
|
inset-inline-start: calc(-1 * var(--_target));
|
|
396
395
|
}
|
|
397
396
|
|
|
398
|
-
[data-ui
|
|
399
|
-
[data-label-
|
|
400
|
-
|
|
401
|
-
)
|
|
402
|
-
[data-part
|
|
397
|
+
[data-ui-checkbox][data-part-root]:is([data-label-hidden], :has(> [data-part-label]:empty)):not(
|
|
398
|
+
[data-label-placement='start'],
|
|
399
|
+
[data-variant='tile']
|
|
400
|
+
)
|
|
401
|
+
[data-part-label]::after {
|
|
403
402
|
inset-inline-end: calc(-1 * var(--_halo-spread));
|
|
404
403
|
inset-inline-start: calc(-1 * (var(--_size) + var(--_halo-spread)));
|
|
405
404
|
}
|
|
@@ -409,7 +408,7 @@
|
|
|
409
408
|
* label: inside, it would join the accessible name, and a paragraph of help
|
|
410
409
|
* text that toggles a value when it is clicked is a paragraph nobody reads.
|
|
411
410
|
*/
|
|
412
|
-
[data-ui
|
|
411
|
+
[data-ui-checkbox] [data-part-description] {
|
|
413
412
|
color: var(--slotted-checkbox-description-color, var(--slotted-text-muted, GrayText));
|
|
414
413
|
font-size: var(--slotted-checkbox-description-font-size, var(--slotted-font-size-xs, 0.75rem));
|
|
415
414
|
grid-column: 2;
|
|
@@ -427,7 +426,7 @@
|
|
|
427
426
|
* number in both arrangements and in both writing directions.
|
|
428
427
|
*/
|
|
429
428
|
|
|
430
|
-
[data-ui
|
|
429
|
+
[data-ui-checkbox][data-part-root][data-label-placement='start'] {
|
|
431
430
|
/**
|
|
432
431
|
* `1fr` and not `max-content`, which was tried first and looked better in
|
|
433
432
|
* one row than in five: `max-content` sizes each item's first column from
|
|
@@ -440,26 +439,26 @@
|
|
|
440
439
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
441
440
|
}
|
|
442
441
|
|
|
443
|
-
[data-ui
|
|
444
|
-
[data-ui
|
|
442
|
+
[data-ui-checkbox][data-part-root][data-label-placement='start'] [data-part-control],
|
|
443
|
+
[data-ui-checkbox][data-part-root][data-label-placement='start'] [data-part-indicator] {
|
|
445
444
|
grid-area: 1 / 2;
|
|
446
445
|
}
|
|
447
446
|
|
|
448
|
-
[data-ui
|
|
449
|
-
[data-ui
|
|
447
|
+
[data-ui-checkbox][data-part-root][data-label-placement='start'] [data-part-label],
|
|
448
|
+
[data-ui-checkbox][data-part-root][data-label-placement='start'] [data-part-description] {
|
|
450
449
|
grid-column: 1;
|
|
451
450
|
}
|
|
452
451
|
|
|
453
|
-
[data-ui
|
|
452
|
+
[data-ui-checkbox][data-part-root][data-label-placement='start'] [data-part-label] {
|
|
454
453
|
justify-self: stretch;
|
|
455
454
|
}
|
|
456
455
|
|
|
457
|
-
[data-ui
|
|
456
|
+
[data-ui-checkbox][data-part-root][data-label-placement='start'] [data-part-label]::before {
|
|
458
457
|
inset-inline-end: calc(-1 * (var(--_size) + var(--_gap)));
|
|
459
458
|
inset-inline-start: auto;
|
|
460
459
|
}
|
|
461
460
|
|
|
462
|
-
[data-ui
|
|
461
|
+
[data-ui-checkbox][data-part-root][data-label-placement='start'] [data-part-label]::after {
|
|
463
462
|
inset-inline-end: calc(-1 * (var(--_size) + var(--_gap) + var(--_halo-spread)));
|
|
464
463
|
inset-inline-start: calc(-1.5 * var(--_halo-spread));
|
|
465
464
|
}
|
|
@@ -477,38 +476,37 @@
|
|
|
477
476
|
* The halo lights from the box and from the label alike, because both are
|
|
478
477
|
* the same target — the label is what toggles the control.
|
|
479
478
|
*/
|
|
480
|
-
[data-ui
|
|
481
|
-
[data-part='control']:hover:not(:disabled) {
|
|
479
|
+
[data-ui-checkbox][data-part-root]:not([data-readonly]) [data-part-control]:hover:not(:disabled) {
|
|
482
480
|
border-color: var(--slotted-checkbox-hover-border-color, var(--slotted-tone-accent-border));
|
|
483
481
|
}
|
|
484
482
|
|
|
485
|
-
[data-ui
|
|
486
|
-
[data-part
|
|
487
|
-
~ [data-part
|
|
488
|
-
[data-ui
|
|
489
|
-
[data-part
|
|
490
|
-
~ [data-part
|
|
483
|
+
[data-ui-checkbox][data-part-root]:not([data-readonly])
|
|
484
|
+
[data-part-control]:hover:not(:disabled)
|
|
485
|
+
~ [data-part-label]::after,
|
|
486
|
+
[data-ui-checkbox][data-part-root]:not([data-readonly])
|
|
487
|
+
[data-part-control]:not(:disabled)
|
|
488
|
+
~ [data-part-label]:hover::after {
|
|
491
489
|
opacity: var(--slotted-selection-halo-opacity, 0.12);
|
|
492
490
|
}
|
|
493
491
|
|
|
494
|
-
[data-ui
|
|
495
|
-
[data-part
|
|
492
|
+
[data-ui-checkbox][data-part-root]:not([data-readonly])
|
|
493
|
+
[data-part-control]:active:not(:disabled) {
|
|
496
494
|
background-color: var(
|
|
497
495
|
--slotted-checkbox-active-background,
|
|
498
496
|
var(--slotted-tone-accent-subtle-active)
|
|
499
497
|
);
|
|
500
498
|
}
|
|
501
499
|
|
|
502
|
-
[data-ui
|
|
503
|
-
[data-ui
|
|
500
|
+
[data-ui-checkbox] [data-part-control]:checked,
|
|
501
|
+
[data-ui-checkbox] [data-part-control]:indeterminate {
|
|
504
502
|
background-color: var(--slotted-checkbox-checked-background, var(--slotted-tone-accent-solid));
|
|
505
503
|
border-color: var(--slotted-checkbox-checked-border-color, var(--slotted-tone-accent-solid));
|
|
506
504
|
}
|
|
507
505
|
|
|
508
|
-
[data-ui
|
|
509
|
-
[data-part
|
|
510
|
-
[data-ui
|
|
511
|
-
[data-part
|
|
506
|
+
[data-ui-checkbox][data-part-root]:not([data-readonly])
|
|
507
|
+
[data-part-control]:checked:hover:not(:disabled),
|
|
508
|
+
[data-ui-checkbox][data-part-root]:not([data-readonly])
|
|
509
|
+
[data-part-control]:indeterminate:hover:not(:disabled) {
|
|
512
510
|
background-color: var(
|
|
513
511
|
--slotted-checkbox-checked-hover-background,
|
|
514
512
|
var(--slotted-tone-accent-solid-hover)
|
|
@@ -519,10 +517,10 @@
|
|
|
519
517
|
);
|
|
520
518
|
}
|
|
521
519
|
|
|
522
|
-
[data-ui
|
|
523
|
-
[data-part
|
|
524
|
-
[data-ui
|
|
525
|
-
[data-part
|
|
520
|
+
[data-ui-checkbox][data-part-root]:not([data-readonly])
|
|
521
|
+
[data-part-control]:checked:active:not(:disabled),
|
|
522
|
+
[data-ui-checkbox][data-part-root]:not([data-readonly])
|
|
523
|
+
[data-part-control]:indeterminate:active:not(:disabled) {
|
|
526
524
|
background-color: var(
|
|
527
525
|
--slotted-checkbox-checked-active-background,
|
|
528
526
|
var(--slotted-tone-accent-solid-active)
|
|
@@ -533,17 +531,17 @@
|
|
|
533
531
|
);
|
|
534
532
|
}
|
|
535
533
|
|
|
536
|
-
[data-ui
|
|
534
|
+
[data-ui-checkbox] [data-part-control]:focus-visible {
|
|
537
535
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
538
536
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
539
537
|
}
|
|
540
538
|
|
|
541
539
|
/**
|
|
542
540
|
* The ring is retargeted rather than repainted: every rule that draws focus
|
|
543
|
-
* reads one name, so pointing it at the invalid
|
|
541
|
+
* reads one name, so pointing it at the invalid color moves the outline
|
|
544
542
|
* without a second focus rule existing anywhere.
|
|
545
543
|
*/
|
|
546
|
-
[data-ui
|
|
544
|
+
[data-ui-checkbox][data-part-root][data-invalid] {
|
|
547
545
|
--slotted-focus-ring-color: var(
|
|
548
546
|
--slotted-checkbox-invalid-focus-ring-color,
|
|
549
547
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -551,17 +549,17 @@
|
|
|
551
549
|
}
|
|
552
550
|
|
|
553
551
|
/**
|
|
554
|
-
* The border thickens as well as changing
|
|
552
|
+
* The border thickens as well as changing color. In the `high-contrast`
|
|
555
553
|
* scheme the theme paints `--slotted-tone-danger-border` the same black as
|
|
556
|
-
* every other border, so
|
|
554
|
+
* every other border, so color alone would make an invalid control identical
|
|
557
555
|
* to a valid one — and `docs/component-features.md` §2.5 refuses a state that
|
|
558
|
-
* only
|
|
556
|
+
* only color carries. It thickens by the edge every invalid control adds,
|
|
559
557
|
* `--slotted-control-invalid-edge-width`, and as a border rather than the
|
|
560
|
-
* inset shadow a field draws, because a width survives forced
|
|
558
|
+
* inset shadow a field draws, because a width survives forced colors and a
|
|
561
559
|
* shadow does not. The box keeps its size, because the border box is what is
|
|
562
560
|
* measured.
|
|
563
561
|
*/
|
|
564
|
-
[data-ui
|
|
562
|
+
[data-ui-checkbox][data-part-root][data-invalid] [data-part-control] {
|
|
565
563
|
border-width: calc(
|
|
566
564
|
var(--slotted-checkbox-border-width, var(--slotted-border-width-medium, 1.5px)) +
|
|
567
565
|
var(--slotted-checkbox-invalid-edge-width, var(--slotted-control-invalid-edge-width, 1px))
|
|
@@ -569,8 +567,8 @@
|
|
|
569
567
|
border-color: var(--slotted-checkbox-invalid-border-color, var(--slotted-tone-danger-border));
|
|
570
568
|
}
|
|
571
569
|
|
|
572
|
-
[data-ui
|
|
573
|
-
[data-ui
|
|
570
|
+
[data-ui-checkbox][data-part-root][data-invalid] [data-part-control]:checked,
|
|
571
|
+
[data-ui-checkbox][data-part-root][data-invalid] [data-part-control]:indeterminate {
|
|
574
572
|
background-color: var(
|
|
575
573
|
--slotted-checkbox-invalid-checked-background,
|
|
576
574
|
var(--slotted-tone-danger-solid)
|
|
@@ -580,9 +578,9 @@
|
|
|
580
578
|
var(--slotted-tone-danger-solid)
|
|
581
579
|
);
|
|
582
580
|
/*
|
|
583
|
-
* A filled box has its border in the fill's
|
|
584
|
-
* nothing once the box is checked, and the fill's
|
|
585
|
-
*
|
|
581
|
+
* A filled box has its border in the fill's color, so a wider border says
|
|
582
|
+
* nothing once the box is checked, and the fill's color alone is what a
|
|
583
|
+
* color cannot carry (WCAG 1.4.1). A line of the surface inside the
|
|
586
584
|
* border, the edge's width, parts the border from the fill: a checked
|
|
587
585
|
* invalid box is a ring around a smaller fill, a checked valid one is
|
|
588
586
|
* solid.
|
|
@@ -598,13 +596,13 @@
|
|
|
598
596
|
* disabled. Only the ground and the pointer say the value is not the
|
|
599
597
|
* reader's to move.
|
|
600
598
|
*/
|
|
601
|
-
[data-ui
|
|
602
|
-
[data-ui
|
|
599
|
+
[data-ui-checkbox][data-part-root][data-readonly] [data-part-control],
|
|
600
|
+
[data-ui-checkbox][data-part-root][data-readonly] [data-part-label] {
|
|
603
601
|
cursor: default;
|
|
604
602
|
}
|
|
605
603
|
|
|
606
|
-
[data-ui
|
|
607
|
-
[data-part
|
|
604
|
+
[data-ui-checkbox][data-part-root][data-readonly]
|
|
605
|
+
[data-part-control]:not(:checked):not(:indeterminate) {
|
|
608
606
|
background-color: var(
|
|
609
607
|
--slotted-checkbox-readonly-background,
|
|
610
608
|
/**
|
|
@@ -621,8 +619,8 @@
|
|
|
621
619
|
* `:disabled` beside `[data-disabled]`, because a disabled `fieldset`
|
|
622
620
|
* disables every control inside it and tells none of them.
|
|
623
621
|
*/
|
|
624
|
-
[data-ui
|
|
625
|
-
[data-ui
|
|
622
|
+
[data-ui-checkbox][data-part-root][data-disabled] [data-part-control],
|
|
623
|
+
[data-ui-checkbox] [data-part-control]:disabled {
|
|
626
624
|
background-color: var(
|
|
627
625
|
--slotted-checkbox-disabled-background,
|
|
628
626
|
var(--slotted-disabled-background)
|
|
@@ -631,7 +629,7 @@
|
|
|
631
629
|
cursor: not-allowed;
|
|
632
630
|
}
|
|
633
631
|
|
|
634
|
-
[data-ui
|
|
632
|
+
[data-ui-checkbox] [data-part-control]:disabled + [data-part-indicator] {
|
|
635
633
|
color: var(--slotted-checkbox-disabled-mark-color, var(--slotted-disabled-foreground));
|
|
636
634
|
}
|
|
637
635
|
|
|
@@ -642,10 +640,10 @@
|
|
|
642
640
|
* checkbox in a disabled group would otherwise keep a full-contrast label on
|
|
643
641
|
* a control nobody can reach.
|
|
644
642
|
*/
|
|
645
|
-
[data-ui
|
|
646
|
-
[data-ui
|
|
647
|
-
[data-ui
|
|
648
|
-
[data-ui
|
|
643
|
+
[data-ui-checkbox][data-part-root][data-disabled] [data-part-label],
|
|
644
|
+
[data-ui-checkbox][data-part-root][data-disabled] [data-part-description],
|
|
645
|
+
[data-ui-checkbox] [data-part-control]:disabled ~ [data-part-label],
|
|
646
|
+
[data-ui-checkbox] [data-part-control]:disabled ~ [data-part-description] {
|
|
649
647
|
color: var(--slotted-checkbox-disabled-color, var(--slotted-disabled-foreground));
|
|
650
648
|
cursor: not-allowed;
|
|
651
649
|
}
|
|
@@ -671,7 +669,7 @@
|
|
|
671
669
|
* equal height is a `grid` around the items and nothing this family adds.
|
|
672
670
|
*/
|
|
673
671
|
|
|
674
|
-
[data-ui
|
|
672
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'] {
|
|
675
673
|
/* The description sits one step nearer its label inside a frame (CK2):
|
|
676
674
|
the tile's own inset already holds the pair apart from everything else,
|
|
677
675
|
and the plain variant's distance read as a third row inside the box. */
|
|
@@ -709,11 +707,11 @@
|
|
|
709
707
|
* becoming a two-pixel chosen edge moves no line of text inside the tile. A
|
|
710
708
|
* real border would have to reserve its resting width, and reserving it is
|
|
711
709
|
* what makes the change shift every row by a pixel. It is a border rather
|
|
712
|
-
* than a shadow so that it survives forced
|
|
710
|
+
* than a shadow so that it survives forced colors, where a shadow is removed
|
|
713
711
|
* outright and a width is not. `card` draws its own edge the same way and for
|
|
714
712
|
* the same two reasons.
|
|
715
713
|
*/
|
|
716
|
-
[data-ui
|
|
714
|
+
[data-ui-checkbox][data-part-root][data-variant='tile']::before {
|
|
717
715
|
border: calc(var(--_tile-edge-width) + var(--_tile-invalid-edge, 0px)) solid var(--_tile-edge);
|
|
718
716
|
border-radius: inherit;
|
|
719
717
|
content: '';
|
|
@@ -735,7 +733,7 @@
|
|
|
735
733
|
* description, a button in the corner — sets `position: relative` on itself,
|
|
736
734
|
* for the same reason a card's footer does.
|
|
737
735
|
*/
|
|
738
|
-
[data-ui
|
|
736
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'] [data-part-label]::after {
|
|
739
737
|
content: '';
|
|
740
738
|
inset: 0;
|
|
741
739
|
position: absolute;
|
|
@@ -752,10 +750,10 @@
|
|
|
752
750
|
* pointer made a tile look less chosen than it was.
|
|
753
751
|
*/
|
|
754
752
|
|
|
755
|
-
[data-ui
|
|
753
|
+
[data-ui-checkbox][data-part-root][data-variant='tile']:not([data-readonly]):not(
|
|
756
754
|
[data-disabled]
|
|
757
|
-
):has([data-part
|
|
758
|
-
:has([data-part
|
|
755
|
+
):has([data-part-control]:not(:disabled)):not(
|
|
756
|
+
:has([data-part-control]:is(:checked, :indeterminate))
|
|
759
757
|
):hover {
|
|
760
758
|
--_tile-surface: var(
|
|
761
759
|
--slotted-checkbox-tile-hover-background,
|
|
@@ -767,10 +765,10 @@
|
|
|
767
765
|
);
|
|
768
766
|
}
|
|
769
767
|
|
|
770
|
-
[data-ui
|
|
768
|
+
[data-ui-checkbox][data-part-root][data-variant='tile']:not([data-readonly]):not(
|
|
771
769
|
[data-disabled]
|
|
772
|
-
):has([data-part
|
|
773
|
-
:has([data-part
|
|
770
|
+
):has([data-part-control]:not(:disabled)):not(
|
|
771
|
+
:has([data-part-control]:is(:checked, :indeterminate))
|
|
774
772
|
):active {
|
|
775
773
|
--_tile-surface: var(
|
|
776
774
|
--slotted-checkbox-tile-active-background,
|
|
@@ -784,8 +782,8 @@
|
|
|
784
782
|
* difference a reader has to look for across a row of five, and the tint
|
|
785
783
|
* alone is a difference the `high-contrast` scheme flattens to nothing.
|
|
786
784
|
*/
|
|
787
|
-
[data-ui
|
|
788
|
-
[data-part
|
|
785
|
+
[data-ui-checkbox][data-part-root][data-variant='tile']:not([data-readonly]):has(
|
|
786
|
+
[data-part-control]:is(:checked, :indeterminate)
|
|
789
787
|
) {
|
|
790
788
|
--_tile-edge: var(
|
|
791
789
|
--slotted-checkbox-tile-checked-border-color,
|
|
@@ -800,8 +798,8 @@
|
|
|
800
798
|
* value is real and stays visible, and a read-only set then reads as a set of
|
|
801
799
|
* secondary grounds with one accent edge on the choice that was made.
|
|
802
800
|
*/
|
|
803
|
-
[data-ui
|
|
804
|
-
[data-part
|
|
801
|
+
[data-ui-checkbox][data-part-root][data-variant='tile']:not([data-readonly]):has(
|
|
802
|
+
[data-part-control]:is(:checked, :indeterminate)
|
|
805
803
|
) {
|
|
806
804
|
--_tile-surface: var(
|
|
807
805
|
--slotted-checkbox-tile-checked-background,
|
|
@@ -818,16 +816,16 @@
|
|
|
818
816
|
* merely hovered. Carbon moves the ground because its selected fill is not at
|
|
819
817
|
* the end of its own scale; here it is.
|
|
820
818
|
*/
|
|
821
|
-
[data-ui
|
|
819
|
+
[data-ui-checkbox][data-part-root][data-variant='tile']:not([data-readonly]):not(
|
|
822
820
|
[data-disabled]
|
|
823
|
-
):has([data-part
|
|
821
|
+
):has([data-part-control]:is(:checked, :indeterminate):not(:disabled)):hover {
|
|
824
822
|
--_tile-edge: var(
|
|
825
823
|
--slotted-checkbox-tile-checked-hover-border-color,
|
|
826
824
|
var(--slotted-tone-accent-solid-hover)
|
|
827
825
|
);
|
|
828
826
|
}
|
|
829
827
|
|
|
830
|
-
[data-ui
|
|
828
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'][data-invalid] {
|
|
831
829
|
--_tile-edge: var(
|
|
832
830
|
--slotted-checkbox-tile-invalid-border-color,
|
|
833
831
|
var(--slotted-tone-danger-border)
|
|
@@ -840,8 +838,8 @@
|
|
|
840
838
|
);
|
|
841
839
|
}
|
|
842
840
|
|
|
843
|
-
[data-ui
|
|
844
|
-
[data-part
|
|
841
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'][data-invalid]:has(
|
|
842
|
+
[data-part-control]:is(:checked, :indeterminate)
|
|
845
843
|
) {
|
|
846
844
|
--_tile-surface: var(
|
|
847
845
|
--slotted-checkbox-tile-invalid-checked-background,
|
|
@@ -855,7 +853,7 @@
|
|
|
855
853
|
|
|
856
854
|
/* Read-only keeps the ink and the tab stop; only the ground and the pointer
|
|
857
855
|
say the value is not the reader's to move. */
|
|
858
|
-
[data-ui
|
|
856
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'][data-readonly] {
|
|
859
857
|
--_tile-surface: var(
|
|
860
858
|
--slotted-checkbox-tile-readonly-background,
|
|
861
859
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -867,15 +865,15 @@
|
|
|
867
865
|
* the accessibility tree and nowhere on screen. The box inside is still
|
|
868
866
|
* painted chosen — it is the mark that says what was chosen — and the frame
|
|
869
867
|
* says the value is not the reader's to move, in every scheme, because the
|
|
870
|
-
* neutral edge and the accent edge are different
|
|
868
|
+
* neutral edge and the accent edge are different colors in all three.
|
|
871
869
|
*/
|
|
872
870
|
--_tile-edge: var(--slotted-checkbox-tile-readonly-border-color, var(--slotted-border-strong));
|
|
873
871
|
|
|
874
872
|
cursor: default;
|
|
875
873
|
}
|
|
876
874
|
|
|
877
|
-
[data-ui
|
|
878
|
-
[data-ui
|
|
875
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'][data-disabled],
|
|
876
|
+
[data-ui-checkbox][data-part-root][data-variant='tile']:has([data-part-control]:disabled) {
|
|
879
877
|
--_tile-surface: var(
|
|
880
878
|
--slotted-checkbox-tile-disabled-background,
|
|
881
879
|
var(--slotted-disabled-background)
|
|
@@ -896,14 +894,12 @@
|
|
|
896
894
|
* which reads as two controls. The tile is what the pointer and the keyboard
|
|
897
895
|
* are addressing, so the tile is what the ring is about.
|
|
898
896
|
*/
|
|
899
|
-
[data-ui
|
|
900
|
-
[data-part='control']:focus-visible
|
|
901
|
-
) {
|
|
897
|
+
[data-ui-checkbox][data-part-root][data-variant='tile']:has([data-part-control]:focus-visible) {
|
|
902
898
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
903
899
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
904
900
|
}
|
|
905
901
|
|
|
906
|
-
[data-ui
|
|
902
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'] [data-part-control]:focus-visible {
|
|
907
903
|
outline: none;
|
|
908
904
|
}
|
|
909
905
|
|
|
@@ -911,19 +907,19 @@
|
|
|
911
907
|
*
|
|
912
908
|
* The one place this family paints something the theme cannot reach. Forced
|
|
913
909
|
* colors overrides the box's `background-color` and the mark's `color`, so
|
|
914
|
-
* the mark and the ground it stands on would be forced to one
|
|
910
|
+
* the mark and the ground it stands on would be forced to one color and the
|
|
915
911
|
* check would disappear into the box it is drawn in. The pair is restated here in system
|
|
916
|
-
*
|
|
912
|
+
* colors, which is what the briefing allows a family to do exactly when the
|
|
917
913
|
* theme cannot.
|
|
918
914
|
*/
|
|
919
915
|
@media (forced-colors: active) {
|
|
920
|
-
[data-ui
|
|
916
|
+
[data-ui-checkbox] [data-part-control] {
|
|
921
917
|
background-color: Field;
|
|
922
918
|
border-color: FieldText;
|
|
923
919
|
}
|
|
924
920
|
|
|
925
|
-
[data-ui
|
|
926
|
-
[data-ui
|
|
921
|
+
[data-ui-checkbox] [data-part-control]:checked,
|
|
922
|
+
[data-ui-checkbox] [data-part-control]:indeterminate {
|
|
927
923
|
background-color: Highlight;
|
|
928
924
|
border-color: Highlight;
|
|
929
925
|
}
|
|
@@ -932,12 +928,12 @@
|
|
|
932
928
|
* A checked invalid box keeps the checked pair. The theme maps the danger
|
|
933
929
|
* fill to `ButtonFace`, so the invalid rule above painted fill, border and
|
|
934
930
|
* mark in the page's white and the box looked unchecked. The wider border
|
|
935
|
-
* takes `CanvasText`, and the parting line, a shadow forced
|
|
936
|
-
* comes back as an outline in the page's
|
|
931
|
+
* takes `CanvasText`, and the parting line, a shadow forced colors remove,
|
|
932
|
+
* comes back as an outline in the page's color inside it; a focused one
|
|
937
933
|
* draws its ring double.
|
|
938
934
|
*/
|
|
939
|
-
[data-ui
|
|
940
|
-
[data-ui
|
|
935
|
+
[data-ui-checkbox][data-part-root][data-invalid] [data-part-control]:checked,
|
|
936
|
+
[data-ui-checkbox][data-part-root][data-invalid] [data-part-control]:indeterminate {
|
|
941
937
|
background-color: Highlight;
|
|
942
938
|
border-color: CanvasText;
|
|
943
939
|
outline: var(
|
|
@@ -961,10 +957,9 @@
|
|
|
961
957
|
);
|
|
962
958
|
}
|
|
963
959
|
|
|
964
|
-
[data-ui
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
[data-part='control']:indeterminate:focus-visible {
|
|
960
|
+
[data-ui-checkbox][data-part-root][data-invalid] [data-part-control]:checked:focus-visible,
|
|
961
|
+
[data-ui-checkbox][data-part-root][data-invalid]
|
|
962
|
+
[data-part-control]:indeterminate:focus-visible {
|
|
968
963
|
outline: calc(
|
|
969
964
|
var(--slotted-focus-ring-width, 2px) +
|
|
970
965
|
var(
|
|
@@ -976,35 +971,35 @@
|
|
|
976
971
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
977
972
|
}
|
|
978
973
|
|
|
979
|
-
[data-ui
|
|
980
|
-
[data-ui
|
|
974
|
+
[data-ui-checkbox] [data-part-control]:checked + [data-part-indicator],
|
|
975
|
+
[data-ui-checkbox] [data-part-control]:indeterminate + [data-part-indicator] {
|
|
981
976
|
color: HighlightText;
|
|
982
977
|
}
|
|
983
978
|
|
|
984
|
-
[data-ui
|
|
985
|
-
[data-part
|
|
986
|
-
+ [data-part
|
|
987
|
-
[data-ui
|
|
988
|
-
[data-part
|
|
989
|
-
+ [data-part
|
|
979
|
+
[data-ui-checkbox][data-part-root][data-invalid]
|
|
980
|
+
[data-part-control]:checked
|
|
981
|
+
+ [data-part-indicator],
|
|
982
|
+
[data-ui-checkbox][data-part-root][data-invalid]
|
|
983
|
+
[data-part-control]:indeterminate
|
|
984
|
+
+ [data-part-indicator] {
|
|
990
985
|
color: HighlightText;
|
|
991
986
|
}
|
|
992
987
|
|
|
993
988
|
/* A tile's invalid edge is the danger pair, which the theme maps to the
|
|
994
|
-
page's white; it takes the system's text
|
|
995
|
-
[data-ui
|
|
996
|
-
[data-ui
|
|
997
|
-
[data-part
|
|
989
|
+
page's white; it takes the system's text color instead. */
|
|
990
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'][data-invalid],
|
|
991
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'][data-invalid]:has(
|
|
992
|
+
[data-part-control]:is(:checked, :indeterminate)
|
|
998
993
|
) {
|
|
999
994
|
--_tile-edge: CanvasText;
|
|
1000
995
|
}
|
|
1001
996
|
|
|
1002
|
-
[data-ui
|
|
997
|
+
[data-ui-checkbox] [data-part-control]:disabled {
|
|
1003
998
|
background-color: Field;
|
|
1004
999
|
border-color: GrayText;
|
|
1005
1000
|
}
|
|
1006
1001
|
|
|
1007
|
-
[data-ui
|
|
1002
|
+
[data-ui-checkbox] [data-part-control]:disabled + [data-part-indicator] {
|
|
1008
1003
|
color: GrayText;
|
|
1009
1004
|
}
|
|
1010
1005
|
}
|