@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.
Files changed (205) hide show
  1. package/package.json +13 -1
  2. package/src/accordion/accordion.css +11 -11
  3. package/src/action-bar/action-bar.css +47 -44
  4. package/src/action-bar/action-bar.tokens.json +1 -0
  5. package/src/action-sheet/action-sheet.css +39 -39
  6. package/src/alert/alert.css +97 -97
  7. package/src/alert/alert.tokens.json +6 -1
  8. package/src/app-shell/app-shell.css +456 -329
  9. package/src/app-shell/app-shell.tokens.json +6 -3
  10. package/src/aspect-ratio/aspect-ratio.css +9 -9
  11. package/src/attachment/attachment.css +118 -114
  12. package/src/avatar/avatar.css +96 -66
  13. package/src/avatar/avatar.tokens.json +7 -0
  14. package/src/avatar-group/avatar-group.css +22 -23
  15. package/src/badge/badge.css +54 -46
  16. package/src/badge/badge.tokens.json +5 -0
  17. package/src/breadcrumb/breadcrumb.css +52 -52
  18. package/src/button/button.css +137 -89
  19. package/src/button/button.tokens.json +5 -0
  20. package/src/button-group/button-group.css +80 -79
  21. package/src/button-group/button-group.tokens.json +1 -0
  22. package/src/calendar/calendar.css +139 -109
  23. package/src/calendar/calendar.tokens.json +5 -1
  24. package/src/card/card.css +70 -67
  25. package/src/card/card.tokens.json +1 -0
  26. package/src/carousel/carousel.css +158 -169
  27. package/src/cascader/cascader.css +161 -159
  28. package/src/cascader/cascader.tokens.json +2 -0
  29. package/src/chart/chart.css +288 -267
  30. package/src/chart/chart.tokens.json +4 -0
  31. package/src/checkbox/checkbox.css +143 -148
  32. package/src/checkbox-group/checkbox-group.css +7 -7
  33. package/src/code-block/code-block.css +85 -89
  34. package/src/collapsible/collapsible.css +81 -80
  35. package/src/collapsible/collapsible.tokens.json +1 -0
  36. package/src/color-picker/color-picker.css +106 -114
  37. package/src/column-manager/column-manager.css +111 -119
  38. package/src/combobox/combobox.css +206 -132
  39. package/src/combobox/combobox.tokens.json +4 -0
  40. package/src/command-palette/command-palette.css +155 -102
  41. package/src/command-palette/command-palette.tokens.json +2 -0
  42. package/src/container/container.css +27 -27
  43. package/src/context-menu/context-menu.css +9 -9
  44. package/src/currency-field/currency-field.css +119 -119
  45. package/src/currency-field/currency-field.tokens.json +1 -0
  46. package/src/dashboard-grid/dashboard-grid.css +204 -115
  47. package/src/data-grid/data-grid.css +598 -496
  48. package/src/data-grid/data-grid.tokens.json +5 -1
  49. package/src/data-list/data-list.css +82 -71
  50. package/src/data-list/data-list.tokens.json +2 -1
  51. package/src/date-field/date-field.css +62 -57
  52. package/src/date-field/date-field.tokens.json +1 -0
  53. package/src/date-picker/date-picker.css +117 -58
  54. package/src/date-picker/date-picker.tokens.json +5 -0
  55. package/src/date-range-picker/date-range-picker.css +157 -127
  56. package/src/date-range-picker/date-range-picker.tokens.json +4 -0
  57. package/src/datetime-field/datetime-field.css +90 -90
  58. package/src/datetime-field/datetime-field.tokens.json +1 -0
  59. package/src/datetime-picker/datetime-picker.css +123 -70
  60. package/src/datetime-picker/datetime-picker.tokens.json +4 -1
  61. package/src/datetime-range-picker/datetime-range-picker.css +191 -163
  62. package/src/datetime-range-picker/datetime-range-picker.tokens.json +4 -0
  63. package/src/description-list/description-list.css +105 -75
  64. package/src/description-list/description-list.tokens.json +1 -0
  65. package/src/detail-panel/detail-panel.css +86 -71
  66. package/src/detail-panel/detail-panel.tokens.json +2 -0
  67. package/src/dialog/dialog.css +435 -199
  68. package/src/dialog/dialog.tokens.json +9 -0
  69. package/src/divider/divider.css +20 -20
  70. package/src/drawer/drawer.css +598 -237
  71. package/src/drawer/drawer.tokens.json +14 -0
  72. package/src/entity-picker/entity-picker.css +326 -272
  73. package/src/entity-picker/entity-picker.tokens.json +4 -0
  74. package/src/event-calendar/event-calendar.css +357 -399
  75. package/src/field/field.css +106 -93
  76. package/src/field/field.tokens.json +2 -0
  77. package/src/field-group/field-group.css +43 -33
  78. package/src/field-group/field-group.tokens.json +3 -0
  79. package/src/filter-bar/filter-bar.css +200 -216
  80. package/src/form/form.css +100 -26
  81. package/src/form/form.tokens.json +6 -1
  82. package/src/fullscreen/fullscreen.css +26 -27
  83. package/src/grid/grid.css +29 -29
  84. package/src/highlight/highlight.css +11 -11
  85. package/src/hover-card/hover-card.css +9 -9
  86. package/src/icon/icon.css +67 -20
  87. package/src/icon/icon.tokens.json +1 -0
  88. package/src/image/image.css +42 -42
  89. package/src/import-export-center/import-export-center.css +147 -168
  90. package/src/import-export-center/import-export-center.tokens.json +1 -0
  91. package/src/inline/inline.css +28 -28
  92. package/src/inline-message/inline-message.css +162 -86
  93. package/src/inline-message/inline-message.tokens.json +4 -0
  94. package/src/kbd/kbd.css +62 -50
  95. package/src/kbd/kbd.tokens.json +3 -0
  96. package/src/link/link.css +54 -33
  97. package/src/link/link.tokens.json +4 -0
  98. package/src/list/list.css +23 -23
  99. package/src/list-item/list-item.css +89 -75
  100. package/src/list-item/list-item.tokens.json +7 -0
  101. package/src/listbox/listbox.css +71 -70
  102. package/src/listbox/listbox.tokens.json +0 -1
  103. package/src/loading-overlay/loading-overlay.css +86 -103
  104. package/src/markdown/markdown.css +20 -20
  105. package/src/media-viewer/media-viewer.css +790 -0
  106. package/src/media-viewer/media-viewer.tokens.json +53 -0
  107. package/src/menu/menu.css +166 -83
  108. package/src/menu/menu.tokens.json +3 -1
  109. package/src/menubar/menubar.css +16 -16
  110. package/src/message/message.css +1253 -1246
  111. package/src/message/message.tokens.json +5 -0
  112. package/src/message-scroller/message-scroller.css +323 -320
  113. package/src/multi-select/multi-select.css +233 -174
  114. package/src/multi-select/multi-select.tokens.json +3 -0
  115. package/src/navigation-menu/navigation-menu.css +170 -191
  116. package/src/navigation-menu/navigation-menu.tokens.json +1 -0
  117. package/src/notification-center/notification-center.css +155 -163
  118. package/src/notification-center/notification-center.tokens.json +4 -0
  119. package/src/number-field/number-field.css +93 -93
  120. package/src/number-field/number-field.tokens.json +1 -0
  121. package/src/otp-input/otp-input.css +74 -64
  122. package/src/otp-input/otp-input.tokens.json +1 -0
  123. package/src/page/page.css +41 -27
  124. package/src/page/page.tokens.json +1 -0
  125. package/src/page-header/page-header.css +342 -287
  126. package/src/page-header/page-header.tokens.json +6 -1
  127. package/src/pagination/pagination.css +75 -79
  128. package/src/popover/popover.css +85 -65
  129. package/src/popover/popover.tokens.json +2 -0
  130. package/src/progress-indicator/progress-indicator.css +192 -136
  131. package/src/progress-indicator/progress-indicator.tokens.json +1 -0
  132. package/src/prompt-composer/prompt-composer.css +260 -113
  133. package/src/prompt-composer/prompt-composer.tokens.json +15 -0
  134. package/src/prose/prose.css +77 -82
  135. package/src/radio-group/radio-group.css +107 -112
  136. package/src/rating/rating.css +146 -142
  137. package/src/rating/rating.tokens.json +1 -0
  138. package/src/result-state/result-state.css +95 -102
  139. package/src/result-state/result-state.tokens.json +1 -0
  140. package/src/runtime-properties.mjs +19 -6
  141. package/src/saved-views/saved-views.css +43 -49
  142. package/src/scroll-area/scroll-area.css +50 -37
  143. package/src/section/section.css +179 -44
  144. package/src/section/section.tokens.json +9 -3
  145. package/src/segmented-control/segmented-control.css +210 -133
  146. package/src/segmented-control/segmented-control.tokens.json +7 -11
  147. package/src/select/select.css +213 -149
  148. package/src/select/select.tokens.json +4 -0
  149. package/src/side-navigation/side-navigation.css +201 -198
  150. package/src/side-navigation/side-navigation.tokens.json +1 -0
  151. package/src/skeleton/skeleton.css +57 -58
  152. package/src/slider/slider.css +101 -103
  153. package/src/sparkline/sparkline.css +75 -53
  154. package/src/sparkline/sparkline.tokens.json +2 -0
  155. package/src/spinner/spinner.css +83 -180
  156. package/src/spinner/spinner.tokens.json +0 -1
  157. package/src/split-button/split-button.css +34 -35
  158. package/src/split-button/split-button.tokens.json +1 -0
  159. package/src/splitter/splitter.css +47 -48
  160. package/src/stack/stack.css +25 -25
  161. package/src/stat-card/stat-card.css +415 -245
  162. package/src/stat-card/stat-card.tokens.json +8 -0
  163. package/src/status-indicator/status-indicator.css +124 -100
  164. package/src/status-indicator/status-indicator.tokens.json +0 -3
  165. package/src/stepper/stepper.css +78 -82
  166. package/src/switch/switch.css +100 -106
  167. package/src/table/table.css +270 -198
  168. package/src/table/table.tokens.json +2 -0
  169. package/src/table-of-contents/table-of-contents.css +60 -59
  170. package/src/table-of-contents/table-of-contents.tokens.json +1 -0
  171. package/src/tabs/tabs.css +327 -294
  172. package/src/tabs/tabs.tokens.json +7 -1
  173. package/src/tag/tag.css +109 -88
  174. package/src/tag/tag.tokens.json +10 -0
  175. package/src/tags-input/tags-input.css +152 -87
  176. package/src/tags-input/tags-input.tokens.json +7 -1
  177. package/src/text-field/text-field.css +146 -148
  178. package/src/text-field/text-field.tokens.json +1 -0
  179. package/src/textarea/textarea.css +38 -33
  180. package/src/textarea/textarea.tokens.json +1 -0
  181. package/src/time-field/time-field.css +82 -77
  182. package/src/time-field/time-field.tokens.json +1 -0
  183. package/src/time-picker/time-picker.css +116 -64
  184. package/src/time-picker/time-picker.tokens.json +4 -1
  185. package/src/time-range-picker/time-range-picker.css +168 -140
  186. package/src/time-range-picker/time-range-picker.tokens.json +4 -0
  187. package/src/timeline/timeline.css +280 -292
  188. package/src/timeline/timeline.tokens.json +5 -0
  189. package/src/toast/toast.css +139 -122
  190. package/src/toast/toast.tokens.json +7 -0
  191. package/src/toggle/toggle.css +34 -38
  192. package/src/toggle-group/toggle-group.css +73 -77
  193. package/src/toolbar/toolbar.css +33 -38
  194. package/src/tooltip/tooltip.css +65 -39
  195. package/src/tooltip/tooltip.tokens.json +1 -0
  196. package/src/top-navigation/top-navigation.css +252 -268
  197. package/src/tour/tour.css +68 -74
  198. package/src/tour/tour.tokens.json +1 -0
  199. package/src/transfer/transfer.css +164 -168
  200. package/src/tree/tree.css +113 -121
  201. package/src/typography/typography.css +42 -38
  202. package/src/typography/typography.tokens.json +1 -0
  203. package/src/upload/upload.css +256 -257
  204. package/src/visually-hidden/visually-hidden.css +1 -1
  205. package/src/wizard/wizard.css +187 -199
package/src/card/card.css CHANGED
@@ -13,7 +13,7 @@
13
13
  * The root does not clip. Media rounds the corners it touches and clips
14
14
  * itself, so an overlay opened inside a card is not cut off by the card.
15
15
  */
16
- [data-ui='card'] {
16
+ [data-ui-card] {
17
17
  --_card-edge-width: var(--slotted-card-border-width, var(--slotted-border-width-thin, 1px));
18
18
  --_card-radius: var(--slotted-card-radius, var(--slotted-radius-lg, 8px));
19
19
  --_card-inset-block: var(--slotted-card-padding-block, var(--slotted-space-6, 1rem));
@@ -99,7 +99,7 @@
99
99
  * it survives `forced-colors`, where a shadow is removed outright, and it
100
100
  * changes width without moving a pixel of content because it is out of flow.
101
101
  */
102
- [data-ui='card']::before {
102
+ [data-ui-card]::before {
103
103
  border: var(--_card-edge-width) solid var(--_card-edge);
104
104
  border-radius: inherit;
105
105
  content: '';
@@ -112,13 +112,13 @@
112
112
  /* Density is the application's choice and governs control geometry; `size`
113
113
  is this card's own inset, so a summary card and a card in a dense list can
114
114
  stand on the same page. */
115
- [data-ui='card'][data-size='sm'] {
115
+ [data-ui-card][data-size='sm'] {
116
116
  --_card-inset-block: var(--slotted-card-padding-block-sm, var(--slotted-space-5, 0.75rem));
117
117
  --_card-inset-inline: var(--slotted-card-padding-inline-sm, var(--slotted-space-5, 0.75rem));
118
118
  --_card-region-gap: var(--slotted-card-region-gap-sm, var(--slotted-space-2, 0.25rem));
119
119
  }
120
120
 
121
- [data-ui='card'][data-size='lg'] {
121
+ [data-ui-card][data-size='lg'] {
122
122
  --_card-inset-block: var(--slotted-card-padding-block-lg, var(--slotted-space-8, 1.5rem));
123
123
  --_card-inset-inline: var(--slotted-card-padding-inline-lg, var(--slotted-space-8, 1.5rem));
124
124
  --_card-region-gap: var(--slotted-card-region-gap-lg, var(--slotted-space-4, 0.5rem));
@@ -133,9 +133,9 @@
133
133
  * not separate on a white page, and `0 1px 3px rgb(0 0 0 / 0.5)` on a
134
134
  * near-black one is invisible, so `elevated` and `outline` were one picture
135
135
  * in both schemes. It keeps its hairline, because a shadow is removed under
136
- * forced colours and an edge is not.
136
+ * forced colors and an edge is not.
137
137
  */
138
- [data-ui='card'][data-fill='elevated'] {
138
+ [data-ui-card][data-fill='elevated'] {
139
139
  --_card-shadow-rest: var(--slotted-card-shadow, var(--slotted-shadow-md));
140
140
  /* The shadow moves and the edge holds still: elevation is what this fill
141
141
  is made of. */
@@ -158,7 +158,7 @@
158
158
  * being a card at all. A hairline that reads as slightly redundant in two
159
159
  * schemes fails more loudly than a card that disappears in the third.
160
160
  */
161
- [data-ui='card'][data-fill='subtle'] {
161
+ [data-ui-card][data-fill='subtle'] {
162
162
  --_card-surface-rest: var(
163
163
  --slotted-card-background-subtle,
164
164
  var(--slotted-surface-sunken, Canvas)
@@ -182,15 +182,15 @@
182
182
 
183
183
  /**
184
184
  * A card is interactive when it holds a destination or a choice. Every state
185
- * below was previously gated on `[data-part='link']` alone, so the chooser —
185
+ * below was previously gated on `[data-part-link]` alone, so the chooser —
186
186
  * a `<label>` around a native input, which is the whole-card selection this
187
187
  * family documents — answered no hover, no press and no ring.
188
188
  *
189
189
  * The two guards are the state precedence: a disabled card does not answer
190
190
  * the pointer, and neither does a card whose only control is disabled.
191
191
  */
192
- [data-ui='card']:not([data-disabled]):has(
193
- :is([data-part='link'], [data-part='selection'] :is(input, button)):not(:disabled)
192
+ [data-ui-card]:not([data-disabled]):has(
193
+ :is([data-part-link], [data-part-selection] :is(input, button)):not(:disabled)
194
194
  ):hover {
195
195
  --_card-surface: var(--_card-surface-hover);
196
196
  --_card-edge: var(--_card-edge-hover);
@@ -208,21 +208,19 @@
208
208
  * not make. Anything a consumer raises above the hit area — `actions`, the
209
209
  * `footer` — sets its own cursor, because it is its own target.
210
210
  */
211
- [data-ui='card']:not([data-disabled]):has(
212
- :is([data-part='link'], [data-part='selection'] :is(input, button)):not(:disabled)
211
+ [data-ui-card]:not([data-disabled]):has(
212
+ :is([data-part-link], [data-part-selection] :is(input, button)):not(:disabled)
213
213
  ) {
214
214
  cursor: pointer;
215
215
  }
216
216
 
217
- [data-ui='card']:not([data-disabled]):has(
218
- [data-part='selection'] :is(input, button):not(:disabled)
219
- )
217
+ [data-ui-card]:not([data-disabled]):has([data-part-selection] :is(input, button):not(:disabled))
220
218
  :where(*) {
221
219
  cursor: inherit;
222
220
  }
223
221
 
224
- [data-ui='card']:not([data-disabled]):has(
225
- :is([data-part='link'], [data-part='selection'] :is(input, button)):not(:disabled)
222
+ [data-ui-card]:not([data-disabled]):has(
223
+ :is([data-part-link], [data-part-selection] :is(input, button)):not(:disabled)
226
224
  ):active {
227
225
  --_card-surface: var(--_card-surface-active);
228
226
  --_card-edge: var(--_card-edge-active);
@@ -235,7 +233,7 @@
235
233
  * nothing instead of leaving its gap behind — the case a three-region layout
236
234
  * usually gets wrong.
237
235
  */
238
- [data-ui='card'] > :is([data-part='header'], [data-part='body'], [data-part='footer']) {
236
+ [data-ui-card] > :is([data-part-header], [data-part-body], [data-part-footer]) {
239
237
  min-inline-size: 0;
240
238
  padding-block: var(--_card-region-gap);
241
239
  padding-inline: var(--_card-inset-inline);
@@ -244,19 +242,16 @@
244
242
  /* A region at either end absorbs the padding its missing neighbour would
245
243
  have carried, so a card of only a body is not visibly tighter than a full
246
244
  one. Media bleeds, so the region next to it counts as an end. */
247
- [data-ui='card']
248
- > :is([data-part='header'], [data-part='body'], [data-part='footer']):first-child,
249
- [data-ui='card']
250
- > [data-part='media']
251
- + :is([data-part='header'], [data-part='body'], [data-part='footer']) {
245
+ [data-ui-card] > :is([data-part-header], [data-part-body], [data-part-footer]):first-child,
246
+ [data-ui-card]
247
+ > [data-part-media]
248
+ + :is([data-part-header], [data-part-body], [data-part-footer]) {
252
249
  padding-block-start: var(--_card-inset-block);
253
250
  }
254
251
 
255
- [data-ui='card'] > :is([data-part='header'], [data-part='body'], [data-part='footer']):last-child,
256
- [data-ui='card']
257
- > :is([data-part='header'], [data-part='body'], [data-part='footer']):has(
258
- + [data-part='media']
259
- ) {
252
+ [data-ui-card] > :is([data-part-header], [data-part-body], [data-part-footer]):last-child,
253
+ [data-ui-card]
254
+ > :is([data-part-header], [data-part-body], [data-part-footer]):has(+ [data-part-media]) {
260
255
  padding-block-end: var(--_card-inset-block);
261
256
  }
262
257
 
@@ -266,7 +261,7 @@
266
261
  * badge, a status, a menu button. Both are Typography and both are the
267
262
  * consumer's, so the header decides only the two distances and the corner.
268
263
  */
269
- [data-ui='card'] > [data-part='header'] {
264
+ [data-ui-card] > [data-part-header] {
270
265
  align-items: start;
271
266
  column-gap: var(--slotted-card-header-column-gap, var(--slotted-space-5, 0.75rem));
272
267
  display: grid;
@@ -274,7 +269,13 @@
274
269
  row-gap: var(--slotted-card-header-gap, var(--slotted-space-2, 0.25rem));
275
270
  }
276
271
 
277
- [data-ui='card'] > [data-part='header'] > * {
272
+ /* A column gap is drawn beside an empty track too, so a header with no corner
273
+ keeps no corner column. */
274
+ [data-ui-card] > [data-part-header]:not(:has(> [data-part-actions])) {
275
+ grid-template-columns: minmax(0, 1fr);
276
+ }
277
+
278
+ [data-ui-card] > [data-part-header] > * {
278
279
  grid-column: 1;
279
280
  min-inline-size: 0;
280
281
  }
@@ -282,14 +283,14 @@
282
283
  /* The corner. It stays on the first row, so a title that wraps to two lines
283
284
  does not drag the badge down with it, and it takes the last column whether
284
285
  the header has two or three. */
285
- [data-ui='card'] > [data-part='header'] > [data-part='actions'] {
286
+ [data-ui-card] > [data-part-header] > [data-part-actions] {
286
287
  align-items: center;
287
288
  display: flex;
288
289
  flex-wrap: wrap;
289
- /* Centred on the title's own row rather than on the row's start edge: a
290
+ /* Centerd on the title's own row rather than on the row's start edge: a
290
291
  badge aligned to the line box sits optically high against cap height. */
291
292
  align-self: center;
292
- gap: var(--slotted-card-actions-gap, var(--slotted-space-3, 0.375rem));
293
+ gap: var(--slotted-card-actions-gap, var(--slotted-action-gap, 8px));
293
294
  grid-column: -2 / -1;
294
295
  grid-row: 1;
295
296
  /* Above the stretched hit area, like the footer: a control in the corner
@@ -307,19 +308,23 @@
307
308
  * Carbon, Fluent and Cloudscape trail only because none of them keeps a
308
309
  * corner in the header.
309
310
  */
310
- [data-ui='card'] > [data-part='header']:has([data-part='selection']) {
311
+ [data-ui-card] > [data-part-header]:has([data-part-selection]) {
311
312
  grid-template-columns: auto minmax(0, 1fr) auto;
312
313
  }
313
314
 
314
- [data-ui='card'] > [data-part='header']:has([data-part='selection']) > * {
315
+ [data-ui-card] > [data-part-header]:has([data-part-selection]):not(:has(> [data-part-actions])) {
316
+ grid-template-columns: auto minmax(0, 1fr);
317
+ }
318
+
319
+ [data-ui-card] > [data-part-header]:has([data-part-selection]) > * {
315
320
  grid-column: 2;
316
321
  }
317
322
 
318
- [data-ui='card'] > [data-part='header'] > [data-part='selection'] {
323
+ [data-ui-card] > [data-part-header] > [data-part-selection] {
319
324
  /**
320
325
  * On the title's first line, not in the middle of its block (C1, the rule
321
326
  * R5 gives every mark beside a title): the slot is one line of the title's
322
- * step tall and centres the control inside it, so a title that wraps to
327
+ * step tall and centers the control inside it, so a title that wraps to
323
328
  * two lines keeps its control beside the first. The step is the large one,
324
329
  * which is the title a card header holds; a header set at another step
325
330
  * retunes the line with the family token.
@@ -359,7 +364,7 @@
359
364
  * is the card: the surface is the `<label>`, so the hit area is the whole
360
365
  * card, which is the correction the token foundation asks a family to make.
361
366
  */
362
- [data-ui='card'] > [data-part='header'] > [data-part='selection'] > :is(input, button) {
367
+ [data-ui-card] > [data-part-header] > [data-part-selection] > :is(input, button) {
363
368
  block-size: var(--slotted-card-selection-size, var(--slotted-selection-size-md, 16px));
364
369
  inline-size: var(--slotted-card-selection-size, var(--slotted-selection-size-md, 16px));
365
370
  margin: 0;
@@ -367,16 +372,16 @@
367
372
 
368
373
  /* Cards stretched to a common height in a grid keep their footers on one
369
374
  line, because the body takes the leftover. */
370
- [data-ui='card'] > [data-part='body'] {
375
+ [data-ui-card] > [data-part-body] {
371
376
  flex: 1 1 auto;
372
377
  min-block-size: 0;
373
378
  }
374
379
 
375
- [data-ui='card'] > [data-part='footer'] {
380
+ [data-ui-card] > [data-part-footer] {
376
381
  align-items: center;
377
382
  display: flex;
378
383
  flex-wrap: wrap;
379
- gap: var(--slotted-card-footer-gap, var(--slotted-space-4, 0.5rem));
384
+ gap: var(--slotted-card-footer-gap, var(--slotted-action-gap, 8px));
380
385
  /* Above the stretched hit area: a secondary action belongs in the footer
381
386
  and has to stay operable while the card resolves to somewhere else. */
382
387
  position: relative;
@@ -388,21 +393,21 @@
388
393
  * region's own, and `inset` on the rule lines it up with the text instead.
389
394
  * The regions on either side keep the distance they already had.
390
395
  */
391
- [data-ui='card'] > [data-ui='divider'] {
396
+ [data-ui-card] > [data-ui-divider] {
392
397
  flex-shrink: 0;
393
398
  }
394
399
 
395
- [data-ui='card'][data-orientation='horizontal'] > [data-ui='divider'] {
400
+ [data-ui-card][data-orientation='horizontal'] > [data-ui-divider] {
396
401
  grid-column: 2;
397
402
  }
398
403
 
399
- [data-ui='card'] > [data-part='media'] {
404
+ [data-ui-card] > [data-part-media] {
400
405
  display: block;
401
406
  min-inline-size: 0;
402
407
  overflow: hidden;
403
408
  }
404
409
 
405
- [data-ui='card'] > [data-part='media'] > :is(img, video, canvas, picture, svg) {
410
+ [data-ui-card] > [data-part-media] > :is(img, video, canvas, picture, svg) {
406
411
  block-size: 100%;
407
412
  display: block;
408
413
  inline-size: 100%;
@@ -411,12 +416,12 @@
411
416
 
412
417
  /* The media rounds the corners it touches and no others. The radius is the
413
418
  card's own, less the edge it sits inside. */
414
- [data-ui='card'] > [data-part='media']:first-child {
419
+ [data-ui-card] > [data-part-media]:first-child {
415
420
  border-start-end-radius: var(--_card-radius);
416
421
  border-start-start-radius: var(--_card-radius);
417
422
  }
418
423
 
419
- [data-ui='card'] > [data-part='media']:last-child {
424
+ [data-ui-card] > [data-part-media]:last-child {
420
425
  border-end-end-radius: var(--_card-radius);
421
426
  border-end-start-radius: var(--_card-radius);
422
427
  }
@@ -427,7 +432,7 @@
427
432
  * three of the second. The fourth row is empty until the card reflows, and
428
433
  * an empty row costs nothing because the rhythm is padding, not a gap.
429
434
  */
430
- [data-ui='card'][data-orientation='horizontal'] {
435
+ [data-ui-card][data-orientation='horizontal'] {
431
436
  container-name: slotted-card;
432
437
  container-type: inline-size;
433
438
  display: grid;
@@ -443,7 +448,7 @@
443
448
  grid-template-rows: repeat(4, auto);
444
449
  }
445
450
 
446
- [data-ui='card'][data-orientation='horizontal'] > [data-part='media'] {
451
+ [data-ui-card][data-orientation='horizontal'] > [data-part-media] {
447
452
  border-end-end-radius: 0;
448
453
  border-end-start-radius: var(--_card-radius);
449
454
  border-start-end-radius: 0;
@@ -451,15 +456,15 @@
451
456
  grid-area: 1 / 1 / -1 / 2;
452
457
  }
453
458
 
454
- [data-ui='card'][data-orientation='horizontal'] > [data-part='header'] {
459
+ [data-ui-card][data-orientation='horizontal'] > [data-part-header] {
455
460
  grid-area: 1 / 2;
456
461
  }
457
462
 
458
- [data-ui='card'][data-orientation='horizontal'] > [data-part='body'] {
463
+ [data-ui-card][data-orientation='horizontal'] > [data-part-body] {
459
464
  grid-area: 2 / 2;
460
465
  }
461
466
 
462
- [data-ui='card'][data-orientation='horizontal'] > [data-part='footer'] {
467
+ [data-ui-card][data-orientation='horizontal'] > [data-part-footer] {
463
468
  grid-area: 3 / 2;
464
469
  }
465
470
 
@@ -470,21 +475,21 @@
470
475
  * a literal because CSS forbids a custom property in a container condition.
471
476
  */
472
477
  @container slotted-card (max-inline-size: 24rem) {
473
- [data-ui='card'][data-orientation='horizontal'] > [data-part='media'] {
478
+ [data-ui-card][data-orientation='horizontal'] > [data-part-media] {
474
479
  border-end-start-radius: 0;
475
480
  border-start-end-radius: var(--_card-radius);
476
481
  grid-area: 1 / 1 / 2 / -1;
477
482
  }
478
483
 
479
- [data-ui='card'][data-orientation='horizontal'] > [data-part='header'] {
484
+ [data-ui-card][data-orientation='horizontal'] > [data-part-header] {
480
485
  grid-area: 2 / 1 / 3 / -1;
481
486
  }
482
487
 
483
- [data-ui='card'][data-orientation='horizontal'] > [data-part='body'] {
488
+ [data-ui-card][data-orientation='horizontal'] > [data-part-body] {
484
489
  grid-area: 3 / 1 / 4 / -1;
485
490
  }
486
491
 
487
- [data-ui='card'][data-orientation='horizontal'] > [data-part='footer'] {
492
+ [data-ui-card][data-orientation='horizontal'] > [data-part-footer] {
488
493
  grid-area: 4 / 1 / 5 / -1;
489
494
  }
490
495
  }
@@ -495,7 +500,7 @@
495
500
  * Enter, the context menu and middle-click are the platform's, and the name
496
501
  * is the title rather than every string in the card.
497
502
  */
498
- [data-ui='card'] [data-part='link']::after {
503
+ [data-ui-card] [data-part-link]::after {
499
504
  content: '';
500
505
  inset: 0;
501
506
  position: absolute;
@@ -506,10 +511,10 @@
506
511
  * inverse surface and sits on the edge. In this theme
507
512
  * `--slotted-focus-ring-color` and `--slotted-tone-accent-border` resolve to
508
513
  * the same hex, so a selected card and a focused card were the same image.
509
- * They now differ in colour, in width and in position.
514
+ * They now differ in color, in width and in position.
510
515
  */
511
- [data-ui='card']:has(
512
- :is([data-part='link'], [data-part='selection'] :is(input, button)):focus-visible
516
+ [data-ui-card]:has(
517
+ :is([data-part-link], [data-part-selection] :is(input, button)):focus-visible
513
518
  ) {
514
519
  outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
515
520
  outline-offset: var(--slotted-focus-ring-offset, 2px);
@@ -525,10 +530,8 @@
525
530
  * surface. Carbon and Fluent avoid the pair by hiding the control outright,
526
531
  * which is not open here — the control is meant to be seen.
527
532
  */
528
- [data-ui='card']:has([data-part='link']) [data-part='link']:focus-visible,
529
- [data-ui='card']:has([data-part='selection'])
530
- [data-part='selection']
531
- :is(input, button):focus-visible {
533
+ [data-ui-card]:has([data-part-link]) [data-part-link]:focus-visible,
534
+ [data-ui-card]:has([data-part-selection]) [data-part-selection] :is(input, button):focus-visible {
532
535
  outline: none;
533
536
  }
534
537
 
@@ -550,7 +553,7 @@
550
553
  * accent's hover and active tints, as a selected row's does, and the edge
551
554
  * holds, because it is already saying the stronger thing.
552
555
  */
553
- [data-ui='card'][data-selected] {
556
+ [data-ui-card][data-selected] {
554
557
  --_card-surface-rest: var(
555
558
  --slotted-card-background-selected,
556
559
  var(--slotted-tone-accent-surface, Canvas)
@@ -583,7 +586,7 @@
583
586
  * mute in every case, and the elevation drops to nothing — a card that cannot
584
587
  * be used does not float above the page.
585
588
  */
586
- [data-ui='card'][data-disabled] {
589
+ [data-ui-card][data-disabled] {
587
590
  --_card-surface: var(--_card-surface-disabled);
588
591
  --_card-edge: var(
589
592
  --slotted-card-border-color-disabled,
@@ -596,7 +599,7 @@
596
599
 
597
600
  /* The card withdraws the hit area it added. Disabling the control itself is
598
601
  the consumer's, because only the control can refuse an interaction. */
599
- [data-ui='card'][data-disabled] [data-part='link']::after {
602
+ [data-ui-card][data-disabled] [data-part-link]::after {
600
603
  display: none;
601
604
  }
602
605
  }
@@ -1,4 +1,5 @@
1
1
  [
2
+ "--slotted-action-gap",
2
3
  "--slotted-border-strong",
3
4
  "--slotted-border-subtle",
4
5
  "--slotted-border-width-thin",