@slotted/styles 0.1.0-beta.7 → 0.1.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/accordion/accordion.css +10 -10
- package/src/action-bar/action-bar.css +31 -32
- package/src/action-sheet/action-sheet.css +36 -36
- package/src/alert/alert.css +35 -35
- package/src/app-shell/app-shell.css +280 -299
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +91 -99
- package/src/avatar/avatar.css +41 -41
- package/src/avatar-group/avatar-group.css +21 -22
- package/src/badge/badge.css +37 -37
- package/src/breadcrumb/breadcrumb.css +37 -37
- package/src/button/button.css +88 -69
- package/src/button-group/button-group.css +69 -73
- package/src/calendar/calendar.css +93 -103
- package/src/card/card.css +54 -61
- package/src/carousel/carousel.css +150 -161
- package/src/cascader/cascader.css +147 -151
- package/src/chart/chart.css +225 -240
- package/src/checkbox/checkbox.css +119 -124
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +81 -85
- package/src/collapsible/collapsible.css +69 -76
- package/src/color-picker/color-picker.css +83 -91
- package/src/column-manager/column-manager.css +106 -114
- package/src/combobox/combobox.css +99 -101
- package/src/command-palette/command-palette.css +84 -90
- package/src/container/container.css +24 -24
- package/src/context-menu/context-menu.css +8 -8
- package/src/currency-field/currency-field.css +99 -104
- package/src/dashboard-grid/dashboard-grid.css +104 -107
- package/src/data-grid/data-grid.css +458 -456
- package/src/data-grid/data-grid.tokens.json +2 -0
- package/src/data-list/data-list.css +67 -69
- package/src/date-field/date-field.css +50 -50
- package/src/date-picker/date-picker.css +40 -42
- package/src/date-range-picker/date-range-picker.css +114 -118
- package/src/datetime-field/datetime-field.css +73 -78
- package/src/datetime-picker/datetime-picker.css +61 -63
- package/src/datetime-range-picker/datetime-range-picker.css +149 -156
- package/src/description-list/description-list.css +61 -64
- package/src/detail-panel/detail-panel.css +70 -70
- package/src/dialog/dialog.css +312 -148
- package/src/divider/divider.css +18 -18
- package/src/drawer/drawer.css +186 -209
- package/src/entity-picker/entity-picker.css +220 -239
- package/src/event-calendar/event-calendar.css +343 -385
- package/src/field/field.css +74 -78
- package/src/field-group/field-group.css +22 -25
- package/src/filter-bar/filter-bar.css +193 -209
- package/src/form/form.css +21 -24
- package/src/fullscreen/fullscreen.css +24 -25
- package/src/grid/grid.css +28 -28
- package/src/highlight/highlight.css +6 -6
- package/src/hover-card/hover-card.css +6 -6
- package/src/icon/icon.css +15 -15
- package/src/image/image.css +39 -39
- package/src/import-export-center/import-export-center.css +135 -156
- package/src/inline/inline.css +27 -27
- package/src/inline-message/inline-message.css +28 -28
- package/src/kbd/kbd.css +26 -26
- package/src/link/link.css +15 -15
- package/src/list/list.css +20 -20
- package/src/list-item/list-item.css +66 -66
- package/src/listbox/listbox.css +56 -59
- package/src/loading-overlay/loading-overlay.css +75 -92
- package/src/markdown/markdown.css +17 -17
- package/src/menu/menu.css +63 -65
- package/src/menubar/menubar.css +13 -13
- package/src/message/message.css +174 -202
- package/src/message-scroller/message-scroller.css +41 -42
- package/src/multi-select/multi-select.css +131 -137
- package/src/navigation-menu/navigation-menu.css +167 -188
- package/src/notification-center/notification-center.css +134 -148
- package/src/number-field/number-field.css +76 -81
- package/src/otp-input/otp-input.css +48 -48
- package/src/page/page.css +23 -23
- package/src/page-header/page-header.css +219 -280
- package/src/pagination/pagination.css +68 -72
- package/src/popover/popover.css +40 -49
- package/src/progress-indicator/progress-indicator.css +85 -90
- package/src/prompt-composer/prompt-composer.css +94 -99
- package/src/prose/prose.css +71 -75
- package/src/radio-group/radio-group.css +98 -103
- package/src/rating/rating.css +132 -132
- package/src/result-state/result-state.css +74 -77
- package/src/saved-views/saved-views.css +41 -47
- package/src/scroll-area/scroll-area.css +32 -35
- package/src/section/section.css +16 -16
- package/src/segmented-control/segmented-control.css +77 -79
- package/src/select/select.css +113 -115
- package/src/side-navigation/side-navigation.css +170 -180
- package/src/skeleton/skeleton.css +47 -48
- package/src/slider/slider.css +86 -88
- package/src/sparkline/sparkline.css +32 -32
- package/src/spinner/spinner.css +4 -4
- package/src/split-button/split-button.css +26 -31
- package/src/splitter/splitter.css +35 -35
- package/src/stack/stack.css +24 -24
- package/src/stat-card/stat-card.css +102 -103
- package/src/status-indicator/status-indicator.css +28 -28
- package/src/stepper/stepper.css +58 -62
- package/src/switch/switch.css +86 -92
- package/src/table/table.css +189 -198
- package/src/table-of-contents/table-of-contents.css +51 -54
- package/src/tabs/tabs.css +157 -172
- package/src/tag/tag.css +67 -71
- package/src/tags-input/tags-input.css +124 -74
- package/src/tags-input/tags-input.tokens.json +6 -1
- package/src/text-field/text-field.css +108 -126
- package/src/textarea/textarea.css +26 -26
- package/src/time-field/time-field.css +67 -67
- package/src/time-picker/time-picker.css +56 -58
- package/src/time-range-picker/time-range-picker.css +126 -133
- package/src/timeline/timeline.css +244 -266
- package/src/toast/toast.css +81 -90
- package/src/toggle/toggle.css +29 -33
- package/src/toggle-group/toggle-group.css +67 -71
- package/src/toolbar/toolbar.css +30 -35
- package/src/tooltip/tooltip.css +26 -26
- package/src/top-navigation/top-navigation.css +243 -259
- package/src/tour/tour.css +51 -60
- package/src/transfer/transfer.css +160 -164
- package/src/tree/tree.css +103 -111
- package/src/typography/typography.css +36 -36
- package/src/upload/upload.css +224 -224
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +185 -197
|
@@ -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
|
|
@@ -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,7 +156,7 @@
|
|
|
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
|
/**
|
|
@@ -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);
|
|
@@ -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
|
}
|
|
@@ -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,7 +531,7 @@
|
|
|
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
|
}
|
|
@@ -543,7 +541,7 @@
|
|
|
543
541
|
* reads one name, so pointing it at the invalid colour 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)
|
|
@@ -561,7 +559,7 @@
|
|
|
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)
|
|
@@ -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. */
|
|
@@ -713,7 +711,7 @@
|
|
|
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)
|
|
@@ -874,8 +872,8 @@
|
|
|
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
|
|
|
@@ -917,13 +913,13 @@
|
|
|
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
|
}
|
|
@@ -936,8 +932,8 @@
|
|
|
936
932
|
* comes back as an outline in the page's colour 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
989
|
page's white; it takes the system's text colour instead. */
|
|
995
|
-
[data-ui
|
|
996
|
-
[data-ui
|
|
997
|
-
[data-part
|
|
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
|
}
|