@slotted/styles 0.1.0-beta.3 → 0.1.0-beta.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +13 -1
- package/src/accordion/accordion.css +11 -11
- package/src/action-bar/action-bar.css +47 -44
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +39 -39
- package/src/alert/alert.css +96 -96
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +455 -328
- package/src/app-shell/app-shell.tokens.json +5 -2
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +96 -66
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +54 -46
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +137 -89
- package/src/button/button.tokens.json +5 -0
- package/src/button-group/button-group.css +80 -79
- package/src/button-group/button-group.tokens.json +1 -0
- package/src/calendar/calendar.css +139 -109
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/card/card.css +68 -65
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +158 -157
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +288 -267
- package/src/chart/chart.tokens.json +4 -0
- package/src/checkbox/checkbox.css +143 -148
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +76 -80
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +203 -130
- package/src/combobox/combobox.tokens.json +3 -0
- package/src/command-palette/command-palette.css +155 -102
- package/src/command-palette/command-palette.tokens.json +2 -0
- package/src/container/container.css +27 -27
- package/src/context-menu/context-menu.css +9 -9
- package/src/currency-field/currency-field.css +119 -119
- package/src/currency-field/currency-field.tokens.json +1 -0
- package/src/dashboard-grid/dashboard-grid.css +185 -115
- package/src/data-grid/data-grid.css +598 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +82 -71
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +62 -57
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +117 -58
- package/src/date-picker/date-picker.tokens.json +5 -0
- package/src/date-range-picker/date-range-picker.css +157 -127
- package/src/date-range-picker/date-range-picker.tokens.json +4 -0
- package/src/datetime-field/datetime-field.css +90 -90
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +123 -70
- package/src/datetime-picker/datetime-picker.tokens.json +4 -1
- package/src/datetime-range-picker/datetime-range-picker.css +191 -163
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +4 -0
- package/src/description-list/description-list.css +105 -75
- package/src/description-list/description-list.tokens.json +1 -0
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +434 -198
- package/src/dialog/dialog.tokens.json +7 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +597 -236
- package/src/drawer/drawer.tokens.json +13 -0
- package/src/entity-picker/entity-picker.css +323 -270
- package/src/entity-picker/entity-picker.tokens.json +3 -0
- package/src/event-calendar/event-calendar.css +357 -399
- package/src/field/field.css +106 -93
- package/src/field/field.tokens.json +2 -0
- package/src/field-group/field-group.css +43 -33
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +200 -216
- package/src/form/form.css +99 -25
- package/src/form/form.tokens.json +5 -0
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +29 -29
- package/src/highlight/highlight.css +11 -11
- package/src/hover-card/hover-card.css +9 -9
- package/src/icon/icon.css +67 -20
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +42 -42
- package/src/import-export-center/import-export-center.css +144 -165
- package/src/inline/inline.css +28 -28
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +62 -50
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +23 -23
- package/src/list-item/list-item.css +89 -75
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +71 -70
- package/src/listbox/listbox.tokens.json +0 -1
- package/src/loading-overlay/loading-overlay.css +86 -103
- package/src/markdown/markdown.css +20 -20
- package/src/media-viewer/media-viewer.css +790 -0
- package/src/media-viewer/media-viewer.tokens.json +53 -0
- package/src/menu/menu.css +162 -82
- package/src/menu/menu.tokens.json +2 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1250 -1253
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/multi-select/multi-select.css +230 -172
- package/src/multi-select/multi-select.tokens.json +2 -0
- package/src/navigation-menu/navigation-menu.css +169 -190
- package/src/notification-center/notification-center.css +153 -161
- package/src/notification-center/notification-center.tokens.json +3 -0
- package/src/number-field/number-field.css +93 -93
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +74 -64
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +41 -27
- package/src/page/page.tokens.json +1 -0
- package/src/page-header/page-header.css +341 -286
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +75 -79
- package/src/popover/popover.css +81 -64
- package/src/popover/popover.tokens.json +1 -0
- package/src/progress-indicator/progress-indicator.css +192 -136
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +260 -113
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +77 -82
- package/src/radio-group/radio-group.css +107 -112
- package/src/rating/rating.css +146 -142
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +94 -101
- package/src/runtime-properties.mjs +19 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +44 -37
- package/src/section/section.css +178 -43
- package/src/section/section.tokens.json +8 -2
- package/src/segmented-control/segmented-control.css +210 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +210 -147
- package/src/select/select.tokens.json +3 -0
- package/src/side-navigation/side-navigation.css +193 -196
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +57 -58
- package/src/slider/slider.css +101 -103
- package/src/sparkline/sparkline.css +75 -53
- package/src/sparkline/sparkline.tokens.json +2 -0
- package/src/spinner/spinner.css +83 -180
- package/src/spinner/spinner.tokens.json +0 -1
- package/src/split-button/split-button.css +34 -35
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +47 -48
- package/src/stack/stack.css +25 -25
- package/src/stat-card/stat-card.css +415 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +124 -100
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +100 -106
- package/src/table/table.css +270 -198
- package/src/table/table.tokens.json +2 -0
- package/src/table-of-contents/table-of-contents.css +60 -59
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +327 -294
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +109 -88
- package/src/tag/tag.tokens.json +10 -0
- package/src/tags-input/tags-input.css +152 -87
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +146 -148
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +38 -33
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +82 -77
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +116 -64
- package/src/time-picker/time-picker.tokens.json +4 -1
- package/src/time-range-picker/time-range-picker.css +168 -140
- package/src/time-range-picker/time-range-picker.tokens.json +4 -0
- package/src/timeline/timeline.css +280 -292
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +138 -121
- package/src/toast/toast.tokens.json +6 -0
- package/src/toggle/toggle.css +34 -38
- package/src/toggle-group/toggle-group.css +73 -77
- package/src/toolbar/toolbar.css +33 -38
- package/src/tooltip/tooltip.css +65 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +252 -268
- package/src/tour/tour.css +64 -73
- package/src/transfer/transfer.css +164 -168
- package/src/tree/tree.css +113 -121
- package/src/typography/typography.css +42 -38
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
package/src/alert/alert.css
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
* actions stacks and stretches when the box is narrow, and a page banner
|
|
21
21
|
* puts its actions back on the message's own line when the box is wide.
|
|
22
22
|
*/
|
|
23
|
-
[data-ui
|
|
23
|
+
[data-ui-alert][data-part-root] {
|
|
24
24
|
/**
|
|
25
25
|
* The tone's five roles, defaulted to `accent` so an alert with no stated
|
|
26
26
|
* tone is an informational one. Each tone below restates the same five;
|
|
27
27
|
* every one of them is a role the theme's contrast test measures, so the
|
|
28
|
-
* family never invents a
|
|
28
|
+
* family never invents a color and never mixes a ground the theme holds
|
|
29
29
|
* with a foreground it does not.
|
|
30
30
|
*/
|
|
31
31
|
--_solid: var(--slotted-tone-accent-solid);
|
|
@@ -46,18 +46,18 @@
|
|
|
46
46
|
* against the tone's fill, and on `outline` the ground is not the family's
|
|
47
47
|
* to know.
|
|
48
48
|
*
|
|
49
|
-
* A state layer answers all three: the control's own text
|
|
49
|
+
* A state layer answers all three: the control's own text color, at a low
|
|
50
50
|
* strength, over whatever ground it already has. `currentcolor` is legible
|
|
51
|
-
* on that ground by construction — it is the
|
|
51
|
+
* on that ground by construction — it is the color the words are read in —
|
|
52
52
|
* so a wash of it is always perceptible and never depends on a pair the
|
|
53
53
|
* theme does not measure. The cost is that a theme retunes it by strength
|
|
54
|
-
* rather than by
|
|
54
|
+
* rather than by color, which is what the two component tokens are for.
|
|
55
55
|
*
|
|
56
56
|
* Ten and sixteen per cent, not eight and fourteen: white at eight per cent
|
|
57
57
|
* over the `danger` fill moved OKLab lightness by 0.019 in the light and
|
|
58
58
|
* dark schemes, under the 0.02 a surface step has to reach. Ten moves it by
|
|
59
59
|
* 0.025 there and by at least 0.044 on every soft and outline ground
|
|
60
|
-
|
|
60
|
+
*.
|
|
61
61
|
*/
|
|
62
62
|
--_state-hover: color-mix(
|
|
63
63
|
in oklab,
|
|
@@ -75,8 +75,7 @@
|
|
|
75
75
|
* the theme restates per density, so an alert inside a dense table shrinks
|
|
76
76
|
* with the rows around it. The box's inset comes from the space scale,
|
|
77
77
|
* which does not vary by density — the cost `card` accepted for the same
|
|
78
|
-
* reason
|
|
79
|
-
* `docs/history/designs/2026-09-02-alert-family-design.md`: at `dense`
|
|
78
|
+
* reason: at `dense`
|
|
80
79
|
* the box keeps its inset while the type inside it shrinks.
|
|
81
80
|
*
|
|
82
81
|
* `--_font-size` is the *title's* size and the root's own, and the
|
|
@@ -85,7 +84,7 @@
|
|
|
85
84
|
* number saying how.
|
|
86
85
|
*
|
|
87
86
|
* The status mark is a filled disc a step above the title's `1em`, rounded
|
|
88
|
-
* to an even number of pixels so its
|
|
87
|
+
* to an even number of pixels so its center falls on a whole pixel: 16 at
|
|
89
88
|
* 13-pixel type, 14 at 12, 16 at 14. A filled mark carries more weight per
|
|
90
89
|
* pixel than an outline, so it stays within a few pixels of the capitals
|
|
91
90
|
* and still reads as the loudest thing on the line.
|
|
@@ -183,8 +182,8 @@
|
|
|
183
182
|
/**
|
|
184
183
|
* The line box is rounded to an even number of pixels. At 13-pixel type
|
|
185
184
|
* the scale's 1.5 gave 19.5, so a message of one line was 45.5 pixels
|
|
186
|
-
* tall and every control
|
|
187
|
-
* even line also
|
|
185
|
+
* tall and every control centerd on the line landed on a half pixel. An
|
|
186
|
+
* even line also centers the 24- and 26-pixel dismiss control and the
|
|
188
187
|
* 30-pixel actions on whole pixels: 20 at 13, 22 at 14, 18 at 12.
|
|
189
188
|
*/
|
|
190
189
|
line-height: round(nearest, calc(var(--_line-height) * 1em), 2px);
|
|
@@ -216,7 +215,7 @@
|
|
|
216
215
|
* holds its place until the fade is over rather than snapping out from
|
|
217
216
|
* under the content below.
|
|
218
217
|
*/
|
|
219
|
-
[data-ui
|
|
218
|
+
[data-ui-alert][data-part-root][hidden] {
|
|
220
219
|
display: none;
|
|
221
220
|
opacity: 0;
|
|
222
221
|
transition:
|
|
@@ -235,27 +234,27 @@
|
|
|
235
234
|
* marks the moment it does. It travels the path the exit takes, in reverse.
|
|
236
235
|
*/
|
|
237
236
|
@starting-style {
|
|
238
|
-
[data-ui
|
|
237
|
+
[data-ui-alert][data-part-root]:is([data-live='polite'], [data-live='assertive']) {
|
|
239
238
|
opacity: 0;
|
|
240
239
|
translate: 0 calc(-1 * var(--slotted-space-2, 0.25rem));
|
|
241
240
|
}
|
|
242
241
|
}
|
|
243
242
|
|
|
244
|
-
/* ── Tone: the
|
|
243
|
+
/* ── Tone: the color, and the mark that says the same thing ───────────
|
|
245
244
|
*
|
|
246
245
|
* Five tones and five marks, and the map is
|
|
247
246
|
* `specs/components/alert/contract.json` rather than a decision taken here:
|
|
248
247
|
* both bindings draw the glyph from it and the contract test reads it, and
|
|
249
|
-
* this sheet paints only the
|
|
248
|
+
* this sheet paints only the color. It is
|
|
250
249
|
* the map `status-indicator` declares, so a status light and an alert about
|
|
251
250
|
* the same thing draw the same silhouette.
|
|
252
251
|
*
|
|
253
|
-
* The mark is what satisfies WCAG 2.2 1.4.1. Under forced
|
|
254
|
-
* ground becomes one system
|
|
255
|
-
* circle, the
|
|
252
|
+
* The mark is what satisfies WCAG 2.2 1.4.1. Under forced colors every tone
|
|
253
|
+
* ground becomes one system color and the five boxes are identical; the
|
|
254
|
+
* circle, the diamond and the symbols cut out of them are what is left.
|
|
256
255
|
*/
|
|
257
256
|
|
|
258
|
-
[data-ui
|
|
257
|
+
[data-ui-alert][data-part-root][data-tone='accent'] {
|
|
259
258
|
--_solid: var(--slotted-tone-accent-solid);
|
|
260
259
|
--_on-solid: var(--slotted-tone-accent-on-solid);
|
|
261
260
|
--_surface: var(--slotted-tone-accent-surface);
|
|
@@ -263,7 +262,7 @@
|
|
|
263
262
|
--_text: var(--slotted-tone-accent-text);
|
|
264
263
|
}
|
|
265
264
|
|
|
266
|
-
[data-ui
|
|
265
|
+
[data-ui-alert][data-part-root][data-tone='secondary'] {
|
|
267
266
|
--_solid: var(--slotted-tone-secondary-solid);
|
|
268
267
|
--_on-solid: var(--slotted-tone-secondary-on-solid);
|
|
269
268
|
--_surface: var(--slotted-tone-secondary-surface);
|
|
@@ -271,7 +270,7 @@
|
|
|
271
270
|
--_text: var(--slotted-tone-secondary-text);
|
|
272
271
|
}
|
|
273
272
|
|
|
274
|
-
[data-ui
|
|
273
|
+
[data-ui-alert][data-part-root][data-tone='success'] {
|
|
275
274
|
--_solid: var(--slotted-tone-success-solid);
|
|
276
275
|
--_on-solid: var(--slotted-tone-success-on-solid);
|
|
277
276
|
--_surface: var(--slotted-tone-success-surface);
|
|
@@ -279,7 +278,15 @@
|
|
|
279
278
|
--_text: var(--slotted-tone-success-text);
|
|
280
279
|
}
|
|
281
280
|
|
|
282
|
-
[data-ui
|
|
281
|
+
[data-ui-alert][data-part-root][data-tone='info'] {
|
|
282
|
+
--_solid: var(--slotted-tone-info-solid);
|
|
283
|
+
--_on-solid: var(--slotted-tone-info-on-solid);
|
|
284
|
+
--_surface: var(--slotted-tone-info-surface);
|
|
285
|
+
--_border: var(--slotted-tone-info-border);
|
|
286
|
+
--_text: var(--slotted-tone-info-text);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
[data-ui-alert][data-part-root][data-tone='warning'] {
|
|
283
290
|
--_solid: var(--slotted-tone-warning-solid);
|
|
284
291
|
--_on-solid: var(--slotted-tone-warning-on-solid);
|
|
285
292
|
--_surface: var(--slotted-tone-warning-surface);
|
|
@@ -287,7 +294,7 @@
|
|
|
287
294
|
--_text: var(--slotted-tone-warning-text);
|
|
288
295
|
}
|
|
289
296
|
|
|
290
|
-
[data-ui
|
|
297
|
+
[data-ui-alert][data-part-root][data-tone='danger'] {
|
|
291
298
|
--_solid: var(--slotted-tone-danger-solid);
|
|
292
299
|
--_on-solid: var(--slotted-tone-danger-on-solid);
|
|
293
300
|
--_surface: var(--slotted-tone-danger-surface);
|
|
@@ -310,10 +317,10 @@
|
|
|
310
317
|
* The default, and the shape seven of the ten surveyed implementations draw.
|
|
311
318
|
* It carries the tone's border as well as its surface: in `high-contrast`
|
|
312
319
|
* the tone surfaces are the page's own white, so a soft alert with no edge
|
|
313
|
-
* is a run of
|
|
320
|
+
* is a run of colored text with no box around it — the finding `kbd`
|
|
314
321
|
* recorded about its own soft variant.
|
|
315
322
|
*/
|
|
316
|
-
[data-ui
|
|
323
|
+
[data-ui-alert][data-part-root][data-variant='soft'] {
|
|
317
324
|
background-color: var(--_surface);
|
|
318
325
|
border-color: var(--_border);
|
|
319
326
|
}
|
|
@@ -325,14 +332,14 @@
|
|
|
325
332
|
* a second rectangle around the message.
|
|
326
333
|
*
|
|
327
334
|
* It is not the variant for an unknown ground, and the harness fragment shows
|
|
328
|
-
* why: read on `--slotted-surface-inverse`, the tone's text is a
|
|
335
|
+
* why: read on `--slotted-surface-inverse`, the tone's text is a color the
|
|
329
336
|
* theme never measured against that ground and the words go quiet. A dark
|
|
330
337
|
* region is a scheme rather than a surface — an application states
|
|
331
338
|
* `data-slotted-scheme` on it, every tone role is restated, and `outline`
|
|
332
339
|
* reads again. `soft` and `solid` survive the inverted surface only because
|
|
333
340
|
* they repaint the ground before they write on it.
|
|
334
341
|
*/
|
|
335
|
-
[data-ui
|
|
342
|
+
[data-ui-alert][data-part-root][data-variant='outline'] {
|
|
336
343
|
background-color: transparent;
|
|
337
344
|
border-color: var(--_border);
|
|
338
345
|
}
|
|
@@ -343,7 +350,7 @@
|
|
|
343
350
|
* `solid-active` in every scheme, so the whole box — words, mark and dismiss
|
|
344
351
|
* control — takes it.
|
|
345
352
|
*/
|
|
346
|
-
[data-ui
|
|
353
|
+
[data-ui-alert][data-part-root][data-variant='solid'] {
|
|
347
354
|
background-color: var(--_solid);
|
|
348
355
|
border-color: var(--_solid);
|
|
349
356
|
color: var(--_on-solid);
|
|
@@ -357,7 +364,7 @@
|
|
|
357
364
|
*/
|
|
358
365
|
|
|
359
366
|
/** Beside the thing it is about — a field group, a table row, a card. */
|
|
360
|
-
[data-ui
|
|
367
|
+
[data-ui-alert][data-part-root][data-reach='inline'] {
|
|
361
368
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
362
369
|
--_description-font-size: var(--slotted-control-font-size-sm, 12px);
|
|
363
370
|
--_glyph-size: var(--slotted-control-icon-size-sm, 14px);
|
|
@@ -377,7 +384,7 @@
|
|
|
377
384
|
* The title steps up while the description stays where it was, which is the
|
|
378
385
|
* one place in the family where the two type sizes differ.
|
|
379
386
|
*/
|
|
380
|
-
[data-ui
|
|
387
|
+
[data-ui-alert][data-part-root][data-reach='page'] {
|
|
381
388
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
382
389
|
--_glyph-size: var(--slotted-control-icon-size-lg, 18px);
|
|
383
390
|
--_inner-size: var(--slotted-control-inner-size-lg, 28px);
|
|
@@ -396,25 +403,23 @@
|
|
|
396
403
|
}
|
|
397
404
|
|
|
398
405
|
/** A solid page banner has no edge to lose, so it keeps all four. */
|
|
399
|
-
[data-ui
|
|
406
|
+
[data-ui-alert][data-part-root][data-reach='page'][data-variant='solid'] {
|
|
400
407
|
border-block-start-width: var(--_border-width);
|
|
401
408
|
border-inline-width: var(--_border-width);
|
|
402
409
|
}
|
|
403
410
|
|
|
404
411
|
/* ── The mark ─────────────────────────────────────────────────────────
|
|
405
412
|
*
|
|
406
|
-
* A filled
|
|
407
|
-
* of it: the binding's `Glyph`
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
*
|
|
411
|
-
* the symbol inside is what tells the five apart when
|
|
412
|
-
* triangle was the one mark whose visual
|
|
413
|
-
* and it did not sit on the line the way the
|
|
413
|
+
* A filled silhouette on the title's first line, with the tone's symbol cut
|
|
414
|
+
* out of it: the binding's `Glyph` drawing a hand-drawn status mark, the
|
|
415
|
+
* symbol cut out of the fill with an SVG mask, so the ground shows through
|
|
416
|
+
* the symbol on every variant. Every silhouette — the circle, the warning's
|
|
417
|
+
* diamond — is symmetric on both axes, so every mark has the same center;
|
|
418
|
+
* the symbol inside is what tells the five apart when color is gone. A
|
|
419
|
+
* triangle was the one mark whose visual center is not its box's center,
|
|
420
|
+
* and it did not sit on the line the way the circles did.
|
|
414
421
|
*
|
|
415
|
-
* The
|
|
416
|
-
* is 12/11 of the mark and the disc is the mark's own size; the box
|
|
417
|
-
* overhangs the slot by half a unit on each side, centred.
|
|
422
|
+
* The silhouette fills its box edge to edge, so the box is the mark.
|
|
418
423
|
*
|
|
419
424
|
* The disc is painted in `currentcolor`: the tone's text role on `soft` and
|
|
420
425
|
* `outline`, which the theme measures against those grounds, and `on-solid`
|
|
@@ -423,7 +428,7 @@
|
|
|
423
428
|
* The mark hangs from the first line's baseline, not from the top of the
|
|
424
429
|
* row. Grid baseline alignment puts the mark's bottom edge on the words'
|
|
425
430
|
* baseline, and a relative offset lowers it by half of what the mark exceeds
|
|
426
|
-
* the capitals by, so its
|
|
431
|
+
* the capitals by, so its center is the center of the capitals in whatever
|
|
427
432
|
* face the title is set in. A margin cannot do this: a box with no baseline
|
|
428
433
|
* of its own is aligned by its border edge, so a margin moves nothing. The
|
|
429
434
|
* offset is rounded to a whole pixel, and the mark is a whole number of
|
|
@@ -435,10 +440,10 @@
|
|
|
435
440
|
* baseline out of the box's, so the box is aligned by its border edge.
|
|
436
441
|
*
|
|
437
442
|
* A mark the page supplies instead of the tone's takes the same box and its
|
|
438
|
-
* place on the first line,
|
|
443
|
+
* place on the first line, centerd in it.
|
|
439
444
|
*/
|
|
440
|
-
[data-ui
|
|
441
|
-
--slotted-icon-size:
|
|
445
|
+
[data-ui-alert] > [data-part-icon] {
|
|
446
|
+
--slotted-icon-size: var(--_mark-size);
|
|
442
447
|
|
|
443
448
|
align-items: center;
|
|
444
449
|
align-self: baseline;
|
|
@@ -464,7 +469,7 @@
|
|
|
464
469
|
* to be clamped too, or an unbreakable word in the title sizes the track to
|
|
465
470
|
* itself and the words run past the box that holds them.
|
|
466
471
|
*/
|
|
467
|
-
[data-ui
|
|
472
|
+
[data-ui-alert] > [data-part-content] {
|
|
468
473
|
/* The other half of the mark's baseline group: see the mark above. */
|
|
469
474
|
align-self: baseline;
|
|
470
475
|
display: grid;
|
|
@@ -490,7 +495,7 @@
|
|
|
490
495
|
* in a column narrower than the word, which at this type size is a column
|
|
491
496
|
* too narrow for the message anyway.
|
|
492
497
|
*/
|
|
493
|
-
[data-ui
|
|
498
|
+
[data-ui-alert] [data-part-title] {
|
|
494
499
|
/* A title rendered as a heading keeps the root's type rather than the
|
|
495
500
|
user agent's `1.17em`: the mark is `1em` of the root, and a 15-pixel
|
|
496
501
|
title beside a 13-pixel mark put the mark a pixel above its capitals. */
|
|
@@ -509,7 +514,7 @@
|
|
|
509
514
|
overflow-wrap: anywhere;
|
|
510
515
|
}
|
|
511
516
|
|
|
512
|
-
[data-ui
|
|
517
|
+
[data-ui-alert] [data-part-description] {
|
|
513
518
|
font-size: var(--_description-font-size);
|
|
514
519
|
/* Its own line, rounded against its own size: a page banner's description
|
|
515
520
|
is set a step below its title, and inheriting the title's 22 pixels
|
|
@@ -528,7 +533,7 @@
|
|
|
528
533
|
* they are outside the live region: a reader hearing the message is not read
|
|
529
534
|
* the labels of two buttons in the middle of it.
|
|
530
535
|
*/
|
|
531
|
-
[data-ui
|
|
536
|
+
[data-ui-alert] > [data-part-actions] {
|
|
532
537
|
align-items: center;
|
|
533
538
|
display: flex;
|
|
534
539
|
flex-wrap: wrap;
|
|
@@ -545,7 +550,7 @@
|
|
|
545
550
|
*
|
|
546
551
|
* The negative margins are optical rather than decorative. The button's box
|
|
547
552
|
* is taller than the line it sits beside, so aligning the two boxes puts the
|
|
548
|
-
* glyph below the title's
|
|
553
|
+
* glyph below the title's center; pulling the box up by half the difference
|
|
549
554
|
* puts the glyph on the title's own line. The same distance is taken off the
|
|
550
555
|
* inline end, so the glyph — rather than the invisible hit area around it —
|
|
551
556
|
* sits at the inset the rest of the box uses.
|
|
@@ -557,7 +562,7 @@
|
|
|
557
562
|
* under it than over it. With both margins the control's margin box is
|
|
558
563
|
* exactly one line, and the inset above the message equals the inset below.
|
|
559
564
|
*/
|
|
560
|
-
[data-ui
|
|
565
|
+
[data-ui-alert] > [data-part-dismiss] {
|
|
561
566
|
/* The cross is the binding's `Glyph` in an `icon` box at the glyph size
|
|
562
567
|
the formula for this box reads. */
|
|
563
568
|
--slotted-icon-size: var(--_glyph-size);
|
|
@@ -597,28 +602,28 @@
|
|
|
597
602
|
* the reason it exists: a control the browser has already refused must not
|
|
598
603
|
* answer a pointer.
|
|
599
604
|
*/
|
|
600
|
-
[data-ui
|
|
605
|
+
[data-ui-alert] > [data-part-dismiss]:enabled:hover {
|
|
601
606
|
background-color: var(--_state-hover);
|
|
602
607
|
}
|
|
603
608
|
|
|
604
|
-
[data-ui
|
|
609
|
+
[data-ui-alert] > [data-part-dismiss]:enabled:active {
|
|
605
610
|
background-color: var(--_state-active);
|
|
606
611
|
}
|
|
607
612
|
|
|
608
|
-
[data-ui
|
|
613
|
+
[data-ui-alert] > [data-part-dismiss]:disabled {
|
|
609
614
|
color: var(--slotted-disabled-foreground);
|
|
610
615
|
cursor: default;
|
|
611
616
|
}
|
|
612
617
|
|
|
613
618
|
/* On a finger the target is the comfortable size in both axes and the box
|
|
614
|
-
is the one a mouse sees: a transparent box
|
|
619
|
+
is the one a mouse sees: a transparent box centerd on the control reaches
|
|
615
620
|
44 pixels, and the ground and the ring stay square. */
|
|
616
621
|
@media (pointer: coarse) {
|
|
617
|
-
[data-ui
|
|
622
|
+
[data-ui-alert] > [data-part-dismiss] {
|
|
618
623
|
position: relative;
|
|
619
624
|
}
|
|
620
625
|
|
|
621
|
-
[data-ui
|
|
626
|
+
[data-ui-alert] > [data-part-dismiss]::after {
|
|
622
627
|
content: '';
|
|
623
628
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
624
629
|
position: absolute;
|
|
@@ -635,7 +640,7 @@
|
|
|
635
640
|
* keyboard focus — but a page that deliberately sends focus to a message
|
|
636
641
|
* must not send it somewhere invisible.
|
|
637
642
|
*/
|
|
638
|
-
[data-ui
|
|
643
|
+
[data-ui-alert] > [data-part-dismiss]:focus-visible {
|
|
639
644
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
640
645
|
outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
|
|
641
646
|
}
|
|
@@ -645,15 +650,15 @@
|
|
|
645
650
|
* against `--slotted-tone-accent-solid` in the light scheme, 1.03 against
|
|
646
651
|
* `success` and 1.07 against `danger`. The ring the theme calibrated against
|
|
647
652
|
* the page's surface disappears on the tone's own fill. The ring keeps the
|
|
648
|
-
* theme's
|
|
653
|
+
* theme's color in every scheme (R3); what a solid alert adds is a halo one
|
|
649
654
|
* ring-width wide just inside it, in the ink its own words are written in,
|
|
650
655
|
* so the ring is read against that halo rather than against the fill.
|
|
651
656
|
*/
|
|
652
|
-
[data-ui
|
|
657
|
+
[data-ui-alert][data-variant='solid'] > [data-part-dismiss]:focus-visible {
|
|
653
658
|
box-shadow: inset 0 0 0 calc(2 * var(--slotted-focus-ring-width, 2px)) var(--_on-solid);
|
|
654
659
|
}
|
|
655
660
|
|
|
656
|
-
[data-ui
|
|
661
|
+
[data-ui-alert][data-part-root]:focus-visible {
|
|
657
662
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
658
663
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
659
664
|
}
|
|
@@ -673,7 +678,7 @@
|
|
|
673
678
|
* exists to check.
|
|
674
679
|
*/
|
|
675
680
|
@container slotted-alert (max-width: 22rem) {
|
|
676
|
-
[data-ui
|
|
681
|
+
[data-ui-alert] > [data-part-actions] {
|
|
677
682
|
/**
|
|
678
683
|
* Stacked, and each control still its own width. Stretching them is what
|
|
679
684
|
* the mobile banners in the field do, and it takes a decision that is not
|
|
@@ -686,62 +691,57 @@
|
|
|
686
691
|
}
|
|
687
692
|
|
|
688
693
|
/**
|
|
689
|
-
*
|
|
690
|
-
* and stacking that action under it wastes the whole width the
|
|
691
|
-
* past this point the
|
|
692
|
-
* control moves out to a column of its own.
|
|
693
|
-
*
|
|
694
|
-
*
|
|
694
|
+
* Actions at the end. A system message is usually one line with one action,
|
|
695
|
+
* and stacking that action under it wastes the whole width the box took;
|
|
696
|
+
* past this point the actions rejoin the message's own line and the dismiss
|
|
697
|
+
* control moves out to a column of its own. A `page` banner does it unless
|
|
698
|
+
* `actionsPlacement` says `below`; any other reach only when it says `end`:
|
|
699
|
+
* an alert beside a field group is narrow because the thing it is about is
|
|
700
|
+
* narrow, however wide the window is. Under 40rem the actions go back under
|
|
701
|
+
* the words.
|
|
695
702
|
*/
|
|
696
703
|
@container slotted-alert (min-width: 40rem) {
|
|
697
|
-
|
|
698
|
-
|
|
704
|
+
/* In the mark's and the words' baseline group: the labels of the actions
|
|
705
|
+
stand on the first line of the message, and a one-line message is
|
|
706
|
+
centerd on the controls beside it. */
|
|
707
|
+
[data-ui-alert][data-actions-placement='end'] > [data-part-actions] {
|
|
708
|
+
align-self: baseline;
|
|
699
709
|
grid-column: 3;
|
|
700
710
|
grid-row: 1;
|
|
701
711
|
margin-inline-start: var(--_column-gap);
|
|
702
712
|
}
|
|
703
713
|
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
* a control that is centred on the whole box, two marks at two heights read
|
|
708
|
-
* as an alignment mistake.
|
|
709
|
-
*
|
|
710
|
-
* Both block margins go, not only the top one: centring aligns the margin
|
|
711
|
-
* box, and the negative bottom margin left behind pulled the control's
|
|
712
|
-
* centre below the action's by half its overhang.
|
|
713
|
-
*/
|
|
714
|
-
[data-ui='alert'][data-reach='page'] > [data-part='dismiss'] {
|
|
715
|
-
align-self: center;
|
|
714
|
+
/* The dismiss control keeps its place on the first line, beside the
|
|
715
|
+
actions that now stand on the same line. */
|
|
716
|
+
[data-ui-alert][data-actions-placement='end'] > [data-part-dismiss] {
|
|
716
717
|
grid-column: 4;
|
|
717
|
-
margin-block: 0;
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
720
|
|
|
721
|
-
/* ── Forced
|
|
721
|
+
/* ── Forced colors ───────────────────────────────────────────────────
|
|
722
722
|
*
|
|
723
|
-
* The operating system replaces every author
|
|
723
|
+
* The operating system replaces every author color, so all five tones
|
|
724
724
|
* become one box and all three variants become one painting. What is left to
|
|
725
725
|
* decide is whether the box still has an edge, and the theme cannot answer
|
|
726
726
|
* it: `solid` draws its border in its own fill, and a transparent border is
|
|
727
|
-
* not a
|
|
727
|
+
* not a color the system remaps.
|
|
728
728
|
*
|
|
729
729
|
* The mark needs no rule: its glyph fills with `currentcolor`, which the
|
|
730
730
|
* system has already forced, and it keeps its silhouette, which is the whole
|
|
731
|
-
* reason a glyph is drawn per tone — a
|
|
732
|
-
*
|
|
731
|
+
* reason a glyph is drawn per tone — a diamond and a circle are still
|
|
732
|
+
* different from each other when neither of them is colored.
|
|
733
733
|
*/
|
|
734
734
|
@media (forced-colors: active) {
|
|
735
735
|
/**
|
|
736
736
|
* Stated per variant, because each variant's own rule outranks a rule on
|
|
737
737
|
* the root alone. The theme maps the accent fill to `Highlight` and its ink
|
|
738
|
-
* to `HighlightText`, and a system
|
|
738
|
+
* to `HighlightText`, and a system color is one the browser keeps: the
|
|
739
739
|
* solid box stayed `Highlight` while the backplate the browser draws
|
|
740
740
|
* behind text stayed `Canvas`, and the words were white on white. The
|
|
741
|
-
* danger fill, not a system
|
|
741
|
+
* danger fill, not a system color, was forced to `Canvas` and took its
|
|
742
742
|
* edge with it.
|
|
743
743
|
*/
|
|
744
|
-
[data-ui
|
|
744
|
+
[data-ui-alert][data-part-root][data-variant] {
|
|
745
745
|
background-color: Canvas;
|
|
746
746
|
border-color: CanvasText;
|
|
747
747
|
color: CanvasText;
|
|
@@ -749,14 +749,14 @@
|
|
|
749
749
|
|
|
750
750
|
/**
|
|
751
751
|
* The control's glyph is stroked in `currentcolor`, so giving the control a
|
|
752
|
-
* system
|
|
752
|
+
* system color repaints the mark with it.
|
|
753
753
|
*/
|
|
754
|
-
[data-ui
|
|
754
|
+
[data-ui-alert] > [data-part-dismiss] {
|
|
755
755
|
color: CanvasText;
|
|
756
756
|
}
|
|
757
757
|
|
|
758
|
-
[data-ui
|
|
759
|
-
[data-ui
|
|
758
|
+
[data-ui-alert] > [data-part-dismiss]:enabled:hover,
|
|
759
|
+
[data-ui-alert] > [data-part-dismiss]:enabled:active {
|
|
760
760
|
background-color: Highlight;
|
|
761
761
|
color: HighlightText;
|
|
762
762
|
}
|
|
@@ -59,6 +59,11 @@
|
|
|
59
59
|
"--slotted-tone-danger-solid",
|
|
60
60
|
"--slotted-tone-danger-surface",
|
|
61
61
|
"--slotted-tone-danger-text",
|
|
62
|
+
"--slotted-tone-info-border",
|
|
63
|
+
"--slotted-tone-info-on-solid",
|
|
64
|
+
"--slotted-tone-info-solid",
|
|
65
|
+
"--slotted-tone-info-surface",
|
|
66
|
+
"--slotted-tone-info-text",
|
|
62
67
|
"--slotted-tone-secondary-border",
|
|
63
68
|
"--slotted-tone-secondary-on-solid",
|
|
64
69
|
"--slotted-tone-secondary-solid",
|