@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/dialog/dialog.css
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
* a dialog is the ordinary case, and a descendant rule would paint the inner
|
|
36
36
|
* panel's header with the outer panel's tone.
|
|
37
37
|
*/
|
|
38
|
-
[data-ui
|
|
38
|
+
[data-ui-dialog] {
|
|
39
39
|
/**
|
|
40
40
|
* The panel's measure, per size step. Five named steps rather than the
|
|
41
41
|
* pixel string Material, Carbon and Ant all take: a theme can retune a
|
|
@@ -47,9 +47,21 @@
|
|
|
47
47
|
* own image. It is a family token rather than a prop, so it is set per
|
|
48
48
|
* instance with a style attribute, per region with a rule, or once for an
|
|
49
49
|
* application in the theme; and because every step reads it, an explicit
|
|
50
|
-
* measure wins over the step whichever step is asked for.
|
|
50
|
+
* measure wins over the step whichever step is asked for. Each step reads
|
|
51
|
+
* a token of its own first (`--slotted-dialog-measure-<size>`), so a theme
|
|
52
|
+
* retunes one step and keeps the others.
|
|
53
|
+
*
|
|
54
|
+
* `md`, the default, holds a form: the form's own measure and the panel's
|
|
55
|
+
* inline padding on each side, so a form in a dialog keeps the column it
|
|
56
|
+
* has on a page.
|
|
51
57
|
*/
|
|
52
|
-
--_measure: var(
|
|
58
|
+
--_measure: var(
|
|
59
|
+
--slotted-dialog-measure-md,
|
|
60
|
+
var(
|
|
61
|
+
--slotted-dialog-measure,
|
|
62
|
+
calc(var(--slotted-form-measure, 40rem) + 2 * var(--_padding-inline))
|
|
63
|
+
)
|
|
64
|
+
);
|
|
53
65
|
/** The air between the panel and the edge of the layer. */
|
|
54
66
|
--_layer-padding: var(--slotted-space-8, 1.5rem);
|
|
55
67
|
/**
|
|
@@ -159,7 +171,7 @@
|
|
|
159
171
|
* `data-open` either, and a hidden layer in that frame refuses the focus
|
|
160
172
|
* scope's initial focus.
|
|
161
173
|
*/
|
|
162
|
-
[data-ui
|
|
174
|
+
[data-ui-dialog][inert] {
|
|
163
175
|
content-visibility: hidden;
|
|
164
176
|
pointer-events: none;
|
|
165
177
|
}
|
|
@@ -172,20 +184,20 @@
|
|
|
172
184
|
* pointer, and a press on the page is the outside press the dismissal policy
|
|
173
185
|
* answers.
|
|
174
186
|
*/
|
|
175
|
-
[data-ui
|
|
187
|
+
[data-ui-dialog]:not([data-modal]) {
|
|
176
188
|
pointer-events: none;
|
|
177
189
|
}
|
|
178
190
|
|
|
179
|
-
[data-ui
|
|
191
|
+
[data-ui-dialog]:not([data-modal]) > [data-part-backdrop] {
|
|
180
192
|
visibility: hidden;
|
|
181
193
|
}
|
|
182
194
|
|
|
183
|
-
[data-ui
|
|
195
|
+
[data-ui-dialog]:not([data-modal]) > [data-part-viewport] > [data-part-content] {
|
|
184
196
|
pointer-events: auto;
|
|
185
197
|
}
|
|
186
198
|
|
|
187
|
-
[data-ui
|
|
188
|
-
--_measure: var(--slotted-dialog-measure,
|
|
199
|
+
[data-ui-dialog][data-size='sm'] {
|
|
200
|
+
--_measure: var(--slotted-dialog-measure-sm, var(--slotted-dialog-measure, 32rem));
|
|
189
201
|
--_padding-inline: var(--slotted-dialog-padding-inline-sm, var(--slotted-space-7, 1.25rem));
|
|
190
202
|
--_padding-block: var(--slotted-dialog-padding-block-sm, var(--slotted-space-6, 1rem));
|
|
191
203
|
--_header-padding-block: var(--slotted-space-5, 0.75rem);
|
|
@@ -193,19 +205,19 @@
|
|
|
193
205
|
--_title-font-size: var(--slotted-font-size-lg, 1rem);
|
|
194
206
|
}
|
|
195
207
|
|
|
196
|
-
[data-ui
|
|
197
|
-
--_measure: var(--slotted-dialog-measure,
|
|
208
|
+
[data-ui-dialog][data-size='lg'] {
|
|
209
|
+
--_measure: var(--slotted-dialog-measure-lg, var(--slotted-dialog-measure, 48rem));
|
|
198
210
|
}
|
|
199
211
|
|
|
200
|
-
[data-ui
|
|
201
|
-
--_measure: var(--slotted-dialog-measure, 56rem);
|
|
212
|
+
[data-ui-dialog][data-size='xl'] {
|
|
213
|
+
--_measure: var(--slotted-dialog-measure-xl, var(--slotted-dialog-measure, 56rem));
|
|
202
214
|
}
|
|
203
215
|
|
|
204
216
|
/**
|
|
205
217
|
* `full` is the step a dialog that is a document takes: the panel spends the
|
|
206
218
|
* whole layer minus its padding, and the measure stops capping it.
|
|
207
219
|
*/
|
|
208
|
-
[data-ui
|
|
220
|
+
[data-ui-dialog][data-size='full'] {
|
|
209
221
|
--_measure: var(--slotted-dialog-measure, none);
|
|
210
222
|
}
|
|
211
223
|
|
|
@@ -213,12 +225,12 @@
|
|
|
213
225
|
|
|
214
226
|
/**
|
|
215
227
|
* `--slotted-scrim` is a foundation token the theme restates per scheme and
|
|
216
|
-
* remaps to `Canvas` under forced
|
|
228
|
+
* remaps to `Canvas` under forced colors, where it becomes an opaque ground.
|
|
217
229
|
* That is why the panel below carries a border of its own: every shadow token
|
|
218
230
|
* is `none` in that mode, and a panel separated only by elevation would sit
|
|
219
231
|
* on an opaque ground with nothing to mark its edge.
|
|
220
232
|
*/
|
|
221
|
-
[data-ui
|
|
233
|
+
[data-ui-dialog] > [data-part-backdrop] {
|
|
222
234
|
grid-area: 1 / 1;
|
|
223
235
|
background: var(--slotted-dialog-scrim, var(--slotted-scrim, Canvas));
|
|
224
236
|
opacity: 0;
|
|
@@ -238,7 +250,7 @@
|
|
|
238
250
|
* The panel below arrives over the same duration and the same curve, so the
|
|
239
251
|
* two halves of one layer arrive together.
|
|
240
252
|
*/
|
|
241
|
-
[data-ui
|
|
253
|
+
[data-ui-dialog][data-open] > [data-part-backdrop] {
|
|
242
254
|
opacity: 1;
|
|
243
255
|
transition: opacity var(--slotted-duration-long) var(--slotted-easing-standard);
|
|
244
256
|
}
|
|
@@ -246,13 +258,13 @@
|
|
|
246
258
|
/* ── The box the panel sits in ────────────────────────────────────────── */
|
|
247
259
|
|
|
248
260
|
/**
|
|
249
|
-
* `safe center` rather than `center`. A panel taller than the layer,
|
|
261
|
+
* `safe center` rather than `center`. A panel taller than the layer, centerd
|
|
250
262
|
* by the unsafe keyword, overflows equally at both ends — and the end that
|
|
251
263
|
* carries the title is the one that leaves the screen. `safe` aligns to the
|
|
252
264
|
* start edge as soon as the item cannot fit, which is the only reading that
|
|
253
265
|
* keeps the title reachable at 200% zoom and in a short window.
|
|
254
266
|
*/
|
|
255
|
-
[data-ui
|
|
267
|
+
[data-ui-dialog] > [data-part-viewport] {
|
|
256
268
|
grid-area: 1 / 1;
|
|
257
269
|
display: grid;
|
|
258
270
|
grid-template-columns: minmax(0, 1fr);
|
|
@@ -272,7 +284,7 @@
|
|
|
272
284
|
overscroll-behavior: contain;
|
|
273
285
|
}
|
|
274
286
|
|
|
275
|
-
[data-ui
|
|
287
|
+
[data-ui-dialog][data-placement='top'] > [data-part-viewport] {
|
|
276
288
|
align-content: safe start;
|
|
277
289
|
}
|
|
278
290
|
|
|
@@ -284,7 +296,7 @@
|
|
|
284
296
|
*/
|
|
285
297
|
/* ── The panel ────────────────────────────────────────────────────────── */
|
|
286
298
|
|
|
287
|
-
[data-ui
|
|
299
|
+
[data-ui-dialog] > [data-part-viewport] > [data-part-content] {
|
|
288
300
|
/**
|
|
289
301
|
* The inset the rows carry, stated where a layout of the consumer's own can
|
|
290
302
|
* read it: the panel draws no padding, so content written straight inside
|
|
@@ -317,7 +329,7 @@
|
|
|
317
329
|
* `#1c1c20` panel, a jump of eighty-five per channel, and it read as a
|
|
318
330
|
* drawn stroke around every dialog.
|
|
319
331
|
*
|
|
320
|
-
* Forced
|
|
332
|
+
* Forced colors is where an edge does have to carry the separation, since
|
|
321
333
|
* `--slotted-scrim` becomes an opaque `Canvas` there and every shadow token
|
|
322
334
|
* becomes `none`. The rule at the end of this file is that case, and it
|
|
323
335
|
* thickens the border to say so.
|
|
@@ -345,7 +357,7 @@
|
|
|
345
357
|
* frame it is between two of them: measured, eleven of the twelve frames
|
|
346
358
|
* of the movement landed on a fractional position — 32.305, 32.973,
|
|
347
359
|
* 33.326 — and the reader sees the words lose their edges and get them
|
|
348
|
-
* back. A
|
|
360
|
+
* back. A centerd panel has nothing for the movement to be *from* either,
|
|
349
361
|
* which is what the first draft of this rule said before the travel was
|
|
350
362
|
* written into it.
|
|
351
363
|
*
|
|
@@ -356,6 +368,21 @@
|
|
|
356
368
|
*/
|
|
357
369
|
opacity: 0;
|
|
358
370
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* A theme draws the panel as a material with a surface that has alpha and
|
|
374
|
+
* this filter, `none` unless set. The panel's own fade keeps the filter
|
|
375
|
+
* drawn; an ancestor's opacity below one is what removes it.
|
|
376
|
+
*/
|
|
377
|
+
-webkit-backdrop-filter: var(--slotted-dialog-backdrop-filter, none);
|
|
378
|
+
backdrop-filter: var(--slotted-dialog-backdrop-filter, none);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
|
|
382
|
+
[data-ui-dialog] > [data-part-viewport] > [data-part-content] {
|
|
383
|
+
-webkit-backdrop-filter: none;
|
|
384
|
+
backdrop-filter: none;
|
|
385
|
+
}
|
|
359
386
|
}
|
|
360
387
|
|
|
361
388
|
/**
|
|
@@ -368,7 +395,7 @@
|
|
|
368
395
|
* the edge it sits on, and it is on the same rule now for the same reason:
|
|
369
396
|
* the type inside it is what the slide was resampling (DG4).
|
|
370
397
|
*/
|
|
371
|
-
[data-ui
|
|
398
|
+
[data-ui-dialog][data-open] > [data-part-viewport] > [data-part-content] {
|
|
372
399
|
opacity: 1;
|
|
373
400
|
transition: opacity var(--slotted-duration-long) var(--slotted-easing-standard);
|
|
374
401
|
}
|
|
@@ -382,10 +409,20 @@
|
|
|
382
409
|
* travelling, and there is no travel to stop (DG4).
|
|
383
410
|
*/
|
|
384
411
|
|
|
385
|
-
[data-ui
|
|
412
|
+
[data-ui-dialog][data-scroll='viewport'] > [data-part-viewport] > [data-part-content] {
|
|
386
413
|
max-block-size: none;
|
|
387
414
|
}
|
|
388
415
|
|
|
416
|
+
/**
|
|
417
|
+
* A form written around the header, the body and the footer, so Enter in
|
|
418
|
+
* any field and the footer's submit belong to one form. It draws no box:
|
|
419
|
+
* its children are the panel's rows, and every rule of a part is written a
|
|
420
|
+
* second time through it, so the parts keep the panel's inset and rows.
|
|
421
|
+
*/
|
|
422
|
+
[data-ui-dialog] > [data-part-viewport] > [data-part-content] > form {
|
|
423
|
+
display: contents;
|
|
424
|
+
}
|
|
425
|
+
|
|
389
426
|
/* ── The header ───────────────────────────────────────────────────────── */
|
|
390
427
|
|
|
391
428
|
/**
|
|
@@ -409,7 +446,8 @@
|
|
|
409
446
|
* `interpolate-size`. The cost is a rule over a footer that sometimes has
|
|
410
447
|
* nothing above it to separate.
|
|
411
448
|
*/
|
|
412
|
-
[data-ui
|
|
449
|
+
[data-ui-dialog] > [data-part-viewport] > [data-part-content] > form > [data-part-header],
|
|
450
|
+
[data-ui-dialog] > [data-part-viewport] > [data-part-content] > [data-part-header] {
|
|
413
451
|
display: grid;
|
|
414
452
|
grid-template-columns: auto minmax(0, 1fr) auto auto;
|
|
415
453
|
align-items: start;
|
|
@@ -434,21 +472,33 @@
|
|
|
434
472
|
* where the mark would have gone, and moved as soon as a tone was set. Where
|
|
435
473
|
* it goes is now a rule rather than an accident of the grid.
|
|
436
474
|
*/
|
|
437
|
-
[data-ui
|
|
438
|
-
> [data-part
|
|
439
|
-
> [data-part
|
|
440
|
-
>
|
|
475
|
+
[data-ui-dialog]
|
|
476
|
+
> [data-part-viewport]
|
|
477
|
+
> [data-part-content]
|
|
478
|
+
> form
|
|
479
|
+
> [data-part-header]
|
|
480
|
+
> *:not(
|
|
481
|
+
[data-part-icon],
|
|
482
|
+
[data-part-title],
|
|
483
|
+
[data-part-description],
|
|
484
|
+
[data-part-fullscreen],
|
|
485
|
+
[data-part-close]
|
|
486
|
+
),
|
|
487
|
+
[data-ui-dialog]
|
|
488
|
+
> [data-part-viewport]
|
|
489
|
+
> [data-part-content]
|
|
490
|
+
> [data-part-header]
|
|
441
491
|
> *:not(
|
|
442
|
-
[data-part
|
|
443
|
-
[data-part
|
|
444
|
-
[data-part
|
|
445
|
-
[data-part
|
|
446
|
-
[data-part
|
|
492
|
+
[data-part-icon],
|
|
493
|
+
[data-part-title],
|
|
494
|
+
[data-part-description],
|
|
495
|
+
[data-part-fullscreen],
|
|
496
|
+
[data-part-close]
|
|
447
497
|
) {
|
|
448
498
|
grid-column: 2;
|
|
449
499
|
/**
|
|
450
500
|
* `start`, not the grid's own `stretch`. A badge stretched across the words
|
|
451
|
-
* column paints its ground the full width and
|
|
501
|
+
* column paints its ground the full width and centers its label in it,
|
|
452
502
|
* which is what the first capture showed. The five placed parts are excluded
|
|
453
503
|
* by name rather than by `:not([data-part])`, because what a consumer puts
|
|
454
504
|
* here is usually another family and that carries a `data-part` of its own.
|
|
@@ -460,17 +510,23 @@
|
|
|
460
510
|
|
|
461
511
|
/**
|
|
462
512
|
* Real geometry: the binding draws the tone's own `Glyph` inside an `icon`
|
|
463
|
-
* box, and the slot gives it the tone's text
|
|
464
|
-
* WCAG 2.2 SC 1.4.1 asks that
|
|
513
|
+
* box, and the slot gives it the tone's text color and the mark's size.
|
|
514
|
+
* WCAG 2.2 SC 1.4.1 asks that color not be the only carrier, and a
|
|
465
515
|
* destructive confirmation is the place that matters most: under forced
|
|
466
|
-
*
|
|
516
|
+
* colors every tone becomes one system color and the silhouette is all
|
|
467
517
|
* that is left.
|
|
468
518
|
*/
|
|
469
|
-
[data-ui
|
|
470
|
-
> [data-part
|
|
471
|
-
> [data-part
|
|
472
|
-
>
|
|
473
|
-
> [data-part
|
|
519
|
+
[data-ui-dialog]
|
|
520
|
+
> [data-part-viewport]
|
|
521
|
+
> [data-part-content]
|
|
522
|
+
> form
|
|
523
|
+
> [data-part-header]
|
|
524
|
+
> [data-part-icon],
|
|
525
|
+
[data-ui-dialog]
|
|
526
|
+
> [data-part-viewport]
|
|
527
|
+
> [data-part-content]
|
|
528
|
+
> [data-part-header]
|
|
529
|
+
> [data-part-icon] {
|
|
474
530
|
--slotted-icon-size: var(--_status-size);
|
|
475
531
|
|
|
476
532
|
grid-column: 1;
|
|
@@ -491,88 +547,118 @@
|
|
|
491
547
|
margin-inline-end: var(--_mark-gap);
|
|
492
548
|
}
|
|
493
549
|
|
|
494
|
-
[data-ui
|
|
550
|
+
[data-ui-dialog][data-tone='accent'] {
|
|
495
551
|
--_tone-color: var(--slotted-tone-accent-text, CanvasText);
|
|
496
552
|
}
|
|
497
553
|
|
|
498
|
-
[data-ui
|
|
554
|
+
[data-ui-dialog][data-tone='secondary'] {
|
|
499
555
|
--_tone-color: var(--slotted-tone-secondary-text, CanvasText);
|
|
500
556
|
}
|
|
501
557
|
|
|
502
|
-
[data-ui
|
|
558
|
+
[data-ui-dialog][data-tone='success'] {
|
|
503
559
|
--_tone-color: var(--slotted-tone-success-text, CanvasText);
|
|
504
560
|
}
|
|
505
561
|
|
|
506
|
-
[data-ui
|
|
562
|
+
[data-ui-dialog][data-tone='info'] {
|
|
563
|
+
--_tone-color: var(--slotted-tone-info-text, CanvasText);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
[data-ui-dialog][data-tone='warning'] {
|
|
507
567
|
--_tone-color: var(--slotted-tone-warning-text, CanvasText);
|
|
508
568
|
}
|
|
509
569
|
|
|
510
|
-
[data-ui
|
|
570
|
+
[data-ui-dialog][data-tone='danger'] {
|
|
511
571
|
--_tone-color: var(--slotted-tone-danger-text, CanvasText);
|
|
512
572
|
}
|
|
513
573
|
|
|
514
574
|
/* ── The words ────────────────────────────────────────────────────────── */
|
|
515
575
|
|
|
516
576
|
/**
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
*
|
|
520
|
-
*
|
|
577
|
+
* The header places the title and the description; their type is theirs
|
|
578
|
+
* wherever they sit in the panel. A plain panel puts them in a bar of its
|
|
579
|
+
* own, and matched only as the header's children they kept the user agent's
|
|
580
|
+
* heading size and margins there. The scope ends at another family's root,
|
|
581
|
+
* so a card's title inside the body keeps the card's type; a title or a
|
|
582
|
+
* description drawn by another family's element stays the dialog's.
|
|
521
583
|
*/
|
|
522
|
-
[data-ui
|
|
523
|
-
> [data-part
|
|
524
|
-
> [data-part
|
|
525
|
-
>
|
|
526
|
-
> [data-part
|
|
584
|
+
[data-ui-dialog]
|
|
585
|
+
> [data-part-viewport]
|
|
586
|
+
> [data-part-content]
|
|
587
|
+
> form
|
|
588
|
+
> [data-part-header]
|
|
589
|
+
> [data-part-title],
|
|
590
|
+
[data-ui-dialog]
|
|
591
|
+
> [data-part-viewport]
|
|
592
|
+
> [data-part-content]
|
|
593
|
+
> [data-part-header]
|
|
594
|
+
> [data-part-title] {
|
|
527
595
|
grid-column: 2;
|
|
528
596
|
grid-row: 1;
|
|
529
|
-
margin: 0;
|
|
530
|
-
min-inline-size: 0;
|
|
531
|
-
overflow-wrap: anywhere;
|
|
532
|
-
font-family: var(
|
|
533
|
-
--slotted-dialog-title-font-family,
|
|
534
|
-
var(
|
|
535
|
-
--slotted-font-family-heading,
|
|
536
|
-
var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif)
|
|
537
|
-
)
|
|
538
|
-
);
|
|
539
|
-
font-size: var(--_title-font-size);
|
|
540
|
-
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
541
|
-
line-height: var(--_title-line-height);
|
|
542
|
-
color: var(--slotted-dialog-title-color, var(--slotted-text, CanvasText));
|
|
543
597
|
}
|
|
544
598
|
|
|
545
|
-
[data-ui
|
|
546
|
-
> [data-part
|
|
547
|
-
> [data-part
|
|
548
|
-
>
|
|
549
|
-
> [data-part
|
|
599
|
+
[data-ui-dialog]
|
|
600
|
+
> [data-part-viewport]
|
|
601
|
+
> [data-part-content]
|
|
602
|
+
> form
|
|
603
|
+
> [data-part-header]
|
|
604
|
+
> [data-part-description],
|
|
605
|
+
[data-ui-dialog]
|
|
606
|
+
> [data-part-viewport]
|
|
607
|
+
> [data-part-content]
|
|
608
|
+
> [data-part-header]
|
|
609
|
+
> [data-part-description] {
|
|
550
610
|
grid-column: 2;
|
|
551
611
|
grid-row: 2;
|
|
552
|
-
margin: 0;
|
|
553
|
-
min-inline-size: 0;
|
|
554
|
-
overflow-wrap: anywhere;
|
|
555
|
-
font-size: var(--_description-font-size);
|
|
556
|
-
line-height: var(--slotted-line-height-md, 1.5);
|
|
557
|
-
color: var(--slotted-dialog-description-color, var(--slotted-text-muted, GrayText));
|
|
558
612
|
}
|
|
559
613
|
|
|
560
614
|
/**
|
|
561
|
-
*
|
|
562
|
-
*
|
|
563
|
-
*
|
|
564
|
-
*
|
|
565
|
-
* weight instead, which is what both product confirmations in the survey do
|
|
566
|
-
* with a span of their own.
|
|
615
|
+
* `overflow-wrap: anywhere` and a zero minimum are the pair that answer a
|
|
616
|
+
* hostile string. A ninety-character unbroken token in a title widens the
|
|
617
|
+
* panel past the layer, and the panel is centerd, so both of its edges leave
|
|
618
|
+
* the screen at once.
|
|
567
619
|
*/
|
|
568
|
-
[data-ui
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
620
|
+
@scope ([data-ui-dialog] > [data-part-viewport] > [data-part-content]) to ([data-ui]:not(
|
|
621
|
+
[data-part-title],
|
|
622
|
+
[data-part-description]
|
|
623
|
+
)) {
|
|
624
|
+
:scope [data-part-title] {
|
|
625
|
+
margin: 0;
|
|
626
|
+
min-inline-size: 0;
|
|
627
|
+
overflow-wrap: anywhere;
|
|
628
|
+
font-family: var(
|
|
629
|
+
--slotted-dialog-title-font-family,
|
|
630
|
+
var(
|
|
631
|
+
--slotted-font-family-heading,
|
|
632
|
+
var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif)
|
|
633
|
+
)
|
|
634
|
+
);
|
|
635
|
+
font-size: var(--_title-font-size);
|
|
636
|
+
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
637
|
+
line-height: var(--_title-line-height);
|
|
638
|
+
color: var(--slotted-dialog-title-color, var(--slotted-text, CanvasText));
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
:scope [data-part-description] {
|
|
642
|
+
margin: 0;
|
|
643
|
+
min-inline-size: 0;
|
|
644
|
+
overflow-wrap: anywhere;
|
|
645
|
+
font-size: var(--_description-font-size);
|
|
646
|
+
line-height: var(--slotted-line-height-md, 1.5);
|
|
647
|
+
color: var(--slotted-dialog-description-color, var(--slotted-text-muted, GrayText));
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* The name of the thing the dialog acts on. A confirmation says which
|
|
652
|
+
* project or which member it removes, and a consumer marks that name with
|
|
653
|
+
* `strong`; left to the user agent it was bold in the muted color, heavier
|
|
654
|
+
* than the title and no easier to find. It takes the title's color and
|
|
655
|
+
* weight instead, which is what both product confirmations in the survey do
|
|
656
|
+
* with a span of their own.
|
|
657
|
+
*/
|
|
658
|
+
:scope [data-part-description] :is(strong, b) {
|
|
659
|
+
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
660
|
+
color: var(--slotted-dialog-title-color, var(--slotted-text, CanvasText));
|
|
661
|
+
}
|
|
576
662
|
}
|
|
577
663
|
|
|
578
664
|
/* ── The close button ─────────────────────────────────────────────────── */
|
|
@@ -580,16 +666,22 @@
|
|
|
580
666
|
/**
|
|
581
667
|
* An inner control, not a button (R2): the box is the glyph plus a step of
|
|
582
668
|
* air on each side, floored at the WCAG 2.2 minimum, and the glyph is
|
|
583
|
-
*
|
|
669
|
+
* centerd in it. It was the control height before, a thirty-four pixel
|
|
584
670
|
* square beside an eighteen pixel mark. The glyph is the binding's `Glyph`
|
|
585
671
|
* in an `icon` box, sized here through the icon token so the box and the
|
|
586
672
|
* formula above read one length.
|
|
587
673
|
*/
|
|
588
|
-
[data-ui
|
|
589
|
-
> [data-part
|
|
590
|
-
> [data-part
|
|
591
|
-
>
|
|
592
|
-
> [data-part
|
|
674
|
+
[data-ui-dialog]
|
|
675
|
+
> [data-part-viewport]
|
|
676
|
+
> [data-part-content]
|
|
677
|
+
> form
|
|
678
|
+
> [data-part-header]
|
|
679
|
+
> [data-part-close],
|
|
680
|
+
[data-ui-dialog]
|
|
681
|
+
> [data-part-viewport]
|
|
682
|
+
> [data-part-content]
|
|
683
|
+
> [data-part-header]
|
|
684
|
+
> [data-part-close] {
|
|
593
685
|
--slotted-icon-size: var(--_icon-size);
|
|
594
686
|
|
|
595
687
|
grid-column: 4;
|
|
@@ -617,11 +709,17 @@
|
|
|
617
709
|
var(--slotted-control-transition-easing, var(--slotted-easing-standard));
|
|
618
710
|
}
|
|
619
711
|
|
|
620
|
-
[data-ui
|
|
621
|
-
> [data-part
|
|
622
|
-
> [data-part
|
|
623
|
-
>
|
|
624
|
-
> [data-part
|
|
712
|
+
[data-ui-dialog]
|
|
713
|
+
> [data-part-viewport]
|
|
714
|
+
> [data-part-content]
|
|
715
|
+
> form
|
|
716
|
+
> [data-part-header]
|
|
717
|
+
> [data-part-close]:not(:disabled):hover,
|
|
718
|
+
[data-ui-dialog]
|
|
719
|
+
> [data-part-viewport]
|
|
720
|
+
> [data-part-content]
|
|
721
|
+
> [data-part-header]
|
|
722
|
+
> [data-part-close]:not(:disabled):hover {
|
|
625
723
|
/* The ground moves under the pointer and nothing else does (R2). */
|
|
626
724
|
background-color: var(
|
|
627
725
|
--slotted-dialog-close-hover-background,
|
|
@@ -629,22 +727,34 @@
|
|
|
629
727
|
);
|
|
630
728
|
}
|
|
631
729
|
|
|
632
|
-
[data-ui
|
|
633
|
-
> [data-part
|
|
634
|
-
> [data-part
|
|
635
|
-
>
|
|
636
|
-
> [data-part
|
|
730
|
+
[data-ui-dialog]
|
|
731
|
+
> [data-part-viewport]
|
|
732
|
+
> [data-part-content]
|
|
733
|
+
> form
|
|
734
|
+
> [data-part-header]
|
|
735
|
+
> [data-part-close]:not(:disabled):active,
|
|
736
|
+
[data-ui-dialog]
|
|
737
|
+
> [data-part-viewport]
|
|
738
|
+
> [data-part-content]
|
|
739
|
+
> [data-part-header]
|
|
740
|
+
> [data-part-close]:not(:disabled):active {
|
|
637
741
|
background-color: var(
|
|
638
742
|
--slotted-dialog-close-active-background,
|
|
639
743
|
var(--slotted-tone-secondary-subtle-active)
|
|
640
744
|
);
|
|
641
745
|
}
|
|
642
746
|
|
|
643
|
-
[data-ui
|
|
644
|
-
> [data-part
|
|
645
|
-
> [data-part
|
|
646
|
-
>
|
|
647
|
-
> [data-part
|
|
747
|
+
[data-ui-dialog]
|
|
748
|
+
> [data-part-viewport]
|
|
749
|
+
> [data-part-content]
|
|
750
|
+
> form
|
|
751
|
+
> [data-part-header]
|
|
752
|
+
> [data-part-close]:focus-visible,
|
|
753
|
+
[data-ui-dialog]
|
|
754
|
+
> [data-part-viewport]
|
|
755
|
+
> [data-part-content]
|
|
756
|
+
> [data-part-header]
|
|
757
|
+
> [data-part-close]:focus-visible {
|
|
648
758
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
649
759
|
outline-offset: calc(-1 * var(--slotted-focus-ring-offset, 2px));
|
|
650
760
|
}
|
|
@@ -654,7 +764,7 @@
|
|
|
654
764
|
/**
|
|
655
765
|
* The reader's own control for taking the layer, and the same inner control
|
|
656
766
|
* the close is (R2): the box is the glyph plus a step of air on each side,
|
|
657
|
-
* floored at the WCAG 2.2 minimum, and the glyph is
|
|
767
|
+
* floored at the WCAG 2.2 minimum, and the glyph is centerd in it. The
|
|
658
768
|
* geometry is not chosen here — it is `--_close-size`, the one formula this
|
|
659
769
|
* family already states, so the two controls in the corner are one row of
|
|
660
770
|
* one size.
|
|
@@ -665,11 +775,17 @@
|
|
|
665
775
|
* glyph is the binding's, chosen from the state: the mark says what the
|
|
666
776
|
* press does next, so it is the opposite of the state the panel is in.
|
|
667
777
|
*/
|
|
668
|
-
[data-ui
|
|
669
|
-
> [data-part
|
|
670
|
-
> [data-part
|
|
671
|
-
>
|
|
672
|
-
> [data-part
|
|
778
|
+
[data-ui-dialog]
|
|
779
|
+
> [data-part-viewport]
|
|
780
|
+
> [data-part-content]
|
|
781
|
+
> form
|
|
782
|
+
> [data-part-header]
|
|
783
|
+
> [data-part-fullscreen],
|
|
784
|
+
[data-ui-dialog]
|
|
785
|
+
> [data-part-viewport]
|
|
786
|
+
> [data-part-content]
|
|
787
|
+
> [data-part-header]
|
|
788
|
+
> [data-part-fullscreen] {
|
|
673
789
|
--slotted-icon-size: var(--_icon-size);
|
|
674
790
|
|
|
675
791
|
grid-column: 3;
|
|
@@ -700,20 +816,33 @@
|
|
|
700
816
|
* glyph on every side, and a second gap between them would set them further
|
|
701
817
|
* apart than either is from the words.
|
|
702
818
|
*/
|
|
703
|
-
[data-ui
|
|
704
|
-
> [data-part
|
|
705
|
-
> [data-part
|
|
706
|
-
>
|
|
707
|
-
> [data-part
|
|
708
|
-
|
|
819
|
+
[data-ui-dialog]
|
|
820
|
+
> [data-part-viewport]
|
|
821
|
+
> [data-part-content]
|
|
822
|
+
> form
|
|
823
|
+
> [data-part-header]
|
|
824
|
+
> [data-part-fullscreen]
|
|
825
|
+
+ [data-part-close],
|
|
826
|
+
[data-ui-dialog]
|
|
827
|
+
> [data-part-viewport]
|
|
828
|
+
> [data-part-content]
|
|
829
|
+
> [data-part-header]
|
|
830
|
+
> [data-part-fullscreen]
|
|
831
|
+
+ [data-part-close] {
|
|
709
832
|
margin-inline-start: 0;
|
|
710
833
|
}
|
|
711
834
|
|
|
712
|
-
[data-ui
|
|
713
|
-
> [data-part
|
|
714
|
-
> [data-part
|
|
715
|
-
>
|
|
716
|
-
> [data-part
|
|
835
|
+
[data-ui-dialog]
|
|
836
|
+
> [data-part-viewport]
|
|
837
|
+
> [data-part-content]
|
|
838
|
+
> form
|
|
839
|
+
> [data-part-header]
|
|
840
|
+
> [data-part-fullscreen]:not(:disabled):hover,
|
|
841
|
+
[data-ui-dialog]
|
|
842
|
+
> [data-part-viewport]
|
|
843
|
+
> [data-part-content]
|
|
844
|
+
> [data-part-header]
|
|
845
|
+
> [data-part-fullscreen]:not(:disabled):hover {
|
|
717
846
|
/* The ground moves under the pointer and nothing else does (R2). */
|
|
718
847
|
background-color: var(
|
|
719
848
|
--slotted-dialog-close-hover-background,
|
|
@@ -721,65 +850,102 @@
|
|
|
721
850
|
);
|
|
722
851
|
}
|
|
723
852
|
|
|
724
|
-
[data-ui
|
|
725
|
-
> [data-part
|
|
726
|
-
> [data-part
|
|
727
|
-
>
|
|
728
|
-
> [data-part
|
|
853
|
+
[data-ui-dialog]
|
|
854
|
+
> [data-part-viewport]
|
|
855
|
+
> [data-part-content]
|
|
856
|
+
> form
|
|
857
|
+
> [data-part-header]
|
|
858
|
+
> [data-part-fullscreen]:not(:disabled):active,
|
|
859
|
+
[data-ui-dialog]
|
|
860
|
+
> [data-part-viewport]
|
|
861
|
+
> [data-part-content]
|
|
862
|
+
> [data-part-header]
|
|
863
|
+
> [data-part-fullscreen]:not(:disabled):active {
|
|
729
864
|
background-color: var(
|
|
730
865
|
--slotted-dialog-close-active-background,
|
|
731
866
|
var(--slotted-tone-secondary-subtle-active)
|
|
732
867
|
);
|
|
733
868
|
}
|
|
734
869
|
|
|
735
|
-
[data-ui
|
|
736
|
-
> [data-part
|
|
737
|
-
> [data-part
|
|
738
|
-
>
|
|
739
|
-
> [data-part
|
|
870
|
+
[data-ui-dialog]
|
|
871
|
+
> [data-part-viewport]
|
|
872
|
+
> [data-part-content]
|
|
873
|
+
> form
|
|
874
|
+
> [data-part-header]
|
|
875
|
+
> [data-part-fullscreen]:focus-visible,
|
|
876
|
+
[data-ui-dialog]
|
|
877
|
+
> [data-part-viewport]
|
|
878
|
+
> [data-part-content]
|
|
879
|
+
> [data-part-header]
|
|
880
|
+
> [data-part-fullscreen]:focus-visible {
|
|
740
881
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
741
882
|
outline-offset: calc(-1 * var(--slotted-focus-ring-offset, 2px));
|
|
742
883
|
}
|
|
743
884
|
|
|
744
885
|
/**
|
|
745
886
|
* On a finger the target is the comfortable size in both axes and the box
|
|
746
|
-
* is the one a mouse sees: a transparent `::before`
|
|
887
|
+
* is the one a mouse sees: a transparent `::before` centerd on each control
|
|
747
888
|
* reaches 44 pixels, and the ground and the ring stay square. The two
|
|
748
889
|
* controls touch, so neither reaches across the edge they share.
|
|
749
890
|
*/
|
|
750
891
|
@media (pointer: coarse) {
|
|
751
|
-
[data-ui
|
|
752
|
-
> [data-part
|
|
753
|
-
> [data-part
|
|
754
|
-
>
|
|
755
|
-
>
|
|
892
|
+
[data-ui-dialog]
|
|
893
|
+
> [data-part-viewport]
|
|
894
|
+
> [data-part-content]
|
|
895
|
+
> form
|
|
896
|
+
> [data-part-header]
|
|
897
|
+
> :is([data-part-close], [data-part-fullscreen]),
|
|
898
|
+
[data-ui-dialog]
|
|
899
|
+
> [data-part-viewport]
|
|
900
|
+
> [data-part-content]
|
|
901
|
+
> [data-part-header]
|
|
902
|
+
> :is([data-part-close], [data-part-fullscreen]) {
|
|
756
903
|
position: relative;
|
|
757
904
|
}
|
|
758
905
|
|
|
759
|
-
[data-ui
|
|
760
|
-
> [data-part
|
|
761
|
-
> [data-part
|
|
762
|
-
>
|
|
763
|
-
>
|
|
906
|
+
[data-ui-dialog]
|
|
907
|
+
> [data-part-viewport]
|
|
908
|
+
> [data-part-content]
|
|
909
|
+
> form
|
|
910
|
+
> [data-part-header]
|
|
911
|
+
> :is([data-part-close], [data-part-fullscreen])::before,
|
|
912
|
+
[data-ui-dialog]
|
|
913
|
+
> [data-part-viewport]
|
|
914
|
+
> [data-part-content]
|
|
915
|
+
> [data-part-header]
|
|
916
|
+
> :is([data-part-close], [data-part-fullscreen])::before {
|
|
764
917
|
content: '';
|
|
765
918
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
766
919
|
position: absolute;
|
|
767
920
|
}
|
|
768
921
|
|
|
769
|
-
[data-ui
|
|
770
|
-
> [data-part
|
|
771
|
-
> [data-part
|
|
772
|
-
>
|
|
773
|
-
> [data-part
|
|
922
|
+
[data-ui-dialog]
|
|
923
|
+
> [data-part-viewport]
|
|
924
|
+
> [data-part-content]
|
|
925
|
+
> form
|
|
926
|
+
> [data-part-header]
|
|
927
|
+
> [data-part-fullscreen]:has(+ [data-part-close])::before,
|
|
928
|
+
[data-ui-dialog]
|
|
929
|
+
> [data-part-viewport]
|
|
930
|
+
> [data-part-content]
|
|
931
|
+
> [data-part-header]
|
|
932
|
+
> [data-part-fullscreen]:has(+ [data-part-close])::before {
|
|
774
933
|
inset-inline-end: 0;
|
|
775
934
|
}
|
|
776
935
|
|
|
777
|
-
[data-ui
|
|
778
|
-
> [data-part
|
|
779
|
-
> [data-part
|
|
780
|
-
>
|
|
781
|
-
> [data-part
|
|
782
|
-
|
|
936
|
+
[data-ui-dialog]
|
|
937
|
+
> [data-part-viewport]
|
|
938
|
+
> [data-part-content]
|
|
939
|
+
> form
|
|
940
|
+
> [data-part-header]
|
|
941
|
+
> [data-part-fullscreen]
|
|
942
|
+
+ [data-part-close]::before,
|
|
943
|
+
[data-ui-dialog]
|
|
944
|
+
> [data-part-viewport]
|
|
945
|
+
> [data-part-content]
|
|
946
|
+
> [data-part-header]
|
|
947
|
+
> [data-part-fullscreen]
|
|
948
|
+
+ [data-part-close]::before {
|
|
783
949
|
inset-inline-start: 0;
|
|
784
950
|
}
|
|
785
951
|
}
|
|
@@ -792,15 +958,23 @@
|
|
|
792
958
|
* `dismissable-layer` covers the modal case; this covers the non-modal one,
|
|
793
959
|
* where the page behind is not locked at all.
|
|
794
960
|
*/
|
|
795
|
-
[data-ui
|
|
796
|
-
> [data-part
|
|
797
|
-
> [data-part
|
|
798
|
-
>
|
|
961
|
+
[data-ui-dialog]
|
|
962
|
+
> [data-part-viewport]
|
|
963
|
+
> [data-part-content]
|
|
964
|
+
> form
|
|
965
|
+
> [data-part-body]:not(:first-child),
|
|
966
|
+
[data-ui-dialog]
|
|
967
|
+
> [data-part-viewport]
|
|
968
|
+
> [data-part-content]
|
|
969
|
+
> [data-part-body]:not(:first-child) {
|
|
799
970
|
border-block-start: var(--_rule-size) solid
|
|
800
971
|
var(--slotted-dialog-rule-color, var(--slotted-border-subtle, ButtonBorder));
|
|
801
972
|
}
|
|
802
973
|
|
|
803
|
-
[data-ui
|
|
974
|
+
[data-ui-dialog] > [data-part-viewport] > [data-part-content] > form > [data-part-body],
|
|
975
|
+
[data-ui-dialog] > [data-part-viewport] > [data-part-content] > [data-part-body] {
|
|
976
|
+
/* The row that stretches, with or without a header above it. */
|
|
977
|
+
grid-row: 2;
|
|
804
978
|
min-block-size: 0;
|
|
805
979
|
overflow-x: hidden;
|
|
806
980
|
overflow-y: auto;
|
|
@@ -814,10 +988,15 @@
|
|
|
814
988
|
color: var(--slotted-dialog-body-color, var(--slotted-text, CanvasText));
|
|
815
989
|
}
|
|
816
990
|
|
|
817
|
-
[data-ui
|
|
818
|
-
> [data-part
|
|
819
|
-
> [data-part
|
|
820
|
-
>
|
|
991
|
+
[data-ui-dialog][data-scroll='viewport']
|
|
992
|
+
> [data-part-viewport]
|
|
993
|
+
> [data-part-content]
|
|
994
|
+
> form
|
|
995
|
+
> [data-part-body],
|
|
996
|
+
[data-ui-dialog][data-scroll='viewport']
|
|
997
|
+
> [data-part-viewport]
|
|
998
|
+
> [data-part-content]
|
|
999
|
+
> [data-part-body] {
|
|
821
1000
|
overflow: visible;
|
|
822
1001
|
}
|
|
823
1002
|
|
|
@@ -828,10 +1007,12 @@
|
|
|
828
1007
|
* header, the close button and Escape all stay operable: a loading dialog a
|
|
829
1008
|
* reader cannot leave is the worse failure of the two.
|
|
830
1009
|
*/
|
|
831
|
-
[data-ui
|
|
832
|
-
> [data-part
|
|
833
|
-
> [data-part
|
|
834
|
-
>
|
|
1010
|
+
[data-ui-dialog][data-loading]
|
|
1011
|
+
> [data-part-viewport]
|
|
1012
|
+
> [data-part-content]
|
|
1013
|
+
> form
|
|
1014
|
+
> [data-part-body],
|
|
1015
|
+
[data-ui-dialog][data-loading] > [data-part-viewport] > [data-part-content] > [data-part-body] {
|
|
835
1016
|
min-block-size: var(--slotted-space-12, 4rem);
|
|
836
1017
|
}
|
|
837
1018
|
|
|
@@ -843,21 +1024,29 @@
|
|
|
843
1024
|
* reason `content` is bounded — an unbounded panel pushes it past the fold,
|
|
844
1025
|
* which is the whole failure the three-row grid exists to prevent.
|
|
845
1026
|
*/
|
|
846
|
-
[data-ui
|
|
1027
|
+
[data-ui-dialog] > [data-part-viewport] > [data-part-content] > form > [data-part-footer],
|
|
1028
|
+
[data-ui-dialog] > [data-part-viewport] > [data-part-content] > [data-part-footer] {
|
|
1029
|
+
/* The last row, with or without a body above it: without one it took the row that stretches. */
|
|
1030
|
+
grid-row: 3;
|
|
847
1031
|
display: flex;
|
|
848
1032
|
flex-wrap: wrap;
|
|
849
1033
|
align-items: center;
|
|
850
1034
|
justify-content: flex-end;
|
|
851
|
-
gap: var(--
|
|
1035
|
+
gap: var(--slotted-dialog-footer-gap, var(--slotted-action-gap, 8px));
|
|
852
1036
|
padding-block: var(--_footer-padding-block);
|
|
853
1037
|
padding-inline: var(--_padding-inline);
|
|
854
1038
|
background: var(--slotted-dialog-footer-surface, var(--slotted-surface-sunken, Canvas));
|
|
855
1039
|
}
|
|
856
1040
|
|
|
857
|
-
[data-ui
|
|
858
|
-
> [data-part
|
|
859
|
-
> [data-part
|
|
860
|
-
>
|
|
1041
|
+
[data-ui-dialog]
|
|
1042
|
+
> [data-part-viewport]
|
|
1043
|
+
> [data-part-content]
|
|
1044
|
+
> form
|
|
1045
|
+
> [data-part-footer]:not(:first-child),
|
|
1046
|
+
[data-ui-dialog]
|
|
1047
|
+
> [data-part-viewport]
|
|
1048
|
+
> [data-part-content]
|
|
1049
|
+
> [data-part-footer]:not(:first-child) {
|
|
861
1050
|
border-block-start: var(--_rule-size) solid
|
|
862
1051
|
var(--slotted-dialog-rule-color, var(--slotted-border-subtle, ButtonBorder));
|
|
863
1052
|
}
|
|
@@ -885,7 +1074,7 @@
|
|
|
885
1074
|
* writes their own three-row grid, which is the whole of what they are taking
|
|
886
1075
|
* over.
|
|
887
1076
|
*/
|
|
888
|
-
[data-ui
|
|
1077
|
+
[data-ui-dialog][data-surface='plain'] > [data-part-viewport] > [data-part-content] {
|
|
889
1078
|
display: block;
|
|
890
1079
|
background: none;
|
|
891
1080
|
border: 0;
|
|
@@ -894,10 +1083,38 @@
|
|
|
894
1083
|
overflow: visible;
|
|
895
1084
|
}
|
|
896
1085
|
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
1086
|
+
/**
|
|
1087
|
+
* The children fade in the panel's place, at the panel's durations. A plain
|
|
1088
|
+
* panel paints nothing, so the picture is the same; what changes is that no
|
|
1089
|
+
* ancestor of a child's material is below full opacity, which in Chromium
|
|
1090
|
+
* would draw no backdrop filter until the fade ended — a command palette
|
|
1091
|
+
* drawn as a material showed the page sharp behind it for the whole fade.
|
|
1092
|
+
*/
|
|
1093
|
+
[data-ui-dialog][data-surface='plain'] > [data-part-viewport] > [data-part-content] {
|
|
1094
|
+
opacity: 1;
|
|
1095
|
+
transition: none;
|
|
1096
|
+
}
|
|
1097
|
+
[data-ui-dialog][data-surface='plain'] > [data-part-viewport] > [data-part-content] > * {
|
|
1098
|
+
opacity: 0;
|
|
1099
|
+
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
1100
|
+
}
|
|
1101
|
+
[data-ui-dialog][data-surface='plain'][data-open]
|
|
1102
|
+
> [data-part-viewport]
|
|
1103
|
+
> [data-part-content]
|
|
1104
|
+
> * {
|
|
1105
|
+
opacity: 1;
|
|
1106
|
+
transition: opacity var(--slotted-duration-long) var(--slotted-easing-standard);
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
[data-ui-dialog][data-surface='plain']
|
|
1110
|
+
> [data-part-viewport]
|
|
1111
|
+
> [data-part-content]
|
|
1112
|
+
> form
|
|
1113
|
+
> :is([data-part-header], [data-part-body], [data-part-footer]),
|
|
1114
|
+
[data-ui-dialog][data-surface='plain']
|
|
1115
|
+
> [data-part-viewport]
|
|
1116
|
+
> [data-part-content]
|
|
1117
|
+
> :is([data-part-header], [data-part-body], [data-part-footer]) {
|
|
901
1118
|
background: none;
|
|
902
1119
|
border: 0;
|
|
903
1120
|
padding: 0;
|
|
@@ -922,16 +1139,18 @@
|
|
|
922
1139
|
* a literal because `@container (max-inline-size: var(--x))` is invalid CSS.
|
|
923
1140
|
*/
|
|
924
1141
|
@container slotted-dialog (max-inline-size: 30rem) {
|
|
925
|
-
[data-ui
|
|
1142
|
+
[data-ui-dialog][data-full-screen='narrow'] > [data-part-viewport] {
|
|
926
1143
|
align-content: stretch;
|
|
927
1144
|
padding: 0;
|
|
928
1145
|
}
|
|
929
1146
|
|
|
930
|
-
[data-ui
|
|
1147
|
+
[data-ui-dialog][data-full-screen='narrow'] > [data-part-viewport] > [data-part-content] {
|
|
931
1148
|
max-inline-size: none;
|
|
932
1149
|
block-size: 100%;
|
|
933
1150
|
border-radius: 0;
|
|
934
1151
|
border: 0;
|
|
1152
|
+
box-sizing: border-box;
|
|
1153
|
+
padding-block-end: var(--slotted-keyboard-inset, 0px);
|
|
935
1154
|
}
|
|
936
1155
|
}
|
|
937
1156
|
|
|
@@ -943,14 +1162,21 @@
|
|
|
943
1162
|
* owns both — a panel that animated its own box would animate `inset`,
|
|
944
1163
|
* `inline-size` and `block-size`, which is the rule R7 exists to state.
|
|
945
1164
|
*/
|
|
946
|
-
|
|
947
|
-
|
|
1165
|
+
/*
|
|
1166
|
+
* The row is the layer's height, not the content's. An `auto` row grew with
|
|
1167
|
+
* a plain panel's content, so a viewer whose zoomed picture was taller than
|
|
1168
|
+
* the window took the layer past the window with it, and the layer changed
|
|
1169
|
+
* size at every step of the zoom.
|
|
1170
|
+
*/
|
|
1171
|
+
[data-ui-dialog][data-full-screen='always'] > [data-part-viewport],
|
|
1172
|
+
[data-ui-dialog][data-fullscreen] > [data-part-viewport] {
|
|
948
1173
|
align-content: stretch;
|
|
1174
|
+
grid-template-rows: minmax(0, 1fr);
|
|
949
1175
|
padding: 0;
|
|
950
1176
|
}
|
|
951
1177
|
|
|
952
|
-
[data-ui
|
|
953
|
-
[data-ui
|
|
1178
|
+
[data-ui-dialog][data-full-screen='always'] > [data-part-viewport] > [data-part-content],
|
|
1179
|
+
[data-ui-dialog][data-fullscreen] > [data-part-viewport] > [data-part-content] {
|
|
954
1180
|
max-inline-size: none;
|
|
955
1181
|
block-size: 100%;
|
|
956
1182
|
border-radius: 0;
|
|
@@ -961,9 +1187,19 @@
|
|
|
961
1187
|
* layer, which on a phone is a stray line under the browser chrome.
|
|
962
1188
|
*/
|
|
963
1189
|
border: 0;
|
|
1190
|
+
/**
|
|
1191
|
+
* The virtual keyboard. `observeKeyboardInset` in `@slotted/core/measure`
|
|
1192
|
+
* measures what the keyboard covers, the binding writes it on the open
|
|
1193
|
+
* layer, and the panel's rows end above the keys: a full-screen panel is
|
|
1194
|
+
* the layout viewport's height, and the keyboard shrinks only the visual
|
|
1195
|
+
* one. Nought under `interactive-widget=resizes-content`, whose layout
|
|
1196
|
+
* already shrank.
|
|
1197
|
+
*/
|
|
1198
|
+
box-sizing: border-box;
|
|
1199
|
+
padding-block-end: var(--slotted-keyboard-inset, 0px);
|
|
964
1200
|
}
|
|
965
1201
|
|
|
966
|
-
/* ── Forced
|
|
1202
|
+
/* ── Forced colors ───────────────────────────────────────────────────── */
|
|
967
1203
|
|
|
968
1204
|
/**
|
|
969
1205
|
* The theme remaps every token this family reads, so the only rule here is
|
|
@@ -973,7 +1209,7 @@
|
|
|
973
1209
|
* a system border is read at.
|
|
974
1210
|
*/
|
|
975
1211
|
@media (forced-colors: active) {
|
|
976
|
-
[data-ui
|
|
1212
|
+
[data-ui-dialog] > [data-part-viewport] > [data-part-content] {
|
|
977
1213
|
border-color: CanvasText;
|
|
978
1214
|
border-width: var(--slotted-border-width-thick, 2px);
|
|
979
1215
|
}
|