@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
|
@@ -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,30 +124,33 @@
|
|
|
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);
|
|
131
|
+
--_control-height: var(--slotted-control-height-sm, 1.75rem);
|
|
131
132
|
--_tile-inset: var(
|
|
132
133
|
--slotted-checkbox-tile-inset,
|
|
133
134
|
var(--slotted-control-padding-inline-sm, 10px)
|
|
134
135
|
);
|
|
135
136
|
}
|
|
136
137
|
|
|
137
|
-
[data-ui
|
|
138
|
+
[data-ui-checkbox][data-part-root][data-size='md'] {
|
|
138
139
|
--_size: var(--slotted-checkbox-size, var(--slotted-selection-size-md, 16px));
|
|
139
140
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
140
141
|
--_gap: var(--slotted-control-label-gap-md, 12px);
|
|
142
|
+
--_control-height: var(--slotted-control-height-md, 2rem);
|
|
141
143
|
--_tile-inset: var(
|
|
142
144
|
--slotted-checkbox-tile-inset,
|
|
143
145
|
var(--slotted-control-padding-inline-md, 13px)
|
|
144
146
|
);
|
|
145
147
|
}
|
|
146
148
|
|
|
147
|
-
[data-ui
|
|
149
|
+
[data-ui-checkbox][data-part-root][data-size='lg'] {
|
|
148
150
|
--_size: var(--slotted-checkbox-size, var(--slotted-selection-size-lg, 18px));
|
|
149
151
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
150
152
|
--_gap: var(--slotted-control-label-gap-lg, 12px);
|
|
153
|
+
--_control-height: var(--slotted-control-height-lg, 2.5rem);
|
|
151
154
|
--_tile-inset: var(
|
|
152
155
|
--slotted-checkbox-tile-inset,
|
|
153
156
|
var(--slotted-control-padding-inline-lg, 16px)
|
|
@@ -156,13 +159,13 @@
|
|
|
156
159
|
|
|
157
160
|
/* ── The box ──────────────────────────────────────────────────────────── */
|
|
158
161
|
|
|
159
|
-
[data-ui
|
|
162
|
+
[data-ui-checkbox] [data-part-control] {
|
|
160
163
|
appearance: none;
|
|
161
164
|
background-color: var(--slotted-checkbox-background, var(--slotted-surface, Canvas));
|
|
162
165
|
/**
|
|
163
|
-
* The medium step of the border scale in the strong border
|
|
166
|
+
* The medium step of the border scale in the strong border color. A
|
|
164
167
|
* sixteen-pixel box is edged too lightly at one pixel and too heavily at
|
|
165
|
-
* two, and the control border
|
|
168
|
+
* two, and the control border color that separates a field from its
|
|
166
169
|
* ground is a weaker grey than a box this small can carry.
|
|
167
170
|
*/
|
|
168
171
|
border: var(--slotted-checkbox-border-width, var(--slotted-border-width-medium, 1.5px)) solid
|
|
@@ -202,7 +205,7 @@
|
|
|
202
205
|
* edge at every step.
|
|
203
206
|
*/
|
|
204
207
|
|
|
205
|
-
[data-ui
|
|
208
|
+
[data-ui-checkbox] [data-part-indicator] {
|
|
206
209
|
--slotted-icon-size: var(--_mark-size);
|
|
207
210
|
|
|
208
211
|
block-size: var(--_mark-size);
|
|
@@ -214,7 +217,7 @@
|
|
|
214
217
|
* the ink appears where the pen would have put it.
|
|
215
218
|
*
|
|
216
219
|
* It was `scale: 0.6` → `1` on the whole element, which grows the artwork
|
|
217
|
-
* out of the box's geometric
|
|
220
|
+
* out of the box's geometric center: the two ends arrive at once, the
|
|
218
221
|
* stroke thickens as it goes, and every subpixel error in the mark's
|
|
219
222
|
* placement travels across the box while it runs. A clip moves no edge and
|
|
220
223
|
* changes no size, so no frame of it can put ink outside the square.
|
|
@@ -239,8 +242,8 @@
|
|
|
239
242
|
opacity var(--slotted-duration-medium) var(--slotted-control-transition-easing);
|
|
240
243
|
}
|
|
241
244
|
|
|
242
|
-
[data-ui
|
|
243
|
-
[data-ui
|
|
245
|
+
[data-ui-checkbox] [data-part-control]:checked + [data-part-indicator],
|
|
246
|
+
[data-ui-checkbox] [data-part-control]:indeterminate + [data-part-indicator] {
|
|
244
247
|
clip-path: inset(0% 0% 0% 0%);
|
|
245
248
|
opacity: 1;
|
|
246
249
|
}
|
|
@@ -251,9 +254,9 @@
|
|
|
251
254
|
* in and only its opacity moves.
|
|
252
255
|
*/
|
|
253
256
|
@media (prefers-reduced-motion: reduce) {
|
|
254
|
-
[data-ui
|
|
255
|
-
[data-ui
|
|
256
|
-
[data-ui
|
|
257
|
+
[data-ui-checkbox] [data-part-indicator],
|
|
258
|
+
[data-ui-checkbox] [data-part-control]:checked + [data-part-indicator],
|
|
259
|
+
[data-ui-checkbox] [data-part-control]:indeterminate + [data-part-indicator] {
|
|
257
260
|
clip-path: none;
|
|
258
261
|
transition: opacity var(--slotted-duration-medium) var(--slotted-control-transition-easing);
|
|
259
262
|
}
|
|
@@ -271,10 +274,14 @@
|
|
|
271
274
|
* block of the target and the halo, which stand on the box outside it.
|
|
272
275
|
*/
|
|
273
276
|
|
|
274
|
-
[data-ui
|
|
277
|
+
[data-ui-checkbox] [data-part-label] {
|
|
275
278
|
cursor: pointer;
|
|
276
279
|
grid-column: 2;
|
|
277
280
|
grid-row: 1;
|
|
281
|
+
/* A child that does not wrap (a one-line row cut with an ellipsis) shrinks
|
|
282
|
+
to the column instead of drawing past the root. */
|
|
283
|
+
max-inline-size: 100%;
|
|
284
|
+
min-inline-size: 0;
|
|
278
285
|
/** A label that is one unbroken token — an id, a hash, a URL — breaks. */
|
|
279
286
|
overflow-wrap: anywhere;
|
|
280
287
|
}
|
|
@@ -285,11 +292,11 @@
|
|
|
285
292
|
* in Arabic inside a row in Portuguese put it on the far side, against
|
|
286
293
|
* nothing, with the text against the control.
|
|
287
294
|
*/
|
|
288
|
-
[data-ui
|
|
295
|
+
[data-ui-checkbox][data-part-root]:has(> [data-part-label]) {
|
|
289
296
|
column-gap: var(--_gap);
|
|
290
297
|
}
|
|
291
298
|
|
|
292
|
-
[data-ui
|
|
299
|
+
[data-ui-checkbox][data-part-root]:not([data-variant='tile']) [data-part-label] {
|
|
293
300
|
justify-self: start;
|
|
294
301
|
position: relative;
|
|
295
302
|
}
|
|
@@ -302,9 +309,9 @@
|
|
|
302
309
|
* stands.
|
|
303
310
|
*
|
|
304
311
|
* The target is `::before`: a square of the WCAG minimum, hit but never
|
|
305
|
-
* seen. It is not
|
|
312
|
+
* seen. It is not centerd on the box. A positioned box that hangs past the
|
|
306
313
|
* root's end or bottom edge is scrollable overflow in whatever the checkbox
|
|
307
|
-
* stands in, and a
|
|
314
|
+
* stands in, and a centerd square hangs four pixels past the end in the
|
|
308
315
|
* label-first arrangement and two past the bottom in both; hanging past the
|
|
309
316
|
* start or the top is overflow nobody can scroll to. So the square ends
|
|
310
317
|
* where the box ends, and the eight pixels it adds are above the box and on
|
|
@@ -317,7 +324,7 @@
|
|
|
317
324
|
* text it stands half as far again: a line of text ends in a glyph's side
|
|
318
325
|
* bearing, lighter than the square's solid edge, and at `dense` the bare
|
|
319
326
|
* 2px read as the wash cutting into the last letter. It was a
|
|
320
|
-
* 32px circle
|
|
327
|
+
* 32px circle centerd on the box, and a circle needs room the row does not
|
|
321
328
|
* have: it reached past the gap to the label in seven of nine
|
|
322
329
|
* size-and-density pairs and drew under the label's first letter, and a
|
|
323
330
|
* table cell a little taller than the box cut it off. Material pays for the
|
|
@@ -341,7 +348,7 @@
|
|
|
341
348
|
* The tile has neither. Its surface is the target and answers the pointer
|
|
342
349
|
* itself, and its label's `::after` stretches over that surface instead.
|
|
343
350
|
*/
|
|
344
|
-
[data-ui
|
|
351
|
+
[data-ui-checkbox][data-part-root]:not([data-variant='tile']) [data-part-label]::before {
|
|
345
352
|
block-size: var(--_target);
|
|
346
353
|
content: '';
|
|
347
354
|
direction: var(--_direction);
|
|
@@ -352,7 +359,7 @@
|
|
|
352
359
|
z-index: -1;
|
|
353
360
|
}
|
|
354
361
|
|
|
355
|
-
[data-ui
|
|
362
|
+
[data-ui-checkbox][data-part-root]:not([data-variant='tile']) [data-part-label]::after {
|
|
356
363
|
background-color: var(--slotted-checkbox-halo-color, var(--slotted-tone-accent-text));
|
|
357
364
|
border-radius: calc(
|
|
358
365
|
var(--slotted-checkbox-radius, var(--slotted-radius-xs, 2px)) + var(--_halo-spread)
|
|
@@ -379,27 +386,26 @@
|
|
|
379
386
|
* on the end side against 4px on the start. So the gap goes, the target ends
|
|
380
387
|
* where the box ends, and the wash stands at the halo spread on all four sides.
|
|
381
388
|
*/
|
|
382
|
-
[data-ui
|
|
383
|
-
[data-label-
|
|
384
|
-
|
|
385
|
-
):not([data-label-placement='start']) {
|
|
389
|
+
[data-ui-checkbox][data-part-root]:is([data-label-hidden], :has(> [data-part-label]:empty)):not(
|
|
390
|
+
[data-label-placement='start']
|
|
391
|
+
) {
|
|
386
392
|
column-gap: 0;
|
|
387
393
|
}
|
|
388
394
|
|
|
389
|
-
[data-ui
|
|
390
|
-
[data-label-
|
|
391
|
-
|
|
392
|
-
)
|
|
393
|
-
[data-part
|
|
395
|
+
[data-ui-checkbox][data-part-root]:is([data-label-hidden], :has(> [data-part-label]:empty)):not(
|
|
396
|
+
[data-label-placement='start'],
|
|
397
|
+
[data-variant='tile']
|
|
398
|
+
)
|
|
399
|
+
[data-part-label]::before {
|
|
394
400
|
/* Ending where the box ends, as everywhere: the root ends there too. */
|
|
395
401
|
inset-inline-start: calc(-1 * var(--_target));
|
|
396
402
|
}
|
|
397
403
|
|
|
398
|
-
[data-ui
|
|
399
|
-
[data-label-
|
|
400
|
-
|
|
401
|
-
)
|
|
402
|
-
[data-part
|
|
404
|
+
[data-ui-checkbox][data-part-root]:is([data-label-hidden], :has(> [data-part-label]:empty)):not(
|
|
405
|
+
[data-label-placement='start'],
|
|
406
|
+
[data-variant='tile']
|
|
407
|
+
)
|
|
408
|
+
[data-part-label]::after {
|
|
403
409
|
inset-inline-end: calc(-1 * var(--_halo-spread));
|
|
404
410
|
inset-inline-start: calc(-1 * (var(--_size) + var(--_halo-spread)));
|
|
405
411
|
}
|
|
@@ -409,13 +415,14 @@
|
|
|
409
415
|
* label: inside, it would join the accessible name, and a paragraph of help
|
|
410
416
|
* text that toggles a value when it is clicked is a paragraph nobody reads.
|
|
411
417
|
*/
|
|
412
|
-
[data-ui
|
|
418
|
+
[data-ui-checkbox] [data-part-description] {
|
|
413
419
|
color: var(--slotted-checkbox-description-color, var(--slotted-text-muted, GrayText));
|
|
414
420
|
font-size: var(--slotted-checkbox-description-font-size, var(--slotted-font-size-xs, 0.75rem));
|
|
415
421
|
grid-column: 2;
|
|
416
422
|
grid-row: 2;
|
|
417
423
|
line-height: var(--slotted-line-height-xs, 1.4);
|
|
418
424
|
margin: 0;
|
|
425
|
+
min-inline-size: 0;
|
|
419
426
|
overflow-wrap: anywhere;
|
|
420
427
|
padding-block-start: var(--_description-gap);
|
|
421
428
|
}
|
|
@@ -427,7 +434,7 @@
|
|
|
427
434
|
* number in both arrangements and in both writing directions.
|
|
428
435
|
*/
|
|
429
436
|
|
|
430
|
-
[data-ui
|
|
437
|
+
[data-ui-checkbox][data-part-root][data-label-placement='start'] {
|
|
431
438
|
/**
|
|
432
439
|
* `1fr` and not `max-content`, which was tried first and looked better in
|
|
433
440
|
* one row than in five: `max-content` sizes each item's first column from
|
|
@@ -440,30 +447,69 @@
|
|
|
440
447
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
441
448
|
}
|
|
442
449
|
|
|
443
|
-
[data-ui
|
|
444
|
-
[data-ui
|
|
450
|
+
[data-ui-checkbox][data-part-root][data-label-placement='start'] [data-part-control],
|
|
451
|
+
[data-ui-checkbox][data-part-root][data-label-placement='start'] [data-part-indicator] {
|
|
445
452
|
grid-area: 1 / 2;
|
|
446
453
|
}
|
|
447
454
|
|
|
448
|
-
[data-ui
|
|
449
|
-
[data-ui
|
|
455
|
+
[data-ui-checkbox][data-part-root][data-label-placement='start'] [data-part-label],
|
|
456
|
+
[data-ui-checkbox][data-part-root][data-label-placement='start'] [data-part-description] {
|
|
450
457
|
grid-column: 1;
|
|
451
458
|
}
|
|
452
459
|
|
|
453
|
-
[data-ui
|
|
460
|
+
[data-ui-checkbox][data-part-root][data-label-placement='start'] [data-part-label] {
|
|
454
461
|
justify-self: stretch;
|
|
455
462
|
}
|
|
456
463
|
|
|
457
|
-
[data-ui
|
|
464
|
+
[data-ui-checkbox][data-part-root][data-label-placement='start'] [data-part-label]::before {
|
|
458
465
|
inset-inline-end: calc(-1 * (var(--_size) + var(--_gap)));
|
|
459
466
|
inset-inline-start: auto;
|
|
460
467
|
}
|
|
461
468
|
|
|
462
|
-
[data-ui
|
|
469
|
+
[data-ui-checkbox][data-part-root][data-label-placement='start'] [data-part-label]::after {
|
|
463
470
|
inset-inline-end: calc(-1 * (var(--_size) + var(--_gap) + var(--_halo-spread)));
|
|
464
471
|
inset-inline-start: calc(-1.5 * var(--_halo-spread));
|
|
465
472
|
}
|
|
466
473
|
|
|
474
|
+
/* ── A control among controls ─────────────────────────────────────────
|
|
475
|
+
*
|
|
476
|
+
* `variant="control"`: the choice beside fields and buttons on one row. The
|
|
477
|
+
* plain root is its line of text, and its halo stands outside that box, so
|
|
478
|
+
* a stack of choices keeps the square on the edge of the form. On a row the
|
|
479
|
+
* same halo is shorter than the controls beside it and paints into the
|
|
480
|
+
* row's gap. Here the root is a box one control tall that holds the halo:
|
|
481
|
+
* the halo's overhang becomes the root's own padding, and the gap of the
|
|
482
|
+
* row is the space a reader sees between the halo and its neighbors.
|
|
483
|
+
*
|
|
484
|
+
* The block padding is what remains of the control height past one line, so
|
|
485
|
+
* a label that wraps adds lines and the halo still ends where the root ends.
|
|
486
|
+
*/
|
|
487
|
+
[data-ui-checkbox][data-part-root][data-variant='control'] {
|
|
488
|
+
--_control-pad: max(
|
|
489
|
+
0px,
|
|
490
|
+
(var(--_control-height) - var(--_font-size) * var(--_line-height)) / 2
|
|
491
|
+
);
|
|
492
|
+
|
|
493
|
+
padding-block: var(--_control-pad);
|
|
494
|
+
padding-inline: var(--_halo-spread) calc(1.5 * var(--_halo-spread));
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
[data-ui-checkbox][data-part-root][data-variant='control'][data-label-placement='start'] {
|
|
498
|
+
padding-inline: calc(1.5 * var(--_halo-spread)) var(--_halo-spread);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
[data-ui-checkbox][data-part-root][data-variant='control']:is(
|
|
502
|
+
[data-label-hidden],
|
|
503
|
+
:has(> [data-part-label]:empty)
|
|
504
|
+
):not([data-label-placement='start']) {
|
|
505
|
+
padding-inline: var(--_halo-spread);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
[data-ui-checkbox][data-part-root][data-variant='control'] [data-part-label]::after {
|
|
509
|
+
border-radius: var(--slotted-control-radius, 4px);
|
|
510
|
+
inset-block: calc(-1 * var(--_control-pad));
|
|
511
|
+
}
|
|
512
|
+
|
|
467
513
|
/* ── States ───────────────────────────────────────────────────────────
|
|
468
514
|
*
|
|
469
515
|
* In the order `STATE_PRECEDENCE` declares, each weaker one held back for
|
|
@@ -477,38 +523,37 @@
|
|
|
477
523
|
* The halo lights from the box and from the label alike, because both are
|
|
478
524
|
* the same target — the label is what toggles the control.
|
|
479
525
|
*/
|
|
480
|
-
[data-ui
|
|
481
|
-
[data-part='control']:hover:not(:disabled) {
|
|
526
|
+
[data-ui-checkbox][data-part-root]:not([data-readonly]) [data-part-control]:hover:not(:disabled) {
|
|
482
527
|
border-color: var(--slotted-checkbox-hover-border-color, var(--slotted-tone-accent-border));
|
|
483
528
|
}
|
|
484
529
|
|
|
485
|
-
[data-ui
|
|
486
|
-
[data-part
|
|
487
|
-
~ [data-part
|
|
488
|
-
[data-ui
|
|
489
|
-
[data-part
|
|
490
|
-
~ [data-part
|
|
530
|
+
[data-ui-checkbox][data-part-root]:not([data-readonly])
|
|
531
|
+
[data-part-control]:hover:not(:disabled)
|
|
532
|
+
~ [data-part-label]::after,
|
|
533
|
+
[data-ui-checkbox][data-part-root]:not([data-readonly])
|
|
534
|
+
[data-part-control]:not(:disabled)
|
|
535
|
+
~ [data-part-label]:hover::after {
|
|
491
536
|
opacity: var(--slotted-selection-halo-opacity, 0.12);
|
|
492
537
|
}
|
|
493
538
|
|
|
494
|
-
[data-ui
|
|
495
|
-
[data-part
|
|
539
|
+
[data-ui-checkbox][data-part-root]:not([data-readonly])
|
|
540
|
+
[data-part-control]:active:not(:disabled) {
|
|
496
541
|
background-color: var(
|
|
497
542
|
--slotted-checkbox-active-background,
|
|
498
543
|
var(--slotted-tone-accent-subtle-active)
|
|
499
544
|
);
|
|
500
545
|
}
|
|
501
546
|
|
|
502
|
-
[data-ui
|
|
503
|
-
[data-ui
|
|
547
|
+
[data-ui-checkbox] [data-part-control]:checked,
|
|
548
|
+
[data-ui-checkbox] [data-part-control]:indeterminate {
|
|
504
549
|
background-color: var(--slotted-checkbox-checked-background, var(--slotted-tone-accent-solid));
|
|
505
550
|
border-color: var(--slotted-checkbox-checked-border-color, var(--slotted-tone-accent-solid));
|
|
506
551
|
}
|
|
507
552
|
|
|
508
|
-
[data-ui
|
|
509
|
-
[data-part
|
|
510
|
-
[data-ui
|
|
511
|
-
[data-part
|
|
553
|
+
[data-ui-checkbox][data-part-root]:not([data-readonly])
|
|
554
|
+
[data-part-control]:checked:hover:not(:disabled),
|
|
555
|
+
[data-ui-checkbox][data-part-root]:not([data-readonly])
|
|
556
|
+
[data-part-control]:indeterminate:hover:not(:disabled) {
|
|
512
557
|
background-color: var(
|
|
513
558
|
--slotted-checkbox-checked-hover-background,
|
|
514
559
|
var(--slotted-tone-accent-solid-hover)
|
|
@@ -519,10 +564,10 @@
|
|
|
519
564
|
);
|
|
520
565
|
}
|
|
521
566
|
|
|
522
|
-
[data-ui
|
|
523
|
-
[data-part
|
|
524
|
-
[data-ui
|
|
525
|
-
[data-part
|
|
567
|
+
[data-ui-checkbox][data-part-root]:not([data-readonly])
|
|
568
|
+
[data-part-control]:checked:active:not(:disabled),
|
|
569
|
+
[data-ui-checkbox][data-part-root]:not([data-readonly])
|
|
570
|
+
[data-part-control]:indeterminate:active:not(:disabled) {
|
|
526
571
|
background-color: var(
|
|
527
572
|
--slotted-checkbox-checked-active-background,
|
|
528
573
|
var(--slotted-tone-accent-solid-active)
|
|
@@ -533,17 +578,17 @@
|
|
|
533
578
|
);
|
|
534
579
|
}
|
|
535
580
|
|
|
536
|
-
[data-ui
|
|
581
|
+
[data-ui-checkbox] [data-part-control]:focus-visible {
|
|
537
582
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
538
583
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
539
584
|
}
|
|
540
585
|
|
|
541
586
|
/**
|
|
542
587
|
* The ring is retargeted rather than repainted: every rule that draws focus
|
|
543
|
-
* reads one name, so pointing it at the invalid
|
|
588
|
+
* reads one name, so pointing it at the invalid color moves the outline
|
|
544
589
|
* without a second focus rule existing anywhere.
|
|
545
590
|
*/
|
|
546
|
-
[data-ui
|
|
591
|
+
[data-ui-checkbox][data-part-root][data-invalid] {
|
|
547
592
|
--slotted-focus-ring-color: var(
|
|
548
593
|
--slotted-checkbox-invalid-focus-ring-color,
|
|
549
594
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -551,17 +596,17 @@
|
|
|
551
596
|
}
|
|
552
597
|
|
|
553
598
|
/**
|
|
554
|
-
* The border thickens as well as changing
|
|
599
|
+
* The border thickens as well as changing color. In the `high-contrast`
|
|
555
600
|
* scheme the theme paints `--slotted-tone-danger-border` the same black as
|
|
556
|
-
* every other border, so
|
|
601
|
+
* every other border, so color alone would make an invalid control identical
|
|
557
602
|
* to a valid one — and `docs/component-features.md` §2.5 refuses a state that
|
|
558
|
-
* only
|
|
603
|
+
* only color carries. It thickens by the edge every invalid control adds,
|
|
559
604
|
* `--slotted-control-invalid-edge-width`, and as a border rather than the
|
|
560
|
-
* inset shadow a field draws, because a width survives forced
|
|
605
|
+
* inset shadow a field draws, because a width survives forced colors and a
|
|
561
606
|
* shadow does not. The box keeps its size, because the border box is what is
|
|
562
607
|
* measured.
|
|
563
608
|
*/
|
|
564
|
-
[data-ui
|
|
609
|
+
[data-ui-checkbox][data-part-root][data-invalid] [data-part-control] {
|
|
565
610
|
border-width: calc(
|
|
566
611
|
var(--slotted-checkbox-border-width, var(--slotted-border-width-medium, 1.5px)) +
|
|
567
612
|
var(--slotted-checkbox-invalid-edge-width, var(--slotted-control-invalid-edge-width, 1px))
|
|
@@ -569,8 +614,8 @@
|
|
|
569
614
|
border-color: var(--slotted-checkbox-invalid-border-color, var(--slotted-tone-danger-border));
|
|
570
615
|
}
|
|
571
616
|
|
|
572
|
-
[data-ui
|
|
573
|
-
[data-ui
|
|
617
|
+
[data-ui-checkbox][data-part-root][data-invalid] [data-part-control]:checked,
|
|
618
|
+
[data-ui-checkbox][data-part-root][data-invalid] [data-part-control]:indeterminate {
|
|
574
619
|
background-color: var(
|
|
575
620
|
--slotted-checkbox-invalid-checked-background,
|
|
576
621
|
var(--slotted-tone-danger-solid)
|
|
@@ -580,9 +625,9 @@
|
|
|
580
625
|
var(--slotted-tone-danger-solid)
|
|
581
626
|
);
|
|
582
627
|
/*
|
|
583
|
-
* A filled box has its border in the fill's
|
|
584
|
-
* nothing once the box is checked, and the fill's
|
|
585
|
-
*
|
|
628
|
+
* A filled box has its border in the fill's color, so a wider border says
|
|
629
|
+
* nothing once the box is checked, and the fill's color alone is what a
|
|
630
|
+
* color cannot carry (WCAG 1.4.1). A line of the surface inside the
|
|
586
631
|
* border, the edge's width, parts the border from the fill: a checked
|
|
587
632
|
* invalid box is a ring around a smaller fill, a checked valid one is
|
|
588
633
|
* solid.
|
|
@@ -598,13 +643,13 @@
|
|
|
598
643
|
* disabled. Only the ground and the pointer say the value is not the
|
|
599
644
|
* reader's to move.
|
|
600
645
|
*/
|
|
601
|
-
[data-ui
|
|
602
|
-
[data-ui
|
|
646
|
+
[data-ui-checkbox][data-part-root][data-readonly] [data-part-control],
|
|
647
|
+
[data-ui-checkbox][data-part-root][data-readonly] [data-part-label] {
|
|
603
648
|
cursor: default;
|
|
604
649
|
}
|
|
605
650
|
|
|
606
|
-
[data-ui
|
|
607
|
-
[data-part
|
|
651
|
+
[data-ui-checkbox][data-part-root][data-readonly]
|
|
652
|
+
[data-part-control]:not(:checked):not(:indeterminate) {
|
|
608
653
|
background-color: var(
|
|
609
654
|
--slotted-checkbox-readonly-background,
|
|
610
655
|
/**
|
|
@@ -621,8 +666,8 @@
|
|
|
621
666
|
* `:disabled` beside `[data-disabled]`, because a disabled `fieldset`
|
|
622
667
|
* disables every control inside it and tells none of them.
|
|
623
668
|
*/
|
|
624
|
-
[data-ui
|
|
625
|
-
[data-ui
|
|
669
|
+
[data-ui-checkbox][data-part-root][data-disabled] [data-part-control],
|
|
670
|
+
[data-ui-checkbox] [data-part-control]:disabled {
|
|
626
671
|
background-color: var(
|
|
627
672
|
--slotted-checkbox-disabled-background,
|
|
628
673
|
var(--slotted-disabled-background)
|
|
@@ -631,7 +676,7 @@
|
|
|
631
676
|
cursor: not-allowed;
|
|
632
677
|
}
|
|
633
678
|
|
|
634
|
-
[data-ui
|
|
679
|
+
[data-ui-checkbox] [data-part-control]:disabled + [data-part-indicator] {
|
|
635
680
|
color: var(--slotted-checkbox-disabled-mark-color, var(--slotted-disabled-foreground));
|
|
636
681
|
}
|
|
637
682
|
|
|
@@ -642,10 +687,10 @@
|
|
|
642
687
|
* checkbox in a disabled group would otherwise keep a full-contrast label on
|
|
643
688
|
* a control nobody can reach.
|
|
644
689
|
*/
|
|
645
|
-
[data-ui
|
|
646
|
-
[data-ui
|
|
647
|
-
[data-ui
|
|
648
|
-
[data-ui
|
|
690
|
+
[data-ui-checkbox][data-part-root][data-disabled] [data-part-label],
|
|
691
|
+
[data-ui-checkbox][data-part-root][data-disabled] [data-part-description],
|
|
692
|
+
[data-ui-checkbox] [data-part-control]:disabled ~ [data-part-label],
|
|
693
|
+
[data-ui-checkbox] [data-part-control]:disabled ~ [data-part-description] {
|
|
649
694
|
color: var(--slotted-checkbox-disabled-color, var(--slotted-disabled-foreground));
|
|
650
695
|
cursor: not-allowed;
|
|
651
696
|
}
|
|
@@ -671,7 +716,7 @@
|
|
|
671
716
|
* equal height is a `grid` around the items and nothing this family adds.
|
|
672
717
|
*/
|
|
673
718
|
|
|
674
|
-
[data-ui
|
|
719
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'] {
|
|
675
720
|
/* The description sits one step nearer its label inside a frame (CK2):
|
|
676
721
|
the tile's own inset already holds the pair apart from everything else,
|
|
677
722
|
and the plain variant's distance read as a third row inside the box. */
|
|
@@ -709,11 +754,11 @@
|
|
|
709
754
|
* becoming a two-pixel chosen edge moves no line of text inside the tile. A
|
|
710
755
|
* real border would have to reserve its resting width, and reserving it is
|
|
711
756
|
* what makes the change shift every row by a pixel. It is a border rather
|
|
712
|
-
* than a shadow so that it survives forced
|
|
757
|
+
* than a shadow so that it survives forced colors, where a shadow is removed
|
|
713
758
|
* outright and a width is not. `card` draws its own edge the same way and for
|
|
714
759
|
* the same two reasons.
|
|
715
760
|
*/
|
|
716
|
-
[data-ui
|
|
761
|
+
[data-ui-checkbox][data-part-root][data-variant='tile']::before {
|
|
717
762
|
border: calc(var(--_tile-edge-width) + var(--_tile-invalid-edge, 0px)) solid var(--_tile-edge);
|
|
718
763
|
border-radius: inherit;
|
|
719
764
|
content: '';
|
|
@@ -735,7 +780,7 @@
|
|
|
735
780
|
* description, a button in the corner — sets `position: relative` on itself,
|
|
736
781
|
* for the same reason a card's footer does.
|
|
737
782
|
*/
|
|
738
|
-
[data-ui
|
|
783
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'] [data-part-label]::after {
|
|
739
784
|
content: '';
|
|
740
785
|
inset: 0;
|
|
741
786
|
position: absolute;
|
|
@@ -752,10 +797,10 @@
|
|
|
752
797
|
* pointer made a tile look less chosen than it was.
|
|
753
798
|
*/
|
|
754
799
|
|
|
755
|
-
[data-ui
|
|
800
|
+
[data-ui-checkbox][data-part-root][data-variant='tile']:not([data-readonly]):not(
|
|
756
801
|
[data-disabled]
|
|
757
|
-
):has([data-part
|
|
758
|
-
:has([data-part
|
|
802
|
+
):has([data-part-control]:not(:disabled)):not(
|
|
803
|
+
:has([data-part-control]:is(:checked, :indeterminate))
|
|
759
804
|
):hover {
|
|
760
805
|
--_tile-surface: var(
|
|
761
806
|
--slotted-checkbox-tile-hover-background,
|
|
@@ -767,10 +812,10 @@
|
|
|
767
812
|
);
|
|
768
813
|
}
|
|
769
814
|
|
|
770
|
-
[data-ui
|
|
815
|
+
[data-ui-checkbox][data-part-root][data-variant='tile']:not([data-readonly]):not(
|
|
771
816
|
[data-disabled]
|
|
772
|
-
):has([data-part
|
|
773
|
-
:has([data-part
|
|
817
|
+
):has([data-part-control]:not(:disabled)):not(
|
|
818
|
+
:has([data-part-control]:is(:checked, :indeterminate))
|
|
774
819
|
):active {
|
|
775
820
|
--_tile-surface: var(
|
|
776
821
|
--slotted-checkbox-tile-active-background,
|
|
@@ -784,8 +829,8 @@
|
|
|
784
829
|
* difference a reader has to look for across a row of five, and the tint
|
|
785
830
|
* alone is a difference the `high-contrast` scheme flattens to nothing.
|
|
786
831
|
*/
|
|
787
|
-
[data-ui
|
|
788
|
-
[data-part
|
|
832
|
+
[data-ui-checkbox][data-part-root][data-variant='tile']:not([data-readonly]):has(
|
|
833
|
+
[data-part-control]:is(:checked, :indeterminate)
|
|
789
834
|
) {
|
|
790
835
|
--_tile-edge: var(
|
|
791
836
|
--slotted-checkbox-tile-checked-border-color,
|
|
@@ -800,8 +845,8 @@
|
|
|
800
845
|
* value is real and stays visible, and a read-only set then reads as a set of
|
|
801
846
|
* secondary grounds with one accent edge on the choice that was made.
|
|
802
847
|
*/
|
|
803
|
-
[data-ui
|
|
804
|
-
[data-part
|
|
848
|
+
[data-ui-checkbox][data-part-root][data-variant='tile']:not([data-readonly]):has(
|
|
849
|
+
[data-part-control]:is(:checked, :indeterminate)
|
|
805
850
|
) {
|
|
806
851
|
--_tile-surface: var(
|
|
807
852
|
--slotted-checkbox-tile-checked-background,
|
|
@@ -818,16 +863,16 @@
|
|
|
818
863
|
* merely hovered. Carbon moves the ground because its selected fill is not at
|
|
819
864
|
* the end of its own scale; here it is.
|
|
820
865
|
*/
|
|
821
|
-
[data-ui
|
|
866
|
+
[data-ui-checkbox][data-part-root][data-variant='tile']:not([data-readonly]):not(
|
|
822
867
|
[data-disabled]
|
|
823
|
-
):has([data-part
|
|
868
|
+
):has([data-part-control]:is(:checked, :indeterminate):not(:disabled)):hover {
|
|
824
869
|
--_tile-edge: var(
|
|
825
870
|
--slotted-checkbox-tile-checked-hover-border-color,
|
|
826
871
|
var(--slotted-tone-accent-solid-hover)
|
|
827
872
|
);
|
|
828
873
|
}
|
|
829
874
|
|
|
830
|
-
[data-ui
|
|
875
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'][data-invalid] {
|
|
831
876
|
--_tile-edge: var(
|
|
832
877
|
--slotted-checkbox-tile-invalid-border-color,
|
|
833
878
|
var(--slotted-tone-danger-border)
|
|
@@ -840,8 +885,8 @@
|
|
|
840
885
|
);
|
|
841
886
|
}
|
|
842
887
|
|
|
843
|
-
[data-ui
|
|
844
|
-
[data-part
|
|
888
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'][data-invalid]:has(
|
|
889
|
+
[data-part-control]:is(:checked, :indeterminate)
|
|
845
890
|
) {
|
|
846
891
|
--_tile-surface: var(
|
|
847
892
|
--slotted-checkbox-tile-invalid-checked-background,
|
|
@@ -855,7 +900,7 @@
|
|
|
855
900
|
|
|
856
901
|
/* Read-only keeps the ink and the tab stop; only the ground and the pointer
|
|
857
902
|
say the value is not the reader's to move. */
|
|
858
|
-
[data-ui
|
|
903
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'][data-readonly] {
|
|
859
904
|
--_tile-surface: var(
|
|
860
905
|
--slotted-checkbox-tile-readonly-background,
|
|
861
906
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -867,15 +912,15 @@
|
|
|
867
912
|
* the accessibility tree and nowhere on screen. The box inside is still
|
|
868
913
|
* painted chosen — it is the mark that says what was chosen — and the frame
|
|
869
914
|
* says the value is not the reader's to move, in every scheme, because the
|
|
870
|
-
* neutral edge and the accent edge are different
|
|
915
|
+
* neutral edge and the accent edge are different colors in all three.
|
|
871
916
|
*/
|
|
872
917
|
--_tile-edge: var(--slotted-checkbox-tile-readonly-border-color, var(--slotted-border-strong));
|
|
873
918
|
|
|
874
919
|
cursor: default;
|
|
875
920
|
}
|
|
876
921
|
|
|
877
|
-
[data-ui
|
|
878
|
-
[data-ui
|
|
922
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'][data-disabled],
|
|
923
|
+
[data-ui-checkbox][data-part-root][data-variant='tile']:has([data-part-control]:disabled) {
|
|
879
924
|
--_tile-surface: var(
|
|
880
925
|
--slotted-checkbox-tile-disabled-background,
|
|
881
926
|
var(--slotted-disabled-background)
|
|
@@ -896,14 +941,12 @@
|
|
|
896
941
|
* which reads as two controls. The tile is what the pointer and the keyboard
|
|
897
942
|
* are addressing, so the tile is what the ring is about.
|
|
898
943
|
*/
|
|
899
|
-
[data-ui
|
|
900
|
-
[data-part='control']:focus-visible
|
|
901
|
-
) {
|
|
944
|
+
[data-ui-checkbox][data-part-root][data-variant='tile']:has([data-part-control]:focus-visible) {
|
|
902
945
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
903
946
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
904
947
|
}
|
|
905
948
|
|
|
906
|
-
[data-ui
|
|
949
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'] [data-part-control]:focus-visible {
|
|
907
950
|
outline: none;
|
|
908
951
|
}
|
|
909
952
|
|
|
@@ -911,19 +954,19 @@
|
|
|
911
954
|
*
|
|
912
955
|
* The one place this family paints something the theme cannot reach. Forced
|
|
913
956
|
* 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
|
|
957
|
+
* the mark and the ground it stands on would be forced to one color and the
|
|
915
958
|
* check would disappear into the box it is drawn in. The pair is restated here in system
|
|
916
|
-
*
|
|
959
|
+
* colors, which is what the briefing allows a family to do exactly when the
|
|
917
960
|
* theme cannot.
|
|
918
961
|
*/
|
|
919
962
|
@media (forced-colors: active) {
|
|
920
|
-
[data-ui
|
|
963
|
+
[data-ui-checkbox] [data-part-control] {
|
|
921
964
|
background-color: Field;
|
|
922
965
|
border-color: FieldText;
|
|
923
966
|
}
|
|
924
967
|
|
|
925
|
-
[data-ui
|
|
926
|
-
[data-ui
|
|
968
|
+
[data-ui-checkbox] [data-part-control]:checked,
|
|
969
|
+
[data-ui-checkbox] [data-part-control]:indeterminate {
|
|
927
970
|
background-color: Highlight;
|
|
928
971
|
border-color: Highlight;
|
|
929
972
|
}
|
|
@@ -932,12 +975,12 @@
|
|
|
932
975
|
* A checked invalid box keeps the checked pair. The theme maps the danger
|
|
933
976
|
* fill to `ButtonFace`, so the invalid rule above painted fill, border and
|
|
934
977
|
* 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
|
|
978
|
+
* takes `CanvasText`, and the parting line, a shadow forced colors remove,
|
|
979
|
+
* comes back as an outline in the page's color inside it; a focused one
|
|
937
980
|
* draws its ring double.
|
|
938
981
|
*/
|
|
939
|
-
[data-ui
|
|
940
|
-
[data-ui
|
|
982
|
+
[data-ui-checkbox][data-part-root][data-invalid] [data-part-control]:checked,
|
|
983
|
+
[data-ui-checkbox][data-part-root][data-invalid] [data-part-control]:indeterminate {
|
|
941
984
|
background-color: Highlight;
|
|
942
985
|
border-color: CanvasText;
|
|
943
986
|
outline: var(
|
|
@@ -961,10 +1004,9 @@
|
|
|
961
1004
|
);
|
|
962
1005
|
}
|
|
963
1006
|
|
|
964
|
-
[data-ui
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
[data-part='control']:indeterminate:focus-visible {
|
|
1007
|
+
[data-ui-checkbox][data-part-root][data-invalid] [data-part-control]:checked:focus-visible,
|
|
1008
|
+
[data-ui-checkbox][data-part-root][data-invalid]
|
|
1009
|
+
[data-part-control]:indeterminate:focus-visible {
|
|
968
1010
|
outline: calc(
|
|
969
1011
|
var(--slotted-focus-ring-width, 2px) +
|
|
970
1012
|
var(
|
|
@@ -976,35 +1018,35 @@
|
|
|
976
1018
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
977
1019
|
}
|
|
978
1020
|
|
|
979
|
-
[data-ui
|
|
980
|
-
[data-ui
|
|
1021
|
+
[data-ui-checkbox] [data-part-control]:checked + [data-part-indicator],
|
|
1022
|
+
[data-ui-checkbox] [data-part-control]:indeterminate + [data-part-indicator] {
|
|
981
1023
|
color: HighlightText;
|
|
982
1024
|
}
|
|
983
1025
|
|
|
984
|
-
[data-ui
|
|
985
|
-
[data-part
|
|
986
|
-
+ [data-part
|
|
987
|
-
[data-ui
|
|
988
|
-
[data-part
|
|
989
|
-
+ [data-part
|
|
1026
|
+
[data-ui-checkbox][data-part-root][data-invalid]
|
|
1027
|
+
[data-part-control]:checked
|
|
1028
|
+
+ [data-part-indicator],
|
|
1029
|
+
[data-ui-checkbox][data-part-root][data-invalid]
|
|
1030
|
+
[data-part-control]:indeterminate
|
|
1031
|
+
+ [data-part-indicator] {
|
|
990
1032
|
color: HighlightText;
|
|
991
1033
|
}
|
|
992
1034
|
|
|
993
1035
|
/* 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
|
|
1036
|
+
page's white; it takes the system's text color instead. */
|
|
1037
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'][data-invalid],
|
|
1038
|
+
[data-ui-checkbox][data-part-root][data-variant='tile'][data-invalid]:has(
|
|
1039
|
+
[data-part-control]:is(:checked, :indeterminate)
|
|
998
1040
|
) {
|
|
999
1041
|
--_tile-edge: CanvasText;
|
|
1000
1042
|
}
|
|
1001
1043
|
|
|
1002
|
-
[data-ui
|
|
1044
|
+
[data-ui-checkbox] [data-part-control]:disabled {
|
|
1003
1045
|
background-color: Field;
|
|
1004
1046
|
border-color: GrayText;
|
|
1005
1047
|
}
|
|
1006
1048
|
|
|
1007
|
-
[data-ui
|
|
1049
|
+
[data-ui-checkbox] [data-part-control]:disabled + [data-part-indicator] {
|
|
1008
1050
|
color: GrayText;
|
|
1009
1051
|
}
|
|
1010
1052
|
}
|