@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.31
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 +97 -97
- package/src/alert/alert.tokens.json +6 -1
- package/src/app-shell/app-shell.css +456 -329
- package/src/app-shell/app-shell.tokens.json +6 -3
- 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 +70 -67
- package/src/card/card.tokens.json +1 -0
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +161 -159
- package/src/cascader/cascader.tokens.json +2 -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 +81 -80
- package/src/collapsible/collapsible.tokens.json +1 -0
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +206 -132
- package/src/combobox/combobox.tokens.json +4 -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 +204 -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 +435 -199
- package/src/dialog/dialog.tokens.json +9 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +598 -237
- package/src/drawer/drawer.tokens.json +14 -0
- package/src/entity-picker/entity-picker.css +326 -272
- package/src/entity-picker/entity-picker.tokens.json +4 -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 +100 -26
- package/src/form/form.tokens.json +6 -1
- 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 +147 -168
- package/src/import-export-center/import-export-center.tokens.json +1 -0
- 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 +166 -83
- package/src/menu/menu.tokens.json +3 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1253 -1246
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/multi-select/multi-select.css +233 -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 +41 -27
- package/src/page/page.tokens.json +1 -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/popover/popover.css +85 -65
- package/src/popover/popover.tokens.json +2 -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 +95 -102
- package/src/result-state/result-state.tokens.json +1 -0
- package/src/runtime-properties.mjs +19 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +50 -37
- package/src/section/section.css +179 -44
- package/src/section/section.tokens.json +9 -3
- package/src/segmented-control/segmented-control.css +210 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +213 -149
- package/src/select/select.tokens.json +4 -0
- package/src/side-navigation/side-navigation.css +201 -198
- 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 +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 +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 +68 -74
- package/src/tour/tour.tokens.json +1 -0
- 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
package/src/badge/badge.css
CHANGED
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
* that keeps an icon-only badge the same height as a text one, and the
|
|
17
17
|
* minimum inline size that makes a one-figure pill a circle.
|
|
18
18
|
*/
|
|
19
|
-
[data-ui
|
|
19
|
+
[data-ui-badge][data-part-root] {
|
|
20
20
|
/**
|
|
21
21
|
* Tone. The default is the one a badge carrying a value should speak in: a
|
|
22
22
|
* badge with no tone stated is holding a number, not an opinion.
|
|
23
23
|
*
|
|
24
24
|
* The neutral fill is the tone's `solid-hover` step rather than its
|
|
25
|
-
* `solid` one. `solid` is the same
|
|
25
|
+
* `solid` one. `solid` is the same color as `surface` in all three
|
|
26
26
|
* schemes, so a filled neutral badge and a tinted one were the same
|
|
27
27
|
* rectangle, and neither of them read as filled. One step down the tone's
|
|
28
28
|
* own ramp — 1.48:1 against the light surface where `solid` is 1.23:1,
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
* The disc is as wide as the type it stands beside, rather than a step of
|
|
65
65
|
* the space scale chosen for it. Two readings of the harness produced the
|
|
66
66
|
* rule: at six pixels the 3:1 rim left four pixels of tone and every small
|
|
67
|
-
* dot read as dark rather than as its own
|
|
67
|
+
* dot read as dark rather than as its own color, and at a free sixteen the
|
|
68
68
|
* large dot stood taller than the fourteen-pixel words next to it. A mark
|
|
69
69
|
* that accompanies text is the height of that text, it can never outgrow
|
|
70
70
|
* it, and it answers density without a third scale saying how.
|
|
@@ -116,18 +116,18 @@
|
|
|
116
116
|
* the affordance; the underline belongs to `link`, on a link.
|
|
117
117
|
*/
|
|
118
118
|
text-decoration: none;
|
|
119
|
-
/* Written inside a sentence, a badge sits on the text's
|
|
119
|
+
/* Written inside a sentence, a badge sits on the text's center. */
|
|
120
120
|
vertical-align: middle;
|
|
121
121
|
white-space: nowrap;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
/* ── Tone: which of the five semantic
|
|
124
|
+
/* ── Tone: which of the five semantic colors the badge speaks in ─────── */
|
|
125
125
|
|
|
126
|
-
[data-ui
|
|
126
|
+
[data-ui-badge][data-part-root][data-tone='secondary'] {
|
|
127
127
|
--_edge: var(--_border);
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
[data-ui
|
|
130
|
+
[data-ui-badge][data-part-root][data-tone='accent'] {
|
|
131
131
|
--_solid: var(--slotted-tone-accent-solid);
|
|
132
132
|
--_on-solid: var(--slotted-tone-accent-on-solid);
|
|
133
133
|
--_surface: var(--slotted-tone-accent-surface);
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
--_text: var(--slotted-tone-accent-text);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
[data-ui
|
|
138
|
+
[data-ui-badge][data-part-root][data-tone='success'] {
|
|
139
139
|
--_solid: var(--slotted-tone-success-solid);
|
|
140
140
|
--_on-solid: var(--slotted-tone-success-on-solid);
|
|
141
141
|
--_surface: var(--slotted-tone-success-surface);
|
|
@@ -143,7 +143,15 @@
|
|
|
143
143
|
--_text: var(--slotted-tone-success-text);
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
[data-ui
|
|
146
|
+
[data-ui-badge][data-part-root][data-tone='info'] {
|
|
147
|
+
--_solid: var(--slotted-tone-info-solid);
|
|
148
|
+
--_on-solid: var(--slotted-tone-info-on-solid);
|
|
149
|
+
--_surface: var(--slotted-tone-info-surface);
|
|
150
|
+
--_border: var(--slotted-tone-info-border);
|
|
151
|
+
--_text: var(--slotted-tone-info-text);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
[data-ui-badge][data-part-root][data-tone='warning'] {
|
|
147
155
|
--_solid: var(--slotted-tone-warning-solid);
|
|
148
156
|
--_on-solid: var(--slotted-tone-warning-on-solid);
|
|
149
157
|
--_surface: var(--slotted-tone-warning-surface);
|
|
@@ -151,7 +159,7 @@
|
|
|
151
159
|
--_text: var(--slotted-tone-warning-text);
|
|
152
160
|
}
|
|
153
161
|
|
|
154
|
-
[data-ui
|
|
162
|
+
[data-ui-badge][data-part-root][data-tone='danger'] {
|
|
155
163
|
--_solid: var(--slotted-tone-danger-solid);
|
|
156
164
|
--_on-solid: var(--slotted-tone-danger-on-solid);
|
|
157
165
|
--_surface: var(--slotted-tone-danger-surface);
|
|
@@ -180,19 +188,19 @@
|
|
|
180
188
|
* border looks like and disagree about which of them should wear it.
|
|
181
189
|
*/
|
|
182
190
|
|
|
183
|
-
[data-ui
|
|
191
|
+
[data-ui-badge][data-part-root][data-variant='solid'] {
|
|
184
192
|
background-color: var(--_solid, ButtonFace);
|
|
185
193
|
border-color: var(--_edge, ButtonFace);
|
|
186
194
|
color: var(--_on-solid, ButtonText);
|
|
187
195
|
}
|
|
188
196
|
|
|
189
|
-
[data-ui
|
|
197
|
+
[data-ui-badge][data-part-root][data-variant='soft'] {
|
|
190
198
|
background-color: var(--_surface, ButtonFace);
|
|
191
199
|
border-color: var(--_border, ButtonBorder);
|
|
192
200
|
color: var(--_text, ButtonText);
|
|
193
201
|
}
|
|
194
202
|
|
|
195
|
-
[data-ui
|
|
203
|
+
[data-ui-badge][data-part-root][data-variant='outline'] {
|
|
196
204
|
background-color: transparent;
|
|
197
205
|
border-color: var(--_border, ButtonBorder);
|
|
198
206
|
color: var(--_text, ButtonText);
|
|
@@ -200,7 +208,7 @@
|
|
|
200
208
|
|
|
201
209
|
/* ── Size ─────────────────────────────────────────────────────────────── */
|
|
202
210
|
|
|
203
|
-
[data-ui
|
|
211
|
+
[data-ui-badge][data-part-root][data-size='sm'] {
|
|
204
212
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
205
213
|
/* `0px` rather than `0`: a unitless zero inside the `--_block-size` sum
|
|
206
214
|
makes the whole calculation invalid, and `min-block-size` silently fell
|
|
@@ -216,7 +224,7 @@
|
|
|
216
224
|
* a rounding error: a 12px badge and a 13px badge should not carry visibly
|
|
217
225
|
* different glyphs.
|
|
218
226
|
*/
|
|
219
|
-
[data-ui
|
|
227
|
+
[data-ui-badge][data-part-root][data-size='lg'] {
|
|
220
228
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
221
229
|
--_icon-size: var(--slotted-control-icon-size-md, 16px);
|
|
222
230
|
--_inset-block: var(--slotted-space-2, 0.25rem);
|
|
@@ -226,7 +234,7 @@
|
|
|
226
234
|
|
|
227
235
|
/* ── Shape ────────────────────────────────────────────────────────────── */
|
|
228
236
|
|
|
229
|
-
[data-ui
|
|
237
|
+
[data-ui-badge][data-part-root][data-shape='square'] {
|
|
230
238
|
border-radius: var(--slotted-badge-radius, var(--slotted-radius-sm, 4px));
|
|
231
239
|
}
|
|
232
240
|
|
|
@@ -244,7 +252,7 @@
|
|
|
244
252
|
* A dot renders no value, so nothing is clipped. Text a consumer forces into
|
|
245
253
|
* one overflows rather than disappearing.
|
|
246
254
|
*/
|
|
247
|
-
[data-ui
|
|
255
|
+
[data-ui-badge][data-part-root][data-shape='dot'] {
|
|
248
256
|
block-size: var(--_dot-size);
|
|
249
257
|
border-color: var(--slotted-badge-dot-border-color, var(--slotted-border-strong, CanvasText));
|
|
250
258
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
@@ -262,7 +270,7 @@
|
|
|
262
270
|
* can make the root an `<a>` and a ring that appears only where a family
|
|
263
271
|
* expects focus is a ring that goes missing.
|
|
264
272
|
*/
|
|
265
|
-
[data-ui
|
|
273
|
+
[data-ui-badge][data-part-root]:focus-visible {
|
|
266
274
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
267
275
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
268
276
|
}
|
|
@@ -273,13 +281,13 @@
|
|
|
273
281
|
* The text has a box of its own, as it does in `button`, and that box is what
|
|
274
282
|
* makes the badge's one real typographic problem solvable.
|
|
275
283
|
*
|
|
276
|
-
* A flex container
|
|
284
|
+
* A flex container centers the *line box*, and a line box is not symmetric
|
|
277
285
|
* around the letters inside it: the ascender reaches further above the cap
|
|
278
286
|
* than the descender reaches below the baseline. Measured on this family
|
|
279
287
|
* before the part existed, a word with no descender sat 2.19 pixels high in a
|
|
280
288
|
* 24-pixel badge — six pixels of clearance above the ink and eight below it —
|
|
281
289
|
* while a word with a descender looked correct. `text-box` trims the line box
|
|
282
|
-
* to the cap and the baseline, so what is
|
|
290
|
+
* to the cap and the baseline, so what is centerd is the ink rather than the
|
|
283
291
|
* font's metrics, and every word sits the same way whatever letters it holds.
|
|
284
292
|
*
|
|
285
293
|
* It is applied here rather than on the root because `text-box-trim` needs a
|
|
@@ -293,20 +301,20 @@
|
|
|
293
301
|
* below its content inside the flex root, which is the condition
|
|
294
302
|
* `text-overflow` needs to have anything to do.
|
|
295
303
|
*/
|
|
296
|
-
[data-ui
|
|
304
|
+
[data-ui-badge] [data-part-label] {
|
|
297
305
|
min-inline-size: 0;
|
|
298
306
|
overflow: hidden;
|
|
299
307
|
text-overflow: ellipsis;
|
|
300
308
|
}
|
|
301
309
|
|
|
302
310
|
@supports (text-box: trim-both cap alphabetic) {
|
|
303
|
-
[data-ui
|
|
311
|
+
[data-ui-badge] [data-part-label] {
|
|
304
312
|
/**
|
|
305
313
|
* A descender and a tall diacritic both live outside a box trimmed to the
|
|
306
314
|
* cap and the baseline, and `overflow: hidden` cut them off — visible in
|
|
307
315
|
* the first capture as a beheaded `g` in `Awaiting`. The padding gives
|
|
308
316
|
* the clip region room for them and the negative margin gives the space
|
|
309
|
-
* straight back, so the box the root
|
|
317
|
+
* straight back, so the box the root centers is still the trimmed one and
|
|
310
318
|
* the badge is the height it was.
|
|
311
319
|
*
|
|
312
320
|
* A proportion of the type rather than a step of any scale: what has to
|
|
@@ -323,8 +331,8 @@
|
|
|
323
331
|
* from its container, and a bare glyph host such as `ng-icon` reads the
|
|
324
332
|
* slot's font-size, so both are the glyph scale.
|
|
325
333
|
*/
|
|
326
|
-
[data-ui
|
|
327
|
-
[data-ui
|
|
334
|
+
[data-ui-badge] [data-part-start],
|
|
335
|
+
[data-ui-badge] [data-part-end] {
|
|
328
336
|
--slotted-icon-size: var(--_icon-size);
|
|
329
337
|
|
|
330
338
|
align-items: center;
|
|
@@ -338,8 +346,8 @@
|
|
|
338
346
|
line-height: 1;
|
|
339
347
|
}
|
|
340
348
|
|
|
341
|
-
[data-ui
|
|
342
|
-
[data-ui
|
|
349
|
+
[data-ui-badge] [data-part-start] > *,
|
|
350
|
+
[data-ui-badge] [data-part-end] > * {
|
|
343
351
|
block-size: 100%;
|
|
344
352
|
display: block;
|
|
345
353
|
inline-size: 100%;
|
|
@@ -358,7 +366,7 @@
|
|
|
358
366
|
* frame is read in. Everything else — which corner, how far in from it — is
|
|
359
367
|
* written in logical insets and mirrors on its own.
|
|
360
368
|
*/
|
|
361
|
-
[data-ui
|
|
369
|
+
[data-ui-badge][data-part-anchor] {
|
|
362
370
|
--_dir: 1;
|
|
363
371
|
/* Half the badge's own size. A proportion of the box rather than a step of
|
|
364
372
|
any scale, which is why it is geometry here and not a token. */
|
|
@@ -389,29 +397,29 @@
|
|
|
389
397
|
vertical-align: middle;
|
|
390
398
|
}
|
|
391
399
|
|
|
392
|
-
[data-ui
|
|
400
|
+
[data-ui-badge][data-part-anchor]:dir(rtl) {
|
|
393
401
|
--_dir: -1;
|
|
394
402
|
}
|
|
395
403
|
|
|
396
|
-
[data-ui
|
|
404
|
+
[data-ui-badge][data-part-anchor][data-overlap='circle'] {
|
|
397
405
|
--_anchor-inset: 14%;
|
|
398
406
|
}
|
|
399
407
|
|
|
400
|
-
[data-ui
|
|
401
|
-
[data-ui
|
|
408
|
+
[data-ui-badge][data-part-anchor][data-placement='top-start'],
|
|
409
|
+
[data-ui-badge][data-part-anchor][data-placement='bottom-start'] {
|
|
402
410
|
--_overhang-inline: -50%;
|
|
403
411
|
}
|
|
404
412
|
|
|
405
|
-
[data-ui
|
|
406
|
-
[data-ui
|
|
413
|
+
[data-ui-badge][data-part-anchor][data-placement='bottom-start'],
|
|
414
|
+
[data-ui-badge][data-part-anchor][data-placement='bottom-end'] {
|
|
407
415
|
--_overhang-block: 50%;
|
|
408
416
|
}
|
|
409
417
|
|
|
410
|
-
[data-ui
|
|
418
|
+
[data-ui-badge][data-part-anchor] > [data-ui-badge][data-part-root] {
|
|
411
419
|
/**
|
|
412
420
|
* The ring is what separates the badge from whatever it is sitting on.
|
|
413
421
|
* It is a token rather than a boolean, because a badge inside a card, a
|
|
414
|
-
* toolbar or a
|
|
422
|
+
* toolbar or a colored row is not sitting on the page's own surface.
|
|
415
423
|
*/
|
|
416
424
|
box-shadow: 0 0 0 var(--slotted-badge-ring-width, var(--slotted-border-width-thick, 2px))
|
|
417
425
|
var(--slotted-badge-ring-color, var(--slotted-surface, Canvas));
|
|
@@ -424,28 +432,28 @@
|
|
|
424
432
|
z-index: 1;
|
|
425
433
|
}
|
|
426
434
|
|
|
427
|
-
[data-ui
|
|
428
|
-
[data-ui
|
|
435
|
+
[data-ui-badge][data-part-anchor][data-placement='top-end'] > [data-part-root],
|
|
436
|
+
[data-ui-badge][data-part-anchor][data-placement='top-start'] > [data-part-root] {
|
|
429
437
|
inset-block-start: var(--_anchor-inset);
|
|
430
438
|
}
|
|
431
439
|
|
|
432
|
-
[data-ui
|
|
433
|
-
[data-ui
|
|
440
|
+
[data-ui-badge][data-part-anchor][data-placement='bottom-end'] > [data-part-root],
|
|
441
|
+
[data-ui-badge][data-part-anchor][data-placement='bottom-start'] > [data-part-root] {
|
|
434
442
|
inset-block-end: var(--_anchor-inset);
|
|
435
443
|
}
|
|
436
444
|
|
|
437
|
-
[data-ui
|
|
438
|
-
[data-ui
|
|
445
|
+
[data-ui-badge][data-part-anchor][data-placement='top-end'] > [data-part-root],
|
|
446
|
+
[data-ui-badge][data-part-anchor][data-placement='bottom-end'] > [data-part-root] {
|
|
439
447
|
inset-inline-end: var(--_anchor-inset);
|
|
440
448
|
}
|
|
441
449
|
|
|
442
|
-
[data-ui
|
|
443
|
-
[data-ui
|
|
450
|
+
[data-ui-badge][data-part-anchor][data-placement='top-start'] > [data-part-root],
|
|
451
|
+
[data-ui-badge][data-part-anchor][data-placement='bottom-start'] > [data-part-root] {
|
|
444
452
|
inset-inline-start: var(--_anchor-inset);
|
|
445
453
|
}
|
|
446
454
|
|
|
447
455
|
/**
|
|
448
|
-
* ── Forced
|
|
456
|
+
* ── Forced colors ─────────────────────────────────────────────────────
|
|
449
457
|
*
|
|
450
458
|
* The one place a family may write its own rule: the theme maps every tone
|
|
451
459
|
* ground to `ButtonFace` or `Canvas` and every tone border to `ButtonBorder`,
|
|
@@ -455,7 +463,7 @@
|
|
|
455
463
|
* from the page.
|
|
456
464
|
*/
|
|
457
465
|
@media (forced-colors: active) {
|
|
458
|
-
[data-ui
|
|
466
|
+
[data-ui-badge][data-part-root] {
|
|
459
467
|
border-color: currentColor;
|
|
460
468
|
}
|
|
461
469
|
}
|
|
@@ -40,6 +40,11 @@
|
|
|
40
40
|
"--slotted-tone-danger-solid",
|
|
41
41
|
"--slotted-tone-danger-surface",
|
|
42
42
|
"--slotted-tone-danger-text",
|
|
43
|
+
"--slotted-tone-info-border",
|
|
44
|
+
"--slotted-tone-info-on-solid",
|
|
45
|
+
"--slotted-tone-info-solid",
|
|
46
|
+
"--slotted-tone-info-surface",
|
|
47
|
+
"--slotted-tone-info-text",
|
|
43
48
|
"--slotted-tone-secondary-border",
|
|
44
49
|
"--slotted-tone-secondary-on-solid",
|
|
45
50
|
"--slotted-tone-secondary-solid-hover",
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* from the control scale is the gap and the type size, so a trail sitting
|
|
6
6
|
* above a toolbar reads at the same weight as the toolbar's own labels.
|
|
7
7
|
*
|
|
8
|
-
* Two
|
|
9
|
-
* ancestor is painted in, and `--_strong` is the page's own text
|
|
8
|
+
* Two colors carry the whole family. `--_rest` is the muted step every
|
|
9
|
+
* ancestor is painted in, and `--_strong` is the page's own text color,
|
|
10
10
|
* which is where hover goes and where the current page sits already. Mixing
|
|
11
|
-
* toward a
|
|
11
|
+
* toward a color the theme holds to a contrast ratio in every scheme is the
|
|
12
12
|
* rule `link` arrived at after painting hover with a fill role; a trail is
|
|
13
13
|
* text for the same reason a link is.
|
|
14
14
|
*/
|
|
15
|
-
[data-ui
|
|
15
|
+
[data-ui-breadcrumb] {
|
|
16
16
|
--_rest: var(--slotted-breadcrumb-color, var(--slotted-text-muted, GrayText));
|
|
17
17
|
--_strong: var(--slotted-breadcrumb-color-current, var(--slotted-text, CanvasText));
|
|
18
18
|
--_hover: var(
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
* inline gap because two wrapped lines of one type size need less air between
|
|
60
60
|
* them than two words do beside each other.
|
|
61
61
|
*/
|
|
62
|
-
[data-ui
|
|
62
|
+
[data-ui-breadcrumb] [data-part-list] {
|
|
63
63
|
align-items: center;
|
|
64
64
|
display: flex;
|
|
65
65
|
flex-wrap: wrap;
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
[data-ui
|
|
82
|
+
[data-ui-breadcrumb] [data-part-item] {
|
|
83
83
|
align-items: center;
|
|
84
84
|
column-gap: var(--_gap);
|
|
85
85
|
display: flex;
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
* crumb rendered and the collapse did nothing at all. The capture is what
|
|
105
105
|
* said so; both bindings write the attribute and neither could have known.
|
|
106
106
|
*/
|
|
107
|
-
[data-ui
|
|
107
|
+
[data-ui-breadcrumb] [data-part-item][hidden] {
|
|
108
108
|
display: none;
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -120,26 +120,26 @@
|
|
|
120
120
|
* frame of a drag, and the ellipsis returns in the same frame to the place
|
|
121
121
|
* the crumbs leave.
|
|
122
122
|
*/
|
|
123
|
-
[data-ui
|
|
123
|
+
[data-ui-breadcrumb][data-expanded] [data-part-item] {
|
|
124
124
|
transition: opacity var(--slotted-duration-medium) var(--slotted-easing-enter);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
@starting-style {
|
|
128
|
-
[data-ui
|
|
128
|
+
[data-ui-breadcrumb][data-expanded] [data-part-item] {
|
|
129
129
|
opacity: 0;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
/* ── The crumbs ─────────────────────────────────────────────────────────
|
|
134
134
|
*
|
|
135
|
-
* An ancestor is a muted label that reaches the page's text
|
|
136
|
-
* pointer, and the current page is that
|
|
135
|
+
* An ancestor is a muted label that reaches the page's text color under the
|
|
136
|
+
* pointer, and the current page is that color already. Neither is
|
|
137
137
|
* underlined at rest: a trail is a row of eight rules stacked above a
|
|
138
138
|
* heading, and the underline arrives with the pointer and with focus, where
|
|
139
139
|
* it distinguishes the one crumb being addressed from the seven beside it.
|
|
140
140
|
*/
|
|
141
141
|
|
|
142
|
-
[data-ui
|
|
142
|
+
[data-ui-breadcrumb] :is([data-part-link], [data-part-page], [data-part-trigger]) {
|
|
143
143
|
border-radius: var(--slotted-breadcrumb-radius, var(--slotted-control-radius, 4px));
|
|
144
144
|
display: block;
|
|
145
145
|
/**
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
white-space: nowrap;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
[data-ui
|
|
168
|
+
[data-ui-breadcrumb] [data-part-link] {
|
|
169
169
|
color: inherit;
|
|
170
170
|
}
|
|
171
171
|
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
* the pointer, and a chevron after the label that says a list opens here
|
|
176
176
|
* rather than a page. It keeps the line's height; the menu is the consumer's.
|
|
177
177
|
*/
|
|
178
|
-
[data-ui
|
|
178
|
+
[data-ui-breadcrumb] [data-part-trigger] {
|
|
179
179
|
appearance: none;
|
|
180
180
|
background-color: transparent;
|
|
181
181
|
border: 0;
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
/* The switcher of the page the reader is on is still the page. */
|
|
190
|
-
[data-ui
|
|
190
|
+
[data-ui-breadcrumb] [data-part-trigger][aria-current='page'] {
|
|
191
191
|
color: var(--_strong);
|
|
192
192
|
font-weight: var(--slotted-breadcrumb-page-weight, var(--slotted-font-weight-medium, 500));
|
|
193
193
|
}
|
|
@@ -196,70 +196,70 @@
|
|
|
196
196
|
* What a crumb carries beside its label: a glyph or an avatar before it, a
|
|
197
197
|
* count after it, the chevron at the end of a switcher. They stay inline so
|
|
198
198
|
* the label keeps its ellipsis — a flex crumb would put the text in an
|
|
199
|
-
* anonymous box that cannot truncate — and `icon` already
|
|
199
|
+
* anonymous box that cannot truncate — and `icon` already centers itself on
|
|
200
200
|
* the text. The trail only decides the distance, a step of 6 either side.
|
|
201
201
|
* An atomic inline box takes no underline, so the hover rule marks the words
|
|
202
202
|
* and not the glyph.
|
|
203
203
|
*/
|
|
204
|
-
[data-ui
|
|
205
|
-
:is([data-part
|
|
206
|
-
> :is([data-ui
|
|
204
|
+
[data-ui-breadcrumb]
|
|
205
|
+
:is([data-part-link], [data-part-page], [data-part-trigger])
|
|
206
|
+
> :is([data-ui-icon], [data-ui-avatar]) {
|
|
207
207
|
margin-inline-end: var(--slotted-breadcrumb-content-gap, var(--slotted-space-3, 6px));
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
[data-ui
|
|
211
|
-
:is([data-part
|
|
212
|
-
> [data-ui
|
|
210
|
+
[data-ui-breadcrumb]
|
|
211
|
+
:is([data-part-link], [data-part-page], [data-part-trigger])
|
|
212
|
+
> [data-ui-badge] {
|
|
213
213
|
margin-inline-start: var(--slotted-breadcrumb-content-gap, var(--slotted-space-3, 6px));
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
/* The switcher's chevron is its last element, after the label. */
|
|
217
|
-
[data-ui
|
|
217
|
+
[data-ui-breadcrumb] [data-part-trigger] > [data-ui-icon]:last-child {
|
|
218
218
|
margin-inline: var(--slotted-space-2, 4px) 0;
|
|
219
219
|
transition: rotate var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
/* The chevron turns while the menu it opened is up, and back when it closes. */
|
|
223
|
-
[data-ui
|
|
223
|
+
[data-ui-breadcrumb] [data-part-trigger][data-open] > [data-ui-icon]:last-child {
|
|
224
224
|
rotate: 180deg;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
|
-
* The page the reader is on. It takes the strongest text
|
|
228
|
+
* The page the reader is on. It takes the strongest text color and gains
|
|
229
229
|
* weight, so the end of the trail is legible without reading it — and the
|
|
230
230
|
* weight is on the one crumb that never moves, so nothing beside it shifts
|
|
231
231
|
* when the pointer arrives.
|
|
232
232
|
*/
|
|
233
|
-
[data-ui
|
|
233
|
+
[data-ui-breadcrumb] [data-part-page] {
|
|
234
234
|
color: var(--_strong);
|
|
235
235
|
font-weight: var(--slotted-breadcrumb-page-weight, var(--slotted-font-weight-medium, 500));
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
[data-ui
|
|
238
|
+
[data-ui-breadcrumb] :is([data-part-link], [data-part-trigger]):not([data-disabled]):hover {
|
|
239
239
|
color: var(--_hover);
|
|
240
240
|
text-decoration-color: currentColor;
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
-
/* An open switcher holds the pressed
|
|
244
|
-
[data-ui
|
|
245
|
-
:is([data-part
|
|
243
|
+
/* An open switcher holds the pressed color for as long as its menu is up. */
|
|
244
|
+
[data-ui-breadcrumb]
|
|
245
|
+
:is([data-part-link], [data-part-trigger]):not([data-disabled]):is(:active, [data-open]) {
|
|
246
246
|
color: var(--_strong);
|
|
247
247
|
/* Without the pointer over it an open switcher would read as the page:
|
|
248
|
-
same
|
|
248
|
+
same color, no mark. The underline says which crumb the menu is from. */
|
|
249
249
|
text-decoration-color: currentColor;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
/**
|
|
253
|
-
* The page's own switcher is already at the strongest
|
|
253
|
+
* The page's own switcher is already at the strongest color, so the pointer
|
|
254
254
|
* brings only the underline, and a press — or the menu it opened — steps the
|
|
255
255
|
* label back to the hover mix. Hover and press still differ, as on a link.
|
|
256
256
|
*/
|
|
257
|
-
[data-ui
|
|
257
|
+
[data-ui-breadcrumb] [data-part-trigger][aria-current='page']:not([data-disabled]):hover {
|
|
258
258
|
color: var(--_strong);
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
-
[data-ui
|
|
262
|
-
[data-part
|
|
261
|
+
[data-ui-breadcrumb]
|
|
262
|
+
[data-part-trigger][aria-current='page']:not([data-disabled]):is(:active, [data-open]) {
|
|
263
263
|
color: var(--_hover);
|
|
264
264
|
}
|
|
265
265
|
|
|
@@ -273,13 +273,13 @@
|
|
|
273
273
|
* box, so a ring drawn outside crossed both separators — at two pixels out,
|
|
274
274
|
* and on its own edge at dense.
|
|
275
275
|
*/
|
|
276
|
-
[data-ui
|
|
276
|
+
[data-ui-breadcrumb] :is([data-part-link], [data-part-trigger]):focus-visible {
|
|
277
277
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
278
278
|
outline-offset: var(--slotted-breadcrumb-focus-ring-offset, 1px);
|
|
279
279
|
text-decoration-color: currentColor;
|
|
280
280
|
}
|
|
281
281
|
|
|
282
|
-
[data-ui
|
|
282
|
+
[data-ui-breadcrumb] [data-part-ellipsis]:focus-visible {
|
|
283
283
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
284
284
|
outline-offset: var(
|
|
285
285
|
--slotted-breadcrumb-ellipsis-focus-ring-offset,
|
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
* with children shows the children and the empty one shows the rule.
|
|
301
301
|
*/
|
|
302
302
|
|
|
303
|
-
[data-ui
|
|
303
|
+
[data-ui-breadcrumb] [data-part-separator] {
|
|
304
304
|
align-items: center;
|
|
305
305
|
color: var(--_separator);
|
|
306
306
|
display: flex;
|
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
justify-content: center;
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
[data-ui
|
|
311
|
+
[data-ui-breadcrumb] [data-part-separator]:empty {
|
|
312
312
|
background-color: currentColor;
|
|
313
313
|
/* Rounded, so a rule of `0.9em` ends on a whole pixel: 12 at 13px, 11 dense. */
|
|
314
314
|
block-size: round(nearest, var(--slotted-breadcrumb-separator-length, 0.9em), 1px);
|
|
@@ -325,7 +325,7 @@
|
|
|
325
325
|
* trail itself runs the other way. `:dir()` rather than an ancestor `[dir]`,
|
|
326
326
|
* so a trail inside a left-to-right island leans the way that island reads.
|
|
327
327
|
*/
|
|
328
|
-
[data-ui
|
|
328
|
+
[data-ui-breadcrumb] [data-part-separator]:empty:dir(rtl) {
|
|
329
329
|
rotate: calc(-1 * var(--slotted-breadcrumb-separator-skew, 20deg));
|
|
330
330
|
}
|
|
331
331
|
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
*
|
|
334
334
|
* What the collapse hides, and the control that reveals it. It is an inner
|
|
335
335
|
* control, not a button (R2, BC1): one line of the trail tall, so it sits
|
|
336
|
-
* on the crumbs' own line and not on a taller box
|
|
336
|
+
* on the crumbs' own line and not on a taller box centerd over it; the
|
|
337
337
|
* control glyph plus a step of air wide, floored at the WCAG 2.2 minimum;
|
|
338
338
|
* and the rest of that minimum in the block axis is a transparent halo
|
|
339
339
|
* around the paint, so the target is whole without the box being tall.
|
|
@@ -353,13 +353,13 @@
|
|
|
353
353
|
*
|
|
354
354
|
* The box still keeps the trail's type, because `1lh` is the trail's line
|
|
355
355
|
* and that is the alignment BC1 asks for: the box is one line of the trail
|
|
356
|
-
* tall and the mark is
|
|
356
|
+
* tall and the mark is centerd in it.
|
|
357
357
|
*
|
|
358
358
|
* The button's accessible name says how many crumbs it hides, so what a
|
|
359
359
|
* reader hears is a count rather than three dots.
|
|
360
360
|
*/
|
|
361
361
|
|
|
362
|
-
[data-ui
|
|
362
|
+
[data-ui-breadcrumb] [data-part-ellipsis] {
|
|
363
363
|
--slotted-icon-size: var(--_icon-size);
|
|
364
364
|
|
|
365
365
|
align-items: center;
|
|
@@ -394,7 +394,7 @@
|
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
/* The halo that completes the target where the line is shorter than it. */
|
|
397
|
-
[data-ui
|
|
397
|
+
[data-ui-breadcrumb] [data-part-ellipsis]::after {
|
|
398
398
|
content: '';
|
|
399
399
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
400
400
|
position: absolute;
|
|
@@ -403,38 +403,38 @@
|
|
|
403
403
|
/* On a finger the halo reaches the comfortable size in both axes; the box
|
|
404
404
|
keeps the line's height, so the trail does not grow. */
|
|
405
405
|
@media (pointer: coarse) {
|
|
406
|
-
[data-ui
|
|
406
|
+
[data-ui-breadcrumb] [data-part-ellipsis]::after {
|
|
407
407
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
|
|
411
411
|
/* The ground moves under the pointer and nothing else does (R2). */
|
|
412
|
-
[data-ui
|
|
412
|
+
[data-ui-breadcrumb] [data-part-ellipsis]:not([data-disabled]):hover {
|
|
413
413
|
background-color: var(--slotted-breadcrumb-ellipsis-background-hover, var(--_ellipsis-hover));
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
-
[data-ui
|
|
416
|
+
[data-ui-breadcrumb] [data-part-ellipsis]:not([data-disabled]):active {
|
|
417
417
|
background-color: var(--slotted-breadcrumb-ellipsis-background-active, var(--_ellipsis-active));
|
|
418
418
|
}
|
|
419
419
|
|
|
420
|
-
/* ── Forced
|
|
420
|
+
/* ── Forced colors ─────────────────────────────────────────────────────
|
|
421
421
|
*
|
|
422
422
|
* The theme remaps every token it owns, so this block covers only what the
|
|
423
423
|
* family paints itself, which is one thing: the separator is a painted rule,
|
|
424
424
|
* and a painted surface is replaced by the page's own background when the
|
|
425
|
-
* system takes the palette over. It is restated against a system
|
|
425
|
+
* system takes the palette over. It is restated against a system color so
|
|
426
426
|
* the trail keeps its marks.
|
|
427
427
|
*
|
|
428
428
|
* The ellipsis mark is an `svg` stroked in `currentColor`, which is the
|
|
429
|
-
* button's own ink, and the system forces that ink to its text
|
|
429
|
+
* button's own ink, and the system forces that ink to its text color.
|
|
430
430
|
*/
|
|
431
431
|
|
|
432
432
|
@media (forced-colors: active) {
|
|
433
|
-
[data-ui
|
|
433
|
+
[data-ui-breadcrumb] [data-part-separator]:empty {
|
|
434
434
|
background-color: GrayText;
|
|
435
435
|
}
|
|
436
436
|
|
|
437
|
-
[data-ui
|
|
437
|
+
[data-ui-breadcrumb] [data-part-ellipsis] {
|
|
438
438
|
border: var(--slotted-border-width-thin, 1px) solid ButtonBorder;
|
|
439
439
|
}
|
|
440
440
|
}
|