@slotted/styles 0.1.0-beta.4 → 0.1.0-beta.40

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.
Files changed (221) hide show
  1. package/package.json +21 -1
  2. package/src/accordion/accordion.css +31 -13
  3. package/src/accordion/accordion.tokens.json +2 -0
  4. package/src/action-bar/action-bar.css +47 -44
  5. package/src/action-bar/action-bar.tokens.json +1 -0
  6. package/src/action-sheet/action-sheet.css +39 -39
  7. package/src/alert/alert.css +97 -97
  8. package/src/alert/alert.tokens.json +6 -1
  9. package/src/app-shell/app-shell.css +472 -342
  10. package/src/app-shell/app-shell.tokens.json +6 -3
  11. package/src/aspect-ratio/aspect-ratio.css +24 -23
  12. package/src/attachment/attachment.css +118 -114
  13. package/src/avatar/avatar.css +97 -67
  14. package/src/avatar/avatar.tokens.json +8 -0
  15. package/src/avatar-group/avatar-group.css +22 -23
  16. package/src/badge/badge.css +58 -47
  17. package/src/badge/badge.tokens.json +6 -0
  18. package/src/breadcrumb/breadcrumb.css +52 -52
  19. package/src/button/button.css +408 -93
  20. package/src/button/button.tokens.json +13 -0
  21. package/src/button-group/button-group.css +80 -79
  22. package/src/button-group/button-group.tokens.json +1 -0
  23. package/src/calendar/calendar.css +594 -267
  24. package/src/calendar/calendar.tokens.json +35 -3
  25. package/src/card/card.css +133 -70
  26. package/src/card/card.tokens.json +1 -0
  27. package/src/carousel/carousel.css +158 -169
  28. package/src/cascader/cascader.css +174 -159
  29. package/src/cascader/cascader.tokens.json +2 -0
  30. package/src/chart/chart.css +300 -271
  31. package/src/chart/chart.tokens.json +5 -0
  32. package/src/checkbox/checkbox.css +190 -148
  33. package/src/checkbox/checkbox.tokens.json +4 -0
  34. package/src/checkbox-group/checkbox-group.css +7 -7
  35. package/src/clock/clock.css +246 -0
  36. package/src/clock/clock.tokens.json +44 -0
  37. package/src/code-block/code-block.css +85 -89
  38. package/src/collapsible/collapsible.css +273 -85
  39. package/src/collapsible/collapsible.tokens.json +6 -0
  40. package/src/color-picker/color-picker.css +106 -114
  41. package/src/column-manager/column-manager.css +111 -119
  42. package/src/combobox/combobox.css +219 -132
  43. package/src/combobox/combobox.tokens.json +4 -0
  44. package/src/command-palette/command-palette.css +214 -102
  45. package/src/command-palette/command-palette.tokens.json +4 -0
  46. package/src/container/container.css +27 -27
  47. package/src/context-menu/context-menu.css +9 -9
  48. package/src/currency-field/currency-field.css +119 -119
  49. package/src/currency-field/currency-field.tokens.json +1 -0
  50. package/src/dashboard-grid/dashboard-grid.css +231 -115
  51. package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
  52. package/src/data-grid/data-grid.css +637 -496
  53. package/src/data-grid/data-grid.tokens.json +5 -1
  54. package/src/data-list/data-list.css +93 -76
  55. package/src/data-list/data-list.tokens.json +2 -1
  56. package/src/date-field/date-field.css +62 -57
  57. package/src/date-field/date-field.tokens.json +1 -0
  58. package/src/date-picker/date-picker.css +31 -269
  59. package/src/date-picker/date-picker.tokens.json +1 -21
  60. package/src/date-range-picker/date-range-picker.css +72 -528
  61. package/src/date-range-picker/date-range-picker.tokens.json +1 -37
  62. package/src/datetime-field/datetime-field.css +90 -90
  63. package/src/datetime-field/datetime-field.tokens.json +1 -0
  64. package/src/datetime-picker/datetime-picker.css +49 -711
  65. package/src/datetime-picker/datetime-picker.tokens.json +1 -50
  66. package/src/datetime-range-picker/datetime-range-picker.css +60 -985
  67. package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
  68. package/src/description-list/description-list.css +120 -76
  69. package/src/description-list/description-list.tokens.json +1 -0
  70. package/src/detail-panel/detail-panel.css +86 -71
  71. package/src/detail-panel/detail-panel.tokens.json +2 -0
  72. package/src/dialog/dialog.css +462 -199
  73. package/src/dialog/dialog.tokens.json +10 -0
  74. package/src/divider/divider.css +20 -20
  75. package/src/drawer/drawer.css +736 -237
  76. package/src/drawer/drawer.tokens.json +15 -0
  77. package/src/entity-picker/entity-picker.css +402 -272
  78. package/src/entity-picker/entity-picker.tokens.json +6 -0
  79. package/src/event-calendar/event-calendar.css +357 -399
  80. package/src/field/field.css +106 -93
  81. package/src/field/field.tokens.json +2 -0
  82. package/src/field-group/field-group.css +58 -38
  83. package/src/field-group/field-group.tokens.json +3 -0
  84. package/src/filter-bar/filter-bar.css +224 -216
  85. package/src/floating-panel/floating-panel.css +147 -0
  86. package/src/floating-panel/floating-panel.tokens.json +32 -0
  87. package/src/form/form.css +103 -26
  88. package/src/form/form.tokens.json +6 -1
  89. package/src/fullscreen/fullscreen.css +26 -27
  90. package/src/grid/grid.css +32 -31
  91. package/src/highlight/highlight.css +11 -11
  92. package/src/hover-card/hover-card.css +9 -9
  93. package/src/icon/icon.css +67 -20
  94. package/src/icon/icon.tokens.json +1 -0
  95. package/src/image/image.css +42 -42
  96. package/src/import-export-center/import-export-center.css +147 -168
  97. package/src/import-export-center/import-export-center.tokens.json +1 -0
  98. package/src/inline/inline.css +29 -29
  99. package/src/inline-message/inline-message.css +162 -86
  100. package/src/inline-message/inline-message.tokens.json +5 -0
  101. package/src/kbd/kbd.css +63 -51
  102. package/src/kbd/kbd.tokens.json +4 -0
  103. package/src/link/link.css +54 -33
  104. package/src/link/link.tokens.json +4 -0
  105. package/src/list/list.css +55 -24
  106. package/src/list/list.tokens.json +2 -0
  107. package/src/list-item/list-item.css +195 -80
  108. package/src/list-item/list-item.tokens.json +10 -0
  109. package/src/listbox/listbox.css +121 -72
  110. package/src/listbox/listbox.tokens.json +6 -1
  111. package/src/loading-overlay/loading-overlay.css +86 -103
  112. package/src/markdown/markdown.css +20 -20
  113. package/src/media-viewer/media-viewer.css +790 -0
  114. package/src/media-viewer/media-viewer.tokens.json +53 -0
  115. package/src/menu/menu.css +166 -83
  116. package/src/menu/menu.tokens.json +3 -1
  117. package/src/menubar/menubar.css +16 -16
  118. package/src/message/message.css +1296 -1243
  119. package/src/message/message.tokens.json +14 -0
  120. package/src/message-scroller/message-scroller.css +323 -320
  121. package/src/meter/meter.css +136 -0
  122. package/src/meter/meter.tokens.json +23 -0
  123. package/src/multi-select/multi-select.css +246 -174
  124. package/src/multi-select/multi-select.tokens.json +3 -0
  125. package/src/navigation-menu/navigation-menu.css +170 -191
  126. package/src/navigation-menu/navigation-menu.tokens.json +1 -0
  127. package/src/notification-center/notification-center.css +155 -163
  128. package/src/notification-center/notification-center.tokens.json +4 -0
  129. package/src/number-field/number-field.css +93 -93
  130. package/src/number-field/number-field.tokens.json +1 -0
  131. package/src/otp-input/otp-input.css +74 -64
  132. package/src/otp-input/otp-input.tokens.json +1 -0
  133. package/src/page/page.css +109 -31
  134. package/src/page/page.tokens.json +8 -0
  135. package/src/page-header/page-header.css +342 -287
  136. package/src/page-header/page-header.tokens.json +6 -1
  137. package/src/pagination/pagination.css +75 -79
  138. package/src/picker-panel/picker-panel.css +1074 -0
  139. package/src/picker-panel/picker-panel.tokens.json +77 -0
  140. package/src/popover/popover.css +85 -65
  141. package/src/popover/popover.tokens.json +2 -0
  142. package/src/progress-indicator/progress-indicator.css +194 -137
  143. package/src/progress-indicator/progress-indicator.tokens.json +1 -0
  144. package/src/prompt-composer/prompt-composer.css +274 -116
  145. package/src/prompt-composer/prompt-composer.tokens.json +15 -0
  146. package/src/prose/prose.css +77 -82
  147. package/src/radio-group/radio-group.css +107 -112
  148. package/src/rating/rating.css +147 -143
  149. package/src/rating/rating.tokens.json +2 -0
  150. package/src/result-state/result-state.css +95 -102
  151. package/src/result-state/result-state.tokens.json +1 -0
  152. package/src/runtime-properties.mjs +44 -6
  153. package/src/saved-views/saved-views.css +43 -49
  154. package/src/scroll-area/scroll-area.css +50 -37
  155. package/src/section/section.css +311 -46
  156. package/src/section/section.tokens.json +13 -1
  157. package/src/segmented-control/segmented-control.css +221 -133
  158. package/src/segmented-control/segmented-control.tokens.json +7 -11
  159. package/src/select/select.css +226 -149
  160. package/src/select/select.tokens.json +4 -0
  161. package/src/side-navigation/side-navigation.css +204 -201
  162. package/src/side-navigation/side-navigation.tokens.json +2 -0
  163. package/src/skeleton/skeleton.css +76 -58
  164. package/src/slider/slider.css +108 -104
  165. package/src/slider/slider.tokens.json +1 -0
  166. package/src/sparkline/sparkline.css +75 -53
  167. package/src/sparkline/sparkline.tokens.json +2 -0
  168. package/src/spinner/spinner.css +83 -180
  169. package/src/spinner/spinner.tokens.json +0 -1
  170. package/src/split-button/split-button.css +34 -35
  171. package/src/split-button/split-button.tokens.json +1 -0
  172. package/src/splitter/splitter.css +47 -48
  173. package/src/stack/stack.css +26 -26
  174. package/src/stat-card/stat-card.css +420 -245
  175. package/src/stat-card/stat-card.tokens.json +8 -0
  176. package/src/status-indicator/status-indicator.css +126 -101
  177. package/src/status-indicator/status-indicator.tokens.json +0 -3
  178. package/src/stepper/stepper.css +78 -82
  179. package/src/switch/switch.css +143 -125
  180. package/src/switch/switch.tokens.json +4 -0
  181. package/src/table/table.css +653 -222
  182. package/src/table/table.tokens.json +10 -0
  183. package/src/table-of-contents/table-of-contents.css +60 -59
  184. package/src/table-of-contents/table-of-contents.tokens.json +1 -0
  185. package/src/tabs/tabs.css +327 -294
  186. package/src/tabs/tabs.tokens.json +7 -1
  187. package/src/tag/tag.css +113 -89
  188. package/src/tag/tag.tokens.json +11 -0
  189. package/src/tags-input/tags-input.css +152 -87
  190. package/src/tags-input/tags-input.tokens.json +7 -1
  191. package/src/text-field/text-field.css +146 -148
  192. package/src/text-field/text-field.tokens.json +1 -0
  193. package/src/textarea/textarea.css +38 -33
  194. package/src/textarea/textarea.tokens.json +1 -0
  195. package/src/time-field/time-field.css +82 -77
  196. package/src/time-field/time-field.tokens.json +1 -0
  197. package/src/time-picker/time-picker.css +30 -519
  198. package/src/time-picker/time-picker.tokens.json +1 -38
  199. package/src/time-range-picker/time-range-picker.css +53 -895
  200. package/src/time-range-picker/time-range-picker.tokens.json +1 -66
  201. package/src/timeline/timeline.css +280 -292
  202. package/src/timeline/timeline.tokens.json +5 -0
  203. package/src/toast/toast.css +139 -122
  204. package/src/toast/toast.tokens.json +7 -0
  205. package/src/toggle/toggle.css +34 -38
  206. package/src/toggle-group/toggle-group.css +73 -77
  207. package/src/toolbar/toolbar.css +49 -40
  208. package/src/toolbar/toolbar.tokens.json +2 -1
  209. package/src/tooltip/tooltip.css +95 -39
  210. package/src/tooltip/tooltip.tokens.json +1 -0
  211. package/src/top-navigation/top-navigation.css +253 -269
  212. package/src/top-navigation/top-navigation.tokens.json +1 -0
  213. package/src/tour/tour.css +68 -74
  214. package/src/tour/tour.tokens.json +1 -0
  215. package/src/transfer/transfer.css +164 -168
  216. package/src/tree/tree.css +118 -122
  217. package/src/typography/typography.css +67 -38
  218. package/src/typography/typography.tokens.json +2 -0
  219. package/src/upload/upload.css +256 -257
  220. package/src/visually-hidden/visually-hidden.css +1 -1
  221. package/src/wizard/wizard.css +187 -199
@@ -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='dialog'] {
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(--slotted-dialog-measure, 32rem);
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='dialog'][inert] {
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='dialog']:not([data-modal]) {
187
+ [data-ui-dialog]:not([data-modal]) {
176
188
  pointer-events: none;
177
189
  }
178
190
 
179
- [data-ui='dialog']:not([data-modal]) > [data-part='backdrop'] {
191
+ [data-ui-dialog]:not([data-modal]) > [data-part-backdrop] {
180
192
  visibility: hidden;
181
193
  }
182
194
 
183
- [data-ui='dialog']:not([data-modal]) > [data-part='viewport'] > [data-part='content'] {
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='dialog'][data-size='sm'] {
188
- --_measure: var(--slotted-dialog-measure, 24rem);
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='dialog'][data-size='lg'] {
197
- --_measure: var(--slotted-dialog-measure, 42rem);
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='dialog'][data-size='xl'] {
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='dialog'][data-size='full'] {
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 colours, where it becomes an opaque ground.
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='dialog'] > [data-part='backdrop'] {
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,21 +250,48 @@
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='dialog'][data-open] > [data-part='backdrop'] {
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
  }
245
257
 
258
+ /**
259
+ * A theme filters the page under a modal layer with
260
+ * `--slotted-dialog-scrim-backdrop-filter`, `none` unless set. A filter makes
261
+ * the scrim a stacking context, which its place in the document would paint
262
+ * over the panel, so it stands at the bottom of the layer's own. It comes and
263
+ * goes with the scrim's opacity.
264
+ */
265
+ [data-ui-dialog][data-modal] > [data-part-backdrop] {
266
+ transition-property:
267
+ opacity,
268
+ -webkit-backdrop-filter,
269
+ backdrop-filter;
270
+ z-index: -1;
271
+ }
272
+
273
+ [data-ui-dialog][data-modal][data-open] > [data-part-backdrop] {
274
+ -webkit-backdrop-filter: var(--slotted-dialog-scrim-backdrop-filter, none);
275
+ backdrop-filter: var(--slotted-dialog-scrim-backdrop-filter, none);
276
+ }
277
+
278
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
279
+ [data-ui-dialog][data-modal][data-open] > [data-part-backdrop] {
280
+ -webkit-backdrop-filter: none;
281
+ backdrop-filter: none;
282
+ }
283
+ }
284
+
246
285
  /* ── The box the panel sits in ────────────────────────────────────────── */
247
286
 
248
287
  /**
249
- * `safe center` rather than `center`. A panel taller than the layer, centred
288
+ * `safe center` rather than `center`. A panel taller than the layer, centerd
250
289
  * by the unsafe keyword, overflows equally at both ends — and the end that
251
290
  * carries the title is the one that leaves the screen. `safe` aligns to the
252
291
  * start edge as soon as the item cannot fit, which is the only reading that
253
292
  * keeps the title reachable at 200% zoom and in a short window.
254
293
  */
255
- [data-ui='dialog'] > [data-part='viewport'] {
294
+ [data-ui-dialog] > [data-part-viewport] {
256
295
  grid-area: 1 / 1;
257
296
  display: grid;
258
297
  grid-template-columns: minmax(0, 1fr);
@@ -272,7 +311,7 @@
272
311
  overscroll-behavior: contain;
273
312
  }
274
313
 
275
- [data-ui='dialog'][data-placement='top'] > [data-part='viewport'] {
314
+ [data-ui-dialog][data-placement='top'] > [data-part-viewport] {
276
315
  align-content: safe start;
277
316
  }
278
317
 
@@ -284,7 +323,7 @@
284
323
  */
285
324
  /* ── The panel ────────────────────────────────────────────────────────── */
286
325
 
287
- [data-ui='dialog'] > [data-part='viewport'] > [data-part='content'] {
326
+ [data-ui-dialog] > [data-part-viewport] > [data-part-content] {
288
327
  /**
289
328
  * The inset the rows carry, stated where a layout of the consumer's own can
290
329
  * read it: the panel draws no padding, so content written straight inside
@@ -317,7 +356,7 @@
317
356
  * `#1c1c20` panel, a jump of eighty-five per channel, and it read as a
318
357
  * drawn stroke around every dialog.
319
358
  *
320
- * Forced colours is where an edge does have to carry the separation, since
359
+ * Forced colors is where an edge does have to carry the separation, since
321
360
  * `--slotted-scrim` becomes an opaque `Canvas` there and every shadow token
322
361
  * becomes `none`. The rule at the end of this file is that case, and it
323
362
  * thickens the border to say so.
@@ -345,7 +384,7 @@
345
384
  * frame it is between two of them: measured, eleven of the twelve frames
346
385
  * of the movement landed on a fractional position — 32.305, 32.973,
347
386
  * 33.326 — and the reader sees the words lose their edges and get them
348
- * back. A centred panel has nothing for the movement to be *from* either,
387
+ * back. A centerd panel has nothing for the movement to be *from* either,
349
388
  * which is what the first draft of this rule said before the travel was
350
389
  * written into it.
351
390
  *
@@ -356,6 +395,21 @@
356
395
  */
357
396
  opacity: 0;
358
397
  transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
398
+
399
+ /**
400
+ * A theme draws the panel as a material with a surface that has alpha and
401
+ * this filter, `none` unless set. The panel's own fade keeps the filter
402
+ * drawn; an ancestor's opacity below one is what removes it.
403
+ */
404
+ -webkit-backdrop-filter: var(--slotted-dialog-backdrop-filter, none);
405
+ backdrop-filter: var(--slotted-dialog-backdrop-filter, none);
406
+ }
407
+
408
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
409
+ [data-ui-dialog] > [data-part-viewport] > [data-part-content] {
410
+ -webkit-backdrop-filter: none;
411
+ backdrop-filter: none;
412
+ }
359
413
  }
360
414
 
361
415
  /**
@@ -368,7 +422,7 @@
368
422
  * the edge it sits on, and it is on the same rule now for the same reason:
369
423
  * the type inside it is what the slide was resampling (DG4).
370
424
  */
371
- [data-ui='dialog'][data-open] > [data-part='viewport'] > [data-part='content'] {
425
+ [data-ui-dialog][data-open] > [data-part-viewport] > [data-part-content] {
372
426
  opacity: 1;
373
427
  transition: opacity var(--slotted-duration-long) var(--slotted-easing-standard);
374
428
  }
@@ -382,10 +436,20 @@
382
436
  * travelling, and there is no travel to stop (DG4).
383
437
  */
384
438
 
385
- [data-ui='dialog'][data-scroll='viewport'] > [data-part='viewport'] > [data-part='content'] {
439
+ [data-ui-dialog][data-scroll='viewport'] > [data-part-viewport] > [data-part-content] {
386
440
  max-block-size: none;
387
441
  }
388
442
 
443
+ /**
444
+ * A form written around the header, the body and the footer, so Enter in
445
+ * any field and the footer's submit belong to one form. It draws no box:
446
+ * its children are the panel's rows, and every rule of a part is written a
447
+ * second time through it, so the parts keep the panel's inset and rows.
448
+ */
449
+ [data-ui-dialog] > [data-part-viewport] > [data-part-content] > form {
450
+ display: contents;
451
+ }
452
+
389
453
  /* ── The header ───────────────────────────────────────────────────────── */
390
454
 
391
455
  /**
@@ -409,7 +473,8 @@
409
473
  * `interpolate-size`. The cost is a rule over a footer that sometimes has
410
474
  * nothing above it to separate.
411
475
  */
412
- [data-ui='dialog'] > [data-part='viewport'] > [data-part='content'] > [data-part='header'] {
476
+ [data-ui-dialog] > [data-part-viewport] > [data-part-content] > form > [data-part-header],
477
+ [data-ui-dialog] > [data-part-viewport] > [data-part-content] > [data-part-header] {
413
478
  display: grid;
414
479
  grid-template-columns: auto minmax(0, 1fr) auto auto;
415
480
  align-items: start;
@@ -434,21 +499,33 @@
434
499
  * where the mark would have gone, and moved as soon as a tone was set. Where
435
500
  * it goes is now a rule rather than an accident of the grid.
436
501
  */
437
- [data-ui='dialog']
438
- > [data-part='viewport']
439
- > [data-part='content']
440
- > [data-part='header']
502
+ [data-ui-dialog]
503
+ > [data-part-viewport]
504
+ > [data-part-content]
505
+ > form
506
+ > [data-part-header]
507
+ > *:not(
508
+ [data-part-icon],
509
+ [data-part-title],
510
+ [data-part-description],
511
+ [data-part-fullscreen],
512
+ [data-part-close]
513
+ ),
514
+ [data-ui-dialog]
515
+ > [data-part-viewport]
516
+ > [data-part-content]
517
+ > [data-part-header]
441
518
  > *:not(
442
- [data-part='icon'],
443
- [data-part='title'],
444
- [data-part='description'],
445
- [data-part='fullscreen'],
446
- [data-part='close']
519
+ [data-part-icon],
520
+ [data-part-title],
521
+ [data-part-description],
522
+ [data-part-fullscreen],
523
+ [data-part-close]
447
524
  ) {
448
525
  grid-column: 2;
449
526
  /**
450
527
  * `start`, not the grid's own `stretch`. A badge stretched across the words
451
- * column paints its ground the full width and centres its label in it,
528
+ * column paints its ground the full width and centers its label in it,
452
529
  * which is what the first capture showed. The five placed parts are excluded
453
530
  * by name rather than by `:not([data-part])`, because what a consumer puts
454
531
  * here is usually another family and that carries a `data-part` of its own.
@@ -460,17 +537,23 @@
460
537
 
461
538
  /**
462
539
  * Real geometry: the binding draws the tone's own `Glyph` inside an `icon`
463
- * box, and the slot gives it the tone's text colour and the mark's size.
464
- * WCAG 2.2 SC 1.4.1 asks that colour not be the only carrier, and a
540
+ * box, and the slot gives it the tone's text color and the mark's size.
541
+ * WCAG 2.2 SC 1.4.1 asks that color not be the only carrier, and a
465
542
  * destructive confirmation is the place that matters most: under forced
466
- * colours every tone becomes one system colour and the silhouette is all
543
+ * colors every tone becomes one system color and the silhouette is all
467
544
  * that is left.
468
545
  */
469
- [data-ui='dialog']
470
- > [data-part='viewport']
471
- > [data-part='content']
472
- > [data-part='header']
473
- > [data-part='icon'] {
546
+ [data-ui-dialog]
547
+ > [data-part-viewport]
548
+ > [data-part-content]
549
+ > form
550
+ > [data-part-header]
551
+ > [data-part-icon],
552
+ [data-ui-dialog]
553
+ > [data-part-viewport]
554
+ > [data-part-content]
555
+ > [data-part-header]
556
+ > [data-part-icon] {
474
557
  --slotted-icon-size: var(--_status-size);
475
558
 
476
559
  grid-column: 1;
@@ -491,88 +574,118 @@
491
574
  margin-inline-end: var(--_mark-gap);
492
575
  }
493
576
 
494
- [data-ui='dialog'][data-tone='accent'] {
577
+ [data-ui-dialog][data-tone='accent'] {
495
578
  --_tone-color: var(--slotted-tone-accent-text, CanvasText);
496
579
  }
497
580
 
498
- [data-ui='dialog'][data-tone='secondary'] {
581
+ [data-ui-dialog][data-tone='secondary'] {
499
582
  --_tone-color: var(--slotted-tone-secondary-text, CanvasText);
500
583
  }
501
584
 
502
- [data-ui='dialog'][data-tone='success'] {
585
+ [data-ui-dialog][data-tone='success'] {
503
586
  --_tone-color: var(--slotted-tone-success-text, CanvasText);
504
587
  }
505
588
 
506
- [data-ui='dialog'][data-tone='warning'] {
589
+ [data-ui-dialog][data-tone='info'] {
590
+ --_tone-color: var(--slotted-tone-info-text, CanvasText);
591
+ }
592
+
593
+ [data-ui-dialog][data-tone='warning'] {
507
594
  --_tone-color: var(--slotted-tone-warning-text, CanvasText);
508
595
  }
509
596
 
510
- [data-ui='dialog'][data-tone='danger'] {
597
+ [data-ui-dialog][data-tone='danger'] {
511
598
  --_tone-color: var(--slotted-tone-danger-text, CanvasText);
512
599
  }
513
600
 
514
601
  /* ── The words ────────────────────────────────────────────────────────── */
515
602
 
516
603
  /**
517
- * `overflow-wrap: anywhere` and a zero minimum are the pair that answer a
518
- * hostile string. A ninety-character unbroken token in a title widens the
519
- * panel past the layer, and the panel is centred, so both of its edges leave
520
- * the screen at once.
604
+ * The header places the title and the description; their type is theirs
605
+ * wherever they sit in the panel. A plain panel puts them in a bar of its
606
+ * own, and matched only as the header's children they kept the user agent's
607
+ * heading size and margins there. The scope ends at another family's root,
608
+ * so a card's title inside the body keeps the card's type; a title or a
609
+ * description drawn by another family's element stays the dialog's.
521
610
  */
522
- [data-ui='dialog']
523
- > [data-part='viewport']
524
- > [data-part='content']
525
- > [data-part='header']
526
- > [data-part='title'] {
611
+ [data-ui-dialog]
612
+ > [data-part-viewport]
613
+ > [data-part-content]
614
+ > form
615
+ > [data-part-header]
616
+ > [data-part-title],
617
+ [data-ui-dialog]
618
+ > [data-part-viewport]
619
+ > [data-part-content]
620
+ > [data-part-header]
621
+ > [data-part-title] {
527
622
  grid-column: 2;
528
623
  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
624
  }
544
625
 
545
- [data-ui='dialog']
546
- > [data-part='viewport']
547
- > [data-part='content']
548
- > [data-part='header']
549
- > [data-part='description'] {
626
+ [data-ui-dialog]
627
+ > [data-part-viewport]
628
+ > [data-part-content]
629
+ > form
630
+ > [data-part-header]
631
+ > [data-part-description],
632
+ [data-ui-dialog]
633
+ > [data-part-viewport]
634
+ > [data-part-content]
635
+ > [data-part-header]
636
+ > [data-part-description] {
550
637
  grid-column: 2;
551
638
  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
639
  }
559
640
 
560
641
  /**
561
- * The name of the thing the dialog acts on. A confirmation says which
562
- * project or which member it removes, and a consumer marks that name with
563
- * `strong`; left to the user agent it was bold in the muted colour, heavier
564
- * than the title and no easier to find. It takes the title's colour and
565
- * weight instead, which is what both product confirmations in the survey do
566
- * with a span of their own.
642
+ * `overflow-wrap: anywhere` and a zero minimum are the pair that answer a
643
+ * hostile string. A ninety-character unbroken token in a title widens the
644
+ * panel past the layer, and the panel is centerd, so both of its edges leave
645
+ * the screen at once.
567
646
  */
568
- [data-ui='dialog']
569
- > [data-part='viewport']
570
- > [data-part='content']
571
- > [data-part='header']
572
- > [data-part='description']
573
- :is(strong, b) {
574
- font-weight: var(--slotted-font-weight-semibold, 600);
575
- color: var(--slotted-dialog-title-color, var(--slotted-text, CanvasText));
647
+ @scope ([data-ui-dialog] > [data-part-viewport] > [data-part-content]) to ([data-ui]:not(
648
+ [data-part-title],
649
+ [data-part-description]
650
+ )) {
651
+ :scope [data-part-title] {
652
+ margin: 0;
653
+ min-inline-size: 0;
654
+ overflow-wrap: anywhere;
655
+ font-family: var(
656
+ --slotted-dialog-title-font-family,
657
+ var(
658
+ --slotted-font-family-heading,
659
+ var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif)
660
+ )
661
+ );
662
+ font-size: var(--_title-font-size);
663
+ font-weight: var(--slotted-font-weight-semibold, 600);
664
+ line-height: var(--_title-line-height);
665
+ color: var(--slotted-dialog-title-color, var(--slotted-text, CanvasText));
666
+ }
667
+
668
+ :scope [data-part-description] {
669
+ margin: 0;
670
+ min-inline-size: 0;
671
+ overflow-wrap: anywhere;
672
+ font-size: var(--_description-font-size);
673
+ line-height: var(--slotted-line-height-md, 1.5);
674
+ color: var(--slotted-dialog-description-color, var(--slotted-text-muted, GrayText));
675
+ }
676
+
677
+ /**
678
+ * The name of the thing the dialog acts on. A confirmation says which
679
+ * project or which member it removes, and a consumer marks that name with
680
+ * `strong`; left to the user agent it was bold in the muted color, heavier
681
+ * than the title and no easier to find. It takes the title's color and
682
+ * weight instead, which is what both product confirmations in the survey do
683
+ * with a span of their own.
684
+ */
685
+ :scope [data-part-description] :is(strong, b) {
686
+ font-weight: var(--slotted-font-weight-semibold, 600);
687
+ color: var(--slotted-dialog-title-color, var(--slotted-text, CanvasText));
688
+ }
576
689
  }
577
690
 
578
691
  /* ── The close button ─────────────────────────────────────────────────── */
@@ -580,16 +693,22 @@
580
693
  /**
581
694
  * An inner control, not a button (R2): the box is the glyph plus a step of
582
695
  * air on each side, floored at the WCAG 2.2 minimum, and the glyph is
583
- * centred in it. It was the control height before, a thirty-four pixel
696
+ * centerd in it. It was the control height before, a thirty-four pixel
584
697
  * square beside an eighteen pixel mark. The glyph is the binding's `Glyph`
585
698
  * in an `icon` box, sized here through the icon token so the box and the
586
699
  * formula above read one length.
587
700
  */
588
- [data-ui='dialog']
589
- > [data-part='viewport']
590
- > [data-part='content']
591
- > [data-part='header']
592
- > [data-part='close'] {
701
+ [data-ui-dialog]
702
+ > [data-part-viewport]
703
+ > [data-part-content]
704
+ > form
705
+ > [data-part-header]
706
+ > [data-part-close],
707
+ [data-ui-dialog]
708
+ > [data-part-viewport]
709
+ > [data-part-content]
710
+ > [data-part-header]
711
+ > [data-part-close] {
593
712
  --slotted-icon-size: var(--_icon-size);
594
713
 
595
714
  grid-column: 4;
@@ -617,11 +736,17 @@
617
736
  var(--slotted-control-transition-easing, var(--slotted-easing-standard));
618
737
  }
619
738
 
620
- [data-ui='dialog']
621
- > [data-part='viewport']
622
- > [data-part='content']
623
- > [data-part='header']
624
- > [data-part='close']:not(:disabled):hover {
739
+ [data-ui-dialog]
740
+ > [data-part-viewport]
741
+ > [data-part-content]
742
+ > form
743
+ > [data-part-header]
744
+ > [data-part-close]:not(:disabled):hover,
745
+ [data-ui-dialog]
746
+ > [data-part-viewport]
747
+ > [data-part-content]
748
+ > [data-part-header]
749
+ > [data-part-close]:not(:disabled):hover {
625
750
  /* The ground moves under the pointer and nothing else does (R2). */
626
751
  background-color: var(
627
752
  --slotted-dialog-close-hover-background,
@@ -629,22 +754,34 @@
629
754
  );
630
755
  }
631
756
 
632
- [data-ui='dialog']
633
- > [data-part='viewport']
634
- > [data-part='content']
635
- > [data-part='header']
636
- > [data-part='close']:not(:disabled):active {
757
+ [data-ui-dialog]
758
+ > [data-part-viewport]
759
+ > [data-part-content]
760
+ > form
761
+ > [data-part-header]
762
+ > [data-part-close]:not(:disabled):active,
763
+ [data-ui-dialog]
764
+ > [data-part-viewport]
765
+ > [data-part-content]
766
+ > [data-part-header]
767
+ > [data-part-close]:not(:disabled):active {
637
768
  background-color: var(
638
769
  --slotted-dialog-close-active-background,
639
770
  var(--slotted-tone-secondary-subtle-active)
640
771
  );
641
772
  }
642
773
 
643
- [data-ui='dialog']
644
- > [data-part='viewport']
645
- > [data-part='content']
646
- > [data-part='header']
647
- > [data-part='close']:focus-visible {
774
+ [data-ui-dialog]
775
+ > [data-part-viewport]
776
+ > [data-part-content]
777
+ > form
778
+ > [data-part-header]
779
+ > [data-part-close]:focus-visible,
780
+ [data-ui-dialog]
781
+ > [data-part-viewport]
782
+ > [data-part-content]
783
+ > [data-part-header]
784
+ > [data-part-close]:focus-visible {
648
785
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
649
786
  outline-offset: calc(-1 * var(--slotted-focus-ring-offset, 2px));
650
787
  }
@@ -654,7 +791,7 @@
654
791
  /**
655
792
  * The reader's own control for taking the layer, and the same inner control
656
793
  * 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 centred in it. The
794
+ * floored at the WCAG 2.2 minimum, and the glyph is centerd in it. The
658
795
  * geometry is not chosen here — it is `--_close-size`, the one formula this
659
796
  * family already states, so the two controls in the corner are one row of
660
797
  * one size.
@@ -665,11 +802,17 @@
665
802
  * glyph is the binding's, chosen from the state: the mark says what the
666
803
  * press does next, so it is the opposite of the state the panel is in.
667
804
  */
668
- [data-ui='dialog']
669
- > [data-part='viewport']
670
- > [data-part='content']
671
- > [data-part='header']
672
- > [data-part='fullscreen'] {
805
+ [data-ui-dialog]
806
+ > [data-part-viewport]
807
+ > [data-part-content]
808
+ > form
809
+ > [data-part-header]
810
+ > [data-part-fullscreen],
811
+ [data-ui-dialog]
812
+ > [data-part-viewport]
813
+ > [data-part-content]
814
+ > [data-part-header]
815
+ > [data-part-fullscreen] {
673
816
  --slotted-icon-size: var(--_icon-size);
674
817
 
675
818
  grid-column: 3;
@@ -700,20 +843,33 @@
700
843
  * glyph on every side, and a second gap between them would set them further
701
844
  * apart than either is from the words.
702
845
  */
703
- [data-ui='dialog']
704
- > [data-part='viewport']
705
- > [data-part='content']
706
- > [data-part='header']
707
- > [data-part='fullscreen']
708
- + [data-part='close'] {
846
+ [data-ui-dialog]
847
+ > [data-part-viewport]
848
+ > [data-part-content]
849
+ > form
850
+ > [data-part-header]
851
+ > [data-part-fullscreen]
852
+ + [data-part-close],
853
+ [data-ui-dialog]
854
+ > [data-part-viewport]
855
+ > [data-part-content]
856
+ > [data-part-header]
857
+ > [data-part-fullscreen]
858
+ + [data-part-close] {
709
859
  margin-inline-start: 0;
710
860
  }
711
861
 
712
- [data-ui='dialog']
713
- > [data-part='viewport']
714
- > [data-part='content']
715
- > [data-part='header']
716
- > [data-part='fullscreen']:not(:disabled):hover {
862
+ [data-ui-dialog]
863
+ > [data-part-viewport]
864
+ > [data-part-content]
865
+ > form
866
+ > [data-part-header]
867
+ > [data-part-fullscreen]:not(:disabled):hover,
868
+ [data-ui-dialog]
869
+ > [data-part-viewport]
870
+ > [data-part-content]
871
+ > [data-part-header]
872
+ > [data-part-fullscreen]:not(:disabled):hover {
717
873
  /* The ground moves under the pointer and nothing else does (R2). */
718
874
  background-color: var(
719
875
  --slotted-dialog-close-hover-background,
@@ -721,65 +877,102 @@
721
877
  );
722
878
  }
723
879
 
724
- [data-ui='dialog']
725
- > [data-part='viewport']
726
- > [data-part='content']
727
- > [data-part='header']
728
- > [data-part='fullscreen']:not(:disabled):active {
880
+ [data-ui-dialog]
881
+ > [data-part-viewport]
882
+ > [data-part-content]
883
+ > form
884
+ > [data-part-header]
885
+ > [data-part-fullscreen]:not(:disabled):active,
886
+ [data-ui-dialog]
887
+ > [data-part-viewport]
888
+ > [data-part-content]
889
+ > [data-part-header]
890
+ > [data-part-fullscreen]:not(:disabled):active {
729
891
  background-color: var(
730
892
  --slotted-dialog-close-active-background,
731
893
  var(--slotted-tone-secondary-subtle-active)
732
894
  );
733
895
  }
734
896
 
735
- [data-ui='dialog']
736
- > [data-part='viewport']
737
- > [data-part='content']
738
- > [data-part='header']
739
- > [data-part='fullscreen']:focus-visible {
897
+ [data-ui-dialog]
898
+ > [data-part-viewport]
899
+ > [data-part-content]
900
+ > form
901
+ > [data-part-header]
902
+ > [data-part-fullscreen]:focus-visible,
903
+ [data-ui-dialog]
904
+ > [data-part-viewport]
905
+ > [data-part-content]
906
+ > [data-part-header]
907
+ > [data-part-fullscreen]:focus-visible {
740
908
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
741
909
  outline-offset: calc(-1 * var(--slotted-focus-ring-offset, 2px));
742
910
  }
743
911
 
744
912
  /**
745
913
  * 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` centred on each control
914
+ * is the one a mouse sees: a transparent `::before` centerd on each control
747
915
  * reaches 44 pixels, and the ground and the ring stay square. The two
748
916
  * controls touch, so neither reaches across the edge they share.
749
917
  */
750
918
  @media (pointer: coarse) {
751
- [data-ui='dialog']
752
- > [data-part='viewport']
753
- > [data-part='content']
754
- > [data-part='header']
755
- > :is([data-part='close'], [data-part='fullscreen']) {
919
+ [data-ui-dialog]
920
+ > [data-part-viewport]
921
+ > [data-part-content]
922
+ > form
923
+ > [data-part-header]
924
+ > :is([data-part-close], [data-part-fullscreen]),
925
+ [data-ui-dialog]
926
+ > [data-part-viewport]
927
+ > [data-part-content]
928
+ > [data-part-header]
929
+ > :is([data-part-close], [data-part-fullscreen]) {
756
930
  position: relative;
757
931
  }
758
932
 
759
- [data-ui='dialog']
760
- > [data-part='viewport']
761
- > [data-part='content']
762
- > [data-part='header']
763
- > :is([data-part='close'], [data-part='fullscreen'])::before {
933
+ [data-ui-dialog]
934
+ > [data-part-viewport]
935
+ > [data-part-content]
936
+ > form
937
+ > [data-part-header]
938
+ > :is([data-part-close], [data-part-fullscreen])::before,
939
+ [data-ui-dialog]
940
+ > [data-part-viewport]
941
+ > [data-part-content]
942
+ > [data-part-header]
943
+ > :is([data-part-close], [data-part-fullscreen])::before {
764
944
  content: '';
765
945
  inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
766
946
  position: absolute;
767
947
  }
768
948
 
769
- [data-ui='dialog']
770
- > [data-part='viewport']
771
- > [data-part='content']
772
- > [data-part='header']
773
- > [data-part='fullscreen']:has(+ [data-part='close'])::before {
949
+ [data-ui-dialog]
950
+ > [data-part-viewport]
951
+ > [data-part-content]
952
+ > form
953
+ > [data-part-header]
954
+ > [data-part-fullscreen]:has(+ [data-part-close])::before,
955
+ [data-ui-dialog]
956
+ > [data-part-viewport]
957
+ > [data-part-content]
958
+ > [data-part-header]
959
+ > [data-part-fullscreen]:has(+ [data-part-close])::before {
774
960
  inset-inline-end: 0;
775
961
  }
776
962
 
777
- [data-ui='dialog']
778
- > [data-part='viewport']
779
- > [data-part='content']
780
- > [data-part='header']
781
- > [data-part='fullscreen']
782
- + [data-part='close']::before {
963
+ [data-ui-dialog]
964
+ > [data-part-viewport]
965
+ > [data-part-content]
966
+ > form
967
+ > [data-part-header]
968
+ > [data-part-fullscreen]
969
+ + [data-part-close]::before,
970
+ [data-ui-dialog]
971
+ > [data-part-viewport]
972
+ > [data-part-content]
973
+ > [data-part-header]
974
+ > [data-part-fullscreen]
975
+ + [data-part-close]::before {
783
976
  inset-inline-start: 0;
784
977
  }
785
978
  }
@@ -792,15 +985,23 @@
792
985
  * `dismissable-layer` covers the modal case; this covers the non-modal one,
793
986
  * where the page behind is not locked at all.
794
987
  */
795
- [data-ui='dialog']
796
- > [data-part='viewport']
797
- > [data-part='content']
798
- > [data-part='body']:not(:first-child) {
988
+ [data-ui-dialog]
989
+ > [data-part-viewport]
990
+ > [data-part-content]
991
+ > form
992
+ > [data-part-body]:not(:first-child),
993
+ [data-ui-dialog]
994
+ > [data-part-viewport]
995
+ > [data-part-content]
996
+ > [data-part-body]:not(:first-child) {
799
997
  border-block-start: var(--_rule-size) solid
800
998
  var(--slotted-dialog-rule-color, var(--slotted-border-subtle, ButtonBorder));
801
999
  }
802
1000
 
803
- [data-ui='dialog'] > [data-part='viewport'] > [data-part='content'] > [data-part='body'] {
1001
+ [data-ui-dialog] > [data-part-viewport] > [data-part-content] > form > [data-part-body],
1002
+ [data-ui-dialog] > [data-part-viewport] > [data-part-content] > [data-part-body] {
1003
+ /* The row that stretches, with or without a header above it. */
1004
+ grid-row: 2;
804
1005
  min-block-size: 0;
805
1006
  overflow-x: hidden;
806
1007
  overflow-y: auto;
@@ -814,10 +1015,15 @@
814
1015
  color: var(--slotted-dialog-body-color, var(--slotted-text, CanvasText));
815
1016
  }
816
1017
 
817
- [data-ui='dialog'][data-scroll='viewport']
818
- > [data-part='viewport']
819
- > [data-part='content']
820
- > [data-part='body'] {
1018
+ [data-ui-dialog][data-scroll='viewport']
1019
+ > [data-part-viewport]
1020
+ > [data-part-content]
1021
+ > form
1022
+ > [data-part-body],
1023
+ [data-ui-dialog][data-scroll='viewport']
1024
+ > [data-part-viewport]
1025
+ > [data-part-content]
1026
+ > [data-part-body] {
821
1027
  overflow: visible;
822
1028
  }
823
1029
 
@@ -828,10 +1034,12 @@
828
1034
  * header, the close button and Escape all stay operable: a loading dialog a
829
1035
  * reader cannot leave is the worse failure of the two.
830
1036
  */
831
- [data-ui='dialog'][data-loading]
832
- > [data-part='viewport']
833
- > [data-part='content']
834
- > [data-part='body'] {
1037
+ [data-ui-dialog][data-loading]
1038
+ > [data-part-viewport]
1039
+ > [data-part-content]
1040
+ > form
1041
+ > [data-part-body],
1042
+ [data-ui-dialog][data-loading] > [data-part-viewport] > [data-part-content] > [data-part-body] {
835
1043
  min-block-size: var(--slotted-space-12, 4rem);
836
1044
  }
837
1045
 
@@ -843,21 +1051,29 @@
843
1051
  * reason `content` is bounded — an unbounded panel pushes it past the fold,
844
1052
  * which is the whole failure the three-row grid exists to prevent.
845
1053
  */
846
- [data-ui='dialog'] > [data-part='viewport'] > [data-part='content'] > [data-part='footer'] {
1054
+ [data-ui-dialog] > [data-part-viewport] > [data-part-content] > form > [data-part-footer],
1055
+ [data-ui-dialog] > [data-part-viewport] > [data-part-content] > [data-part-footer] {
1056
+ /* The last row, with or without a body above it: without one it took the row that stretches. */
1057
+ grid-row: 3;
847
1058
  display: flex;
848
1059
  flex-wrap: wrap;
849
1060
  align-items: center;
850
1061
  justify-content: flex-end;
851
- gap: var(--_gap);
1062
+ gap: var(--slotted-dialog-footer-gap, var(--slotted-action-gap, 8px));
852
1063
  padding-block: var(--_footer-padding-block);
853
1064
  padding-inline: var(--_padding-inline);
854
1065
  background: var(--slotted-dialog-footer-surface, var(--slotted-surface-sunken, Canvas));
855
1066
  }
856
1067
 
857
- [data-ui='dialog']
858
- > [data-part='viewport']
859
- > [data-part='content']
860
- > [data-part='footer']:not(:first-child) {
1068
+ [data-ui-dialog]
1069
+ > [data-part-viewport]
1070
+ > [data-part-content]
1071
+ > form
1072
+ > [data-part-footer]:not(:first-child),
1073
+ [data-ui-dialog]
1074
+ > [data-part-viewport]
1075
+ > [data-part-content]
1076
+ > [data-part-footer]:not(:first-child) {
861
1077
  border-block-start: var(--_rule-size) solid
862
1078
  var(--slotted-dialog-rule-color, var(--slotted-border-subtle, ButtonBorder));
863
1079
  }
@@ -885,7 +1101,7 @@
885
1101
  * writes their own three-row grid, which is the whole of what they are taking
886
1102
  * over.
887
1103
  */
888
- [data-ui='dialog'][data-surface='plain'] > [data-part='viewport'] > [data-part='content'] {
1104
+ [data-ui-dialog][data-surface='plain'] > [data-part-viewport] > [data-part-content] {
889
1105
  display: block;
890
1106
  background: none;
891
1107
  border: 0;
@@ -894,10 +1110,38 @@
894
1110
  overflow: visible;
895
1111
  }
896
1112
 
897
- [data-ui='dialog'][data-surface='plain']
898
- > [data-part='viewport']
899
- > [data-part='content']
900
- > :is([data-part='header'], [data-part='body'], [data-part='footer']) {
1113
+ /**
1114
+ * The children fade in the panel's place, at the panel's durations. A plain
1115
+ * panel paints nothing, so the picture is the same; what changes is that no
1116
+ * ancestor of a child's material is below full opacity, which in Chromium
1117
+ * would draw no backdrop filter until the fade ended — a command palette
1118
+ * drawn as a material showed the page sharp behind it for the whole fade.
1119
+ */
1120
+ [data-ui-dialog][data-surface='plain'] > [data-part-viewport] > [data-part-content] {
1121
+ opacity: 1;
1122
+ transition: none;
1123
+ }
1124
+ [data-ui-dialog][data-surface='plain'] > [data-part-viewport] > [data-part-content] > * {
1125
+ opacity: 0;
1126
+ transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
1127
+ }
1128
+ [data-ui-dialog][data-surface='plain'][data-open]
1129
+ > [data-part-viewport]
1130
+ > [data-part-content]
1131
+ > * {
1132
+ opacity: 1;
1133
+ transition: opacity var(--slotted-duration-long) var(--slotted-easing-standard);
1134
+ }
1135
+
1136
+ [data-ui-dialog][data-surface='plain']
1137
+ > [data-part-viewport]
1138
+ > [data-part-content]
1139
+ > form
1140
+ > :is([data-part-header], [data-part-body], [data-part-footer]),
1141
+ [data-ui-dialog][data-surface='plain']
1142
+ > [data-part-viewport]
1143
+ > [data-part-content]
1144
+ > :is([data-part-header], [data-part-body], [data-part-footer]) {
901
1145
  background: none;
902
1146
  border: 0;
903
1147
  padding: 0;
@@ -922,16 +1166,18 @@
922
1166
  * a literal because `@container (max-inline-size: var(--x))` is invalid CSS.
923
1167
  */
924
1168
  @container slotted-dialog (max-inline-size: 30rem) {
925
- [data-ui='dialog'][data-full-screen='narrow'] > [data-part='viewport'] {
1169
+ [data-ui-dialog][data-full-screen='narrow'] > [data-part-viewport] {
926
1170
  align-content: stretch;
927
1171
  padding: 0;
928
1172
  }
929
1173
 
930
- [data-ui='dialog'][data-full-screen='narrow'] > [data-part='viewport'] > [data-part='content'] {
1174
+ [data-ui-dialog][data-full-screen='narrow'] > [data-part-viewport] > [data-part-content] {
931
1175
  max-inline-size: none;
932
1176
  block-size: 100%;
933
1177
  border-radius: 0;
934
1178
  border: 0;
1179
+ box-sizing: border-box;
1180
+ padding-block-end: var(--slotted-keyboard-inset, 0px);
935
1181
  }
936
1182
  }
937
1183
 
@@ -943,14 +1189,21 @@
943
1189
  * owns both — a panel that animated its own box would animate `inset`,
944
1190
  * `inline-size` and `block-size`, which is the rule R7 exists to state.
945
1191
  */
946
- [data-ui='dialog'][data-full-screen='always'] > [data-part='viewport'],
947
- [data-ui='dialog'][data-fullscreen] > [data-part='viewport'] {
1192
+ /*
1193
+ * The row is the layer's height, not the content's. An `auto` row grew with
1194
+ * a plain panel's content, so a viewer whose zoomed picture was taller than
1195
+ * the window took the layer past the window with it, and the layer changed
1196
+ * size at every step of the zoom.
1197
+ */
1198
+ [data-ui-dialog][data-full-screen='always'] > [data-part-viewport],
1199
+ [data-ui-dialog][data-fullscreen] > [data-part-viewport] {
948
1200
  align-content: stretch;
1201
+ grid-template-rows: minmax(0, 1fr);
949
1202
  padding: 0;
950
1203
  }
951
1204
 
952
- [data-ui='dialog'][data-full-screen='always'] > [data-part='viewport'] > [data-part='content'],
953
- [data-ui='dialog'][data-fullscreen] > [data-part='viewport'] > [data-part='content'] {
1205
+ [data-ui-dialog][data-full-screen='always'] > [data-part-viewport] > [data-part-content],
1206
+ [data-ui-dialog][data-fullscreen] > [data-part-viewport] > [data-part-content] {
954
1207
  max-inline-size: none;
955
1208
  block-size: 100%;
956
1209
  border-radius: 0;
@@ -961,9 +1214,19 @@
961
1214
  * layer, which on a phone is a stray line under the browser chrome.
962
1215
  */
963
1216
  border: 0;
1217
+ /**
1218
+ * The virtual keyboard. `observeKeyboardInset` in `@slotted/core/measure`
1219
+ * measures what the keyboard covers, the binding writes it on the open
1220
+ * layer, and the panel's rows end above the keys: a full-screen panel is
1221
+ * the layout viewport's height, and the keyboard shrinks only the visual
1222
+ * one. Nought under `interactive-widget=resizes-content`, whose layout
1223
+ * already shrank.
1224
+ */
1225
+ box-sizing: border-box;
1226
+ padding-block-end: var(--slotted-keyboard-inset, 0px);
964
1227
  }
965
1228
 
966
- /* ── Forced colours ───────────────────────────────────────────────────── */
1229
+ /* ── Forced colors ───────────────────────────────────────────────────── */
967
1230
 
968
1231
  /**
969
1232
  * The theme remaps every token this family reads, so the only rule here is
@@ -973,7 +1236,7 @@
973
1236
  * a system border is read at.
974
1237
  */
975
1238
  @media (forced-colors: active) {
976
- [data-ui='dialog'] > [data-part='viewport'] > [data-part='content'] {
1239
+ [data-ui-dialog] > [data-part-viewport] > [data-part-content] {
977
1240
  border-color: CanvasText;
978
1241
  border-width: var(--slotted-border-width-thick, 2px);
979
1242
  }