@slotted/styles 0.1.0-beta.2 → 0.1.0-beta.21
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 +45 -42
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +36 -36
- package/src/alert/alert.css +68 -67
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +452 -314
- package/src/app-shell/app-shell.tokens.json +5 -2
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +91 -99
- package/src/avatar/avatar.css +71 -41
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +21 -22
- package/src/badge/badge.css +45 -37
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +37 -37
- package/src/button/button.css +149 -68
- package/src/button/button.tokens.json +10 -0
- package/src/button-group/button-group.css +79 -74
- package/src/button-group/button-group.tokens.json +2 -0
- package/src/calendar/calendar.css +133 -103
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/card/card.css +54 -61
- package/src/carousel/carousel.css +150 -161
- package/src/cascader/cascader.css +154 -153
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +258 -248
- package/src/chart/chart.tokens.json +1 -0
- 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 +72 -76
- package/src/color-picker/color-picker.css +83 -91
- package/src/column-manager/column-manager.css +106 -114
- package/src/combobox/combobox.css +157 -124
- package/src/combobox/combobox.tokens.json +2 -0
- package/src/command-palette/command-palette.css +103 -90
- package/src/command-palette/command-palette.tokens.json +1 -0
- package/src/container/container.css +24 -24
- package/src/context-menu/context-menu.css +8 -8
- package/src/currency-field/currency-field.css +212 -88
- package/src/currency-field/currency-field.tokens.json +13 -0
- package/src/dashboard-grid/dashboard-grid.css +184 -114
- package/src/data-grid/data-grid.css +535 -470
- package/src/data-grid/data-grid.tokens.json +4 -0
- package/src/data-list/data-list.css +81 -70
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +57 -52
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +75 -57
- package/src/date-picker/date-picker.tokens.json +1 -0
- package/src/date-range-picker/date-range-picker.css +116 -118
- package/src/datetime-field/datetime-field.css +80 -80
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +63 -63
- package/src/datetime-range-picker/datetime-range-picker.css +151 -156
- package/src/description-list/description-list.css +80 -65
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +376 -153
- package/src/dialog/dialog.tokens.json +6 -0
- package/src/divider/divider.css +18 -18
- package/src/drawer/drawer.css +513 -217
- package/src/drawer/drawer.tokens.json +6 -0
- package/src/entity-picker/entity-picker.css +273 -256
- package/src/entity-picker/entity-picker.tokens.json +2 -0
- 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 +34 -24
- package/src/form/form.tokens.json +1 -0
- 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 +62 -15
- package/src/icon/icon.tokens.json +1 -0
- 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 +153 -77
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +48 -36
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/link/link.css +36 -15
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +44 -17
- package/src/list/list.tokens.json +4 -0
- package/src/list-item/list-item.css +80 -66
- package/src/list-item/list-item.tokens.json +7 -0
- 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 +117 -74
- package/src/menu/menu.tokens.json +1 -0
- package/src/menubar/menubar.css +13 -13
- package/src/message/message.css +192 -202
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +41 -42
- package/src/multi-select/multi-select.css +177 -160
- package/src/multi-select/multi-select.tokens.json +1 -0
- package/src/navigation-menu/navigation-menu.css +167 -188
- package/src/notification-center/notification-center.css +140 -148
- package/src/notification-center/notification-center.tokens.json +3 -0
- package/src/number-field/number-field.css +83 -83
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +67 -57
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +39 -23
- package/src/page/page.tokens.json +1 -0
- package/src/page-header/page-header.css +339 -284
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +68 -72
- package/src/popover/popover.css +73 -61
- package/src/popover/popover.tokens.json +1 -0
- package/src/progress-indicator/progress-indicator.css +169 -113
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +251 -104
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +71 -75
- package/src/radio-group/radio-group.css +98 -103
- package/src/rating/rating.css +136 -132
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +74 -77
- package/src/runtime-properties.mjs +2 -0
- package/src/saved-views/saved-views.css +41 -47
- package/src/scroll-area/scroll-area.css +39 -32
- package/src/section/section.css +178 -43
- package/src/section/section.tokens.json +8 -2
- package/src/segmented-control/segmented-control.css +254 -97
- package/src/segmented-control/segmented-control.tokens.json +15 -11
- package/src/select/select.css +153 -132
- package/src/select/select.tokens.json +2 -0
- package/src/side-navigation/side-navigation.css +179 -182
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +47 -48
- package/src/slider/slider.css +86 -88
- package/src/sparkline/sparkline.css +62 -40
- 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 +30 -31
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +35 -35
- package/src/stack/stack.css +24 -24
- package/src/stat-card/stat-card.css +380 -241
- package/src/stat-card/stat-card.tokens.json +5 -0
- package/src/status-indicator/status-indicator.css +107 -82
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +58 -62
- package/src/switch/switch.css +86 -92
- package/src/table/table.css +340 -175
- package/src/table/table.tokens.json +6 -0
- package/src/table-of-contents/table-of-contents.css +57 -56
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +322 -289
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +91 -71
- package/src/tag/tag.tokens.json +9 -0
- package/src/tags-input/tags-input.css +147 -82
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +134 -136
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +33 -28
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +74 -69
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +58 -58
- package/src/time-range-picker/time-range-picker.css +128 -133
- package/src/timeline/timeline.css +254 -266
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +115 -98
- package/src/toast/toast.tokens.json +6 -0
- package/src/toggle/toggle.css +62 -25
- package/src/toggle/toggle.tokens.json +8 -0
- package/src/toggle-group/toggle-group.css +106 -60
- package/src/toggle-group/toggle-group.tokens.json +10 -0
- package/src/toolbar/toolbar.css +30 -35
- package/src/tooltip/tooltip.css +59 -38
- package/src/tooltip/tooltip.tokens.json +1 -0
- 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 +40 -36
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +224 -224
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +185 -197
package/src/alert/alert.css
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
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;
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
* holds its place until the fade is over rather than snapping out from
|
|
217
217
|
* under the content below.
|
|
218
218
|
*/
|
|
219
|
-
[data-ui
|
|
219
|
+
[data-ui-alert][data-part-root][hidden] {
|
|
220
220
|
display: none;
|
|
221
221
|
opacity: 0;
|
|
222
222
|
transition:
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
* marks the moment it does. It travels the path the exit takes, in reverse.
|
|
236
236
|
*/
|
|
237
237
|
@starting-style {
|
|
238
|
-
[data-ui
|
|
238
|
+
[data-ui-alert][data-part-root]:is([data-live='polite'], [data-live='assertive']) {
|
|
239
239
|
opacity: 0;
|
|
240
240
|
translate: 0 calc(-1 * var(--slotted-space-2, 0.25rem));
|
|
241
241
|
}
|
|
@@ -252,10 +252,10 @@
|
|
|
252
252
|
*
|
|
253
253
|
* The mark is what satisfies WCAG 2.2 1.4.1. Under forced colours every tone
|
|
254
254
|
* ground becomes one system colour and the five boxes are identical; the
|
|
255
|
-
* circle, the
|
|
255
|
+
* circle, the diamond and the symbols cut out of them are what is left.
|
|
256
256
|
*/
|
|
257
257
|
|
|
258
|
-
[data-ui
|
|
258
|
+
[data-ui-alert][data-part-root][data-tone='accent'] {
|
|
259
259
|
--_solid: var(--slotted-tone-accent-solid);
|
|
260
260
|
--_on-solid: var(--slotted-tone-accent-on-solid);
|
|
261
261
|
--_surface: var(--slotted-tone-accent-surface);
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
--_text: var(--slotted-tone-accent-text);
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
[data-ui
|
|
266
|
+
[data-ui-alert][data-part-root][data-tone='secondary'] {
|
|
267
267
|
--_solid: var(--slotted-tone-secondary-solid);
|
|
268
268
|
--_on-solid: var(--slotted-tone-secondary-on-solid);
|
|
269
269
|
--_surface: var(--slotted-tone-secondary-surface);
|
|
@@ -271,7 +271,7 @@
|
|
|
271
271
|
--_text: var(--slotted-tone-secondary-text);
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
[data-ui
|
|
274
|
+
[data-ui-alert][data-part-root][data-tone='success'] {
|
|
275
275
|
--_solid: var(--slotted-tone-success-solid);
|
|
276
276
|
--_on-solid: var(--slotted-tone-success-on-solid);
|
|
277
277
|
--_surface: var(--slotted-tone-success-surface);
|
|
@@ -279,7 +279,15 @@
|
|
|
279
279
|
--_text: var(--slotted-tone-success-text);
|
|
280
280
|
}
|
|
281
281
|
|
|
282
|
-
[data-ui
|
|
282
|
+
[data-ui-alert][data-part-root][data-tone='info'] {
|
|
283
|
+
--_solid: var(--slotted-tone-info-solid);
|
|
284
|
+
--_on-solid: var(--slotted-tone-info-on-solid);
|
|
285
|
+
--_surface: var(--slotted-tone-info-surface);
|
|
286
|
+
--_border: var(--slotted-tone-info-border);
|
|
287
|
+
--_text: var(--slotted-tone-info-text);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
[data-ui-alert][data-part-root][data-tone='warning'] {
|
|
283
291
|
--_solid: var(--slotted-tone-warning-solid);
|
|
284
292
|
--_on-solid: var(--slotted-tone-warning-on-solid);
|
|
285
293
|
--_surface: var(--slotted-tone-warning-surface);
|
|
@@ -287,7 +295,7 @@
|
|
|
287
295
|
--_text: var(--slotted-tone-warning-text);
|
|
288
296
|
}
|
|
289
297
|
|
|
290
|
-
[data-ui
|
|
298
|
+
[data-ui-alert][data-part-root][data-tone='danger'] {
|
|
291
299
|
--_solid: var(--slotted-tone-danger-solid);
|
|
292
300
|
--_on-solid: var(--slotted-tone-danger-on-solid);
|
|
293
301
|
--_surface: var(--slotted-tone-danger-surface);
|
|
@@ -313,7 +321,7 @@
|
|
|
313
321
|
* is a run of coloured text with no box around it — the finding `kbd`
|
|
314
322
|
* recorded about its own soft variant.
|
|
315
323
|
*/
|
|
316
|
-
[data-ui
|
|
324
|
+
[data-ui-alert][data-part-root][data-variant='soft'] {
|
|
317
325
|
background-color: var(--_surface);
|
|
318
326
|
border-color: var(--_border);
|
|
319
327
|
}
|
|
@@ -332,7 +340,7 @@
|
|
|
332
340
|
* reads again. `soft` and `solid` survive the inverted surface only because
|
|
333
341
|
* they repaint the ground before they write on it.
|
|
334
342
|
*/
|
|
335
|
-
[data-ui
|
|
343
|
+
[data-ui-alert][data-part-root][data-variant='outline'] {
|
|
336
344
|
background-color: transparent;
|
|
337
345
|
border-color: var(--_border);
|
|
338
346
|
}
|
|
@@ -343,7 +351,7 @@
|
|
|
343
351
|
* `solid-active` in every scheme, so the whole box — words, mark and dismiss
|
|
344
352
|
* control — takes it.
|
|
345
353
|
*/
|
|
346
|
-
[data-ui
|
|
354
|
+
[data-ui-alert][data-part-root][data-variant='solid'] {
|
|
347
355
|
background-color: var(--_solid);
|
|
348
356
|
border-color: var(--_solid);
|
|
349
357
|
color: var(--_on-solid);
|
|
@@ -357,7 +365,7 @@
|
|
|
357
365
|
*/
|
|
358
366
|
|
|
359
367
|
/** Beside the thing it is about — a field group, a table row, a card. */
|
|
360
|
-
[data-ui
|
|
368
|
+
[data-ui-alert][data-part-root][data-reach='inline'] {
|
|
361
369
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
362
370
|
--_description-font-size: var(--slotted-control-font-size-sm, 12px);
|
|
363
371
|
--_glyph-size: var(--slotted-control-icon-size-sm, 14px);
|
|
@@ -377,7 +385,7 @@
|
|
|
377
385
|
* The title steps up while the description stays where it was, which is the
|
|
378
386
|
* one place in the family where the two type sizes differ.
|
|
379
387
|
*/
|
|
380
|
-
[data-ui
|
|
388
|
+
[data-ui-alert][data-part-root][data-reach='page'] {
|
|
381
389
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
382
390
|
--_glyph-size: var(--slotted-control-icon-size-lg, 18px);
|
|
383
391
|
--_inner-size: var(--slotted-control-inner-size-lg, 28px);
|
|
@@ -396,25 +404,23 @@
|
|
|
396
404
|
}
|
|
397
405
|
|
|
398
406
|
/** A solid page banner has no edge to lose, so it keeps all four. */
|
|
399
|
-
[data-ui
|
|
407
|
+
[data-ui-alert][data-part-root][data-reach='page'][data-variant='solid'] {
|
|
400
408
|
border-block-start-width: var(--_border-width);
|
|
401
409
|
border-inline-width: var(--_border-width);
|
|
402
410
|
}
|
|
403
411
|
|
|
404
412
|
/* ── The mark ─────────────────────────────────────────────────────────
|
|
405
413
|
*
|
|
406
|
-
* A filled
|
|
407
|
-
* of it: the binding's `Glyph`
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
*
|
|
414
|
+
* A filled silhouette on the title's first line, with the tone's symbol cut
|
|
415
|
+
* out of it: the binding's `Glyph` drawing a hand-drawn status mark, the
|
|
416
|
+
* symbol cut out of the fill with an SVG mask, so the ground shows through
|
|
417
|
+
* the symbol on every variant. Every silhouette — the circle, the warning's
|
|
418
|
+
* diamond — is symmetric on both axes, so every mark has the same centre;
|
|
411
419
|
* the symbol inside is what tells the five apart when colour is gone. A
|
|
412
420
|
* triangle was the one mark whose visual centre is not its box's centre,
|
|
413
|
-
* and it did not sit on the line the way the
|
|
421
|
+
* and it did not sit on the line the way the circles did.
|
|
414
422
|
*
|
|
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.
|
|
423
|
+
* The silhouette fills its box edge to edge, so the box is the mark.
|
|
418
424
|
*
|
|
419
425
|
* The disc is painted in `currentcolor`: the tone's text role on `soft` and
|
|
420
426
|
* `outline`, which the theme measures against those grounds, and `on-solid`
|
|
@@ -437,8 +443,8 @@
|
|
|
437
443
|
* A mark the page supplies instead of the tone's takes the same box and its
|
|
438
444
|
* place on the first line, centred in it.
|
|
439
445
|
*/
|
|
440
|
-
[data-ui
|
|
441
|
-
--slotted-icon-size:
|
|
446
|
+
[data-ui-alert] > [data-part-icon] {
|
|
447
|
+
--slotted-icon-size: var(--_mark-size);
|
|
442
448
|
|
|
443
449
|
align-items: center;
|
|
444
450
|
align-self: baseline;
|
|
@@ -464,7 +470,7 @@
|
|
|
464
470
|
* to be clamped too, or an unbreakable word in the title sizes the track to
|
|
465
471
|
* itself and the words run past the box that holds them.
|
|
466
472
|
*/
|
|
467
|
-
[data-ui
|
|
473
|
+
[data-ui-alert] > [data-part-content] {
|
|
468
474
|
/* The other half of the mark's baseline group: see the mark above. */
|
|
469
475
|
align-self: baseline;
|
|
470
476
|
display: grid;
|
|
@@ -490,7 +496,7 @@
|
|
|
490
496
|
* in a column narrower than the word, which at this type size is a column
|
|
491
497
|
* too narrow for the message anyway.
|
|
492
498
|
*/
|
|
493
|
-
[data-ui
|
|
499
|
+
[data-ui-alert] [data-part-title] {
|
|
494
500
|
/* A title rendered as a heading keeps the root's type rather than the
|
|
495
501
|
user agent's `1.17em`: the mark is `1em` of the root, and a 15-pixel
|
|
496
502
|
title beside a 13-pixel mark put the mark a pixel above its capitals. */
|
|
@@ -509,7 +515,7 @@
|
|
|
509
515
|
overflow-wrap: anywhere;
|
|
510
516
|
}
|
|
511
517
|
|
|
512
|
-
[data-ui
|
|
518
|
+
[data-ui-alert] [data-part-description] {
|
|
513
519
|
font-size: var(--_description-font-size);
|
|
514
520
|
/* Its own line, rounded against its own size: a page banner's description
|
|
515
521
|
is set a step below its title, and inheriting the title's 22 pixels
|
|
@@ -528,7 +534,7 @@
|
|
|
528
534
|
* they are outside the live region: a reader hearing the message is not read
|
|
529
535
|
* the labels of two buttons in the middle of it.
|
|
530
536
|
*/
|
|
531
|
-
[data-ui
|
|
537
|
+
[data-ui-alert] > [data-part-actions] {
|
|
532
538
|
align-items: center;
|
|
533
539
|
display: flex;
|
|
534
540
|
flex-wrap: wrap;
|
|
@@ -557,7 +563,7 @@
|
|
|
557
563
|
* under it than over it. With both margins the control's margin box is
|
|
558
564
|
* exactly one line, and the inset above the message equals the inset below.
|
|
559
565
|
*/
|
|
560
|
-
[data-ui
|
|
566
|
+
[data-ui-alert] > [data-part-dismiss] {
|
|
561
567
|
/* The cross is the binding's `Glyph` in an `icon` box at the glyph size
|
|
562
568
|
the formula for this box reads. */
|
|
563
569
|
--slotted-icon-size: var(--_glyph-size);
|
|
@@ -597,15 +603,15 @@
|
|
|
597
603
|
* the reason it exists: a control the browser has already refused must not
|
|
598
604
|
* answer a pointer.
|
|
599
605
|
*/
|
|
600
|
-
[data-ui
|
|
606
|
+
[data-ui-alert] > [data-part-dismiss]:enabled:hover {
|
|
601
607
|
background-color: var(--_state-hover);
|
|
602
608
|
}
|
|
603
609
|
|
|
604
|
-
[data-ui
|
|
610
|
+
[data-ui-alert] > [data-part-dismiss]:enabled:active {
|
|
605
611
|
background-color: var(--_state-active);
|
|
606
612
|
}
|
|
607
613
|
|
|
608
|
-
[data-ui
|
|
614
|
+
[data-ui-alert] > [data-part-dismiss]:disabled {
|
|
609
615
|
color: var(--slotted-disabled-foreground);
|
|
610
616
|
cursor: default;
|
|
611
617
|
}
|
|
@@ -614,11 +620,11 @@
|
|
|
614
620
|
is the one a mouse sees: a transparent box centred on the control reaches
|
|
615
621
|
44 pixels, and the ground and the ring stay square. */
|
|
616
622
|
@media (pointer: coarse) {
|
|
617
|
-
[data-ui
|
|
623
|
+
[data-ui-alert] > [data-part-dismiss] {
|
|
618
624
|
position: relative;
|
|
619
625
|
}
|
|
620
626
|
|
|
621
|
-
[data-ui
|
|
627
|
+
[data-ui-alert] > [data-part-dismiss]::after {
|
|
622
628
|
content: '';
|
|
623
629
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
624
630
|
position: absolute;
|
|
@@ -635,7 +641,7 @@
|
|
|
635
641
|
* keyboard focus — but a page that deliberately sends focus to a message
|
|
636
642
|
* must not send it somewhere invisible.
|
|
637
643
|
*/
|
|
638
|
-
[data-ui
|
|
644
|
+
[data-ui-alert] > [data-part-dismiss]:focus-visible {
|
|
639
645
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
640
646
|
outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
|
|
641
647
|
}
|
|
@@ -649,11 +655,11 @@
|
|
|
649
655
|
* ring-width wide just inside it, in the ink its own words are written in,
|
|
650
656
|
* so the ring is read against that halo rather than against the fill.
|
|
651
657
|
*/
|
|
652
|
-
[data-ui
|
|
658
|
+
[data-ui-alert][data-variant='solid'] > [data-part-dismiss]:focus-visible {
|
|
653
659
|
box-shadow: inset 0 0 0 calc(2 * var(--slotted-focus-ring-width, 2px)) var(--_on-solid);
|
|
654
660
|
}
|
|
655
661
|
|
|
656
|
-
[data-ui
|
|
662
|
+
[data-ui-alert][data-part-root]:focus-visible {
|
|
657
663
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
658
664
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
659
665
|
}
|
|
@@ -673,7 +679,7 @@
|
|
|
673
679
|
* exists to check.
|
|
674
680
|
*/
|
|
675
681
|
@container slotted-alert (max-width: 22rem) {
|
|
676
|
-
[data-ui
|
|
682
|
+
[data-ui-alert] > [data-part-actions] {
|
|
677
683
|
/**
|
|
678
684
|
* Stacked, and each control still its own width. Stretching them is what
|
|
679
685
|
* the mobile banners in the field do, and it takes a decision that is not
|
|
@@ -686,35 +692,30 @@
|
|
|
686
692
|
}
|
|
687
693
|
|
|
688
694
|
/**
|
|
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
|
-
*
|
|
695
|
+
* Actions at the end. A system message is usually one line with one action,
|
|
696
|
+
* and stacking that action under it wastes the whole width the box took;
|
|
697
|
+
* past this point the actions rejoin the message's own line and the dismiss
|
|
698
|
+
* control moves out to a column of its own. A `page` banner does it unless
|
|
699
|
+
* `actionsPlacement` says `below`; any other reach only when it says `end`:
|
|
700
|
+
* an alert beside a field group is narrow because the thing it is about is
|
|
701
|
+
* narrow, however wide the window is. Under 40rem the actions go back under
|
|
702
|
+
* the words.
|
|
695
703
|
*/
|
|
696
704
|
@container slotted-alert (min-width: 40rem) {
|
|
697
|
-
|
|
698
|
-
|
|
705
|
+
/* In the mark's and the words' baseline group: the labels of the actions
|
|
706
|
+
stand on the first line of the message, and a one-line message is
|
|
707
|
+
centred on the controls beside it. */
|
|
708
|
+
[data-ui-alert][data-actions-placement='end'] > [data-part-actions] {
|
|
709
|
+
align-self: baseline;
|
|
699
710
|
grid-column: 3;
|
|
700
711
|
grid-row: 1;
|
|
701
712
|
margin-inline-start: var(--_column-gap);
|
|
702
713
|
}
|
|
703
714
|
|
|
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;
|
|
715
|
+
/* The dismiss control keeps its place on the first line, beside the
|
|
716
|
+
actions that now stand on the same line. */
|
|
717
|
+
[data-ui-alert][data-actions-placement='end'] > [data-part-dismiss] {
|
|
716
718
|
grid-column: 4;
|
|
717
|
-
margin-block: 0;
|
|
718
719
|
}
|
|
719
720
|
}
|
|
720
721
|
|
|
@@ -728,8 +729,8 @@
|
|
|
728
729
|
*
|
|
729
730
|
* The mark needs no rule: its glyph fills with `currentcolor`, which the
|
|
730
731
|
* system has already forced, and it keeps its silhouette, which is the whole
|
|
731
|
-
* reason a glyph is drawn per tone — a
|
|
732
|
-
*
|
|
732
|
+
* reason a glyph is drawn per tone — a diamond and a circle are still
|
|
733
|
+
* different from each other when neither of them is coloured.
|
|
733
734
|
*/
|
|
734
735
|
@media (forced-colors: active) {
|
|
735
736
|
/**
|
|
@@ -741,7 +742,7 @@
|
|
|
741
742
|
* danger fill, not a system colour, was forced to `Canvas` and took its
|
|
742
743
|
* edge with it.
|
|
743
744
|
*/
|
|
744
|
-
[data-ui
|
|
745
|
+
[data-ui-alert][data-part-root][data-variant] {
|
|
745
746
|
background-color: Canvas;
|
|
746
747
|
border-color: CanvasText;
|
|
747
748
|
color: CanvasText;
|
|
@@ -751,12 +752,12 @@
|
|
|
751
752
|
* The control's glyph is stroked in `currentcolor`, so giving the control a
|
|
752
753
|
* system colour repaints the mark with it.
|
|
753
754
|
*/
|
|
754
|
-
[data-ui
|
|
755
|
+
[data-ui-alert] > [data-part-dismiss] {
|
|
755
756
|
color: CanvasText;
|
|
756
757
|
}
|
|
757
758
|
|
|
758
|
-
[data-ui
|
|
759
|
-
[data-ui
|
|
759
|
+
[data-ui-alert] > [data-part-dismiss]:enabled:hover,
|
|
760
|
+
[data-ui-alert] > [data-part-dismiss]:enabled:active {
|
|
760
761
|
background-color: Highlight;
|
|
761
762
|
color: HighlightText;
|
|
762
763
|
}
|
|
@@ -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",
|