@slotted/styles 0.1.0-beta.2 → 0.1.0-beta.20

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 (191) hide show
  1. package/package.json +1 -1
  2. package/src/accordion/accordion.css +10 -10
  3. package/src/action-bar/action-bar.css +45 -42
  4. package/src/action-bar/action-bar.tokens.json +1 -0
  5. package/src/action-sheet/action-sheet.css +36 -36
  6. package/src/alert/alert.css +68 -67
  7. package/src/alert/alert.tokens.json +5 -0
  8. package/src/app-shell/app-shell.css +452 -314
  9. package/src/app-shell/app-shell.tokens.json +5 -2
  10. package/src/aspect-ratio/aspect-ratio.css +9 -9
  11. package/src/attachment/attachment.css +91 -99
  12. package/src/avatar/avatar.css +71 -41
  13. package/src/avatar/avatar.tokens.json +7 -0
  14. package/src/avatar-group/avatar-group.css +21 -22
  15. package/src/badge/badge.css +45 -37
  16. package/src/badge/badge.tokens.json +5 -0
  17. package/src/breadcrumb/breadcrumb.css +37 -37
  18. package/src/button/button.css +149 -68
  19. package/src/button/button.tokens.json +10 -0
  20. package/src/button-group/button-group.css +79 -74
  21. package/src/button-group/button-group.tokens.json +2 -0
  22. package/src/calendar/calendar.css +133 -103
  23. package/src/calendar/calendar.tokens.json +5 -1
  24. package/src/card/card.css +54 -61
  25. package/src/carousel/carousel.css +150 -161
  26. package/src/cascader/cascader.css +152 -153
  27. package/src/cascader/cascader.tokens.json +1 -0
  28. package/src/chart/chart.css +258 -248
  29. package/src/chart/chart.tokens.json +1 -0
  30. package/src/checkbox/checkbox.css +119 -124
  31. package/src/checkbox-group/checkbox-group.css +7 -7
  32. package/src/code-block/code-block.css +81 -85
  33. package/src/collapsible/collapsible.css +72 -76
  34. package/src/color-picker/color-picker.css +83 -91
  35. package/src/column-manager/column-manager.css +106 -114
  36. package/src/combobox/combobox.css +155 -124
  37. package/src/combobox/combobox.tokens.json +2 -0
  38. package/src/command-palette/command-palette.css +103 -90
  39. package/src/command-palette/command-palette.tokens.json +1 -0
  40. package/src/container/container.css +24 -24
  41. package/src/context-menu/context-menu.css +8 -8
  42. package/src/currency-field/currency-field.css +210 -88
  43. package/src/currency-field/currency-field.tokens.json +13 -0
  44. package/src/dashboard-grid/dashboard-grid.css +184 -114
  45. package/src/data-grid/data-grid.css +535 -470
  46. package/src/data-grid/data-grid.tokens.json +4 -0
  47. package/src/data-list/data-list.css +81 -70
  48. package/src/data-list/data-list.tokens.json +2 -1
  49. package/src/date-field/date-field.css +55 -52
  50. package/src/date-field/date-field.tokens.json +1 -0
  51. package/src/date-picker/date-picker.css +75 -59
  52. package/src/date-picker/date-picker.tokens.json +1 -0
  53. package/src/date-range-picker/date-range-picker.css +114 -118
  54. package/src/datetime-field/datetime-field.css +78 -80
  55. package/src/datetime-field/datetime-field.tokens.json +1 -0
  56. package/src/datetime-picker/datetime-picker.css +61 -63
  57. package/src/datetime-range-picker/datetime-range-picker.css +149 -156
  58. package/src/description-list/description-list.css +80 -65
  59. package/src/detail-panel/detail-panel.css +86 -71
  60. package/src/detail-panel/detail-panel.tokens.json +2 -0
  61. package/src/dialog/dialog.css +376 -153
  62. package/src/dialog/dialog.tokens.json +6 -0
  63. package/src/divider/divider.css +18 -18
  64. package/src/drawer/drawer.css +513 -217
  65. package/src/drawer/drawer.tokens.json +6 -0
  66. package/src/entity-picker/entity-picker.css +271 -256
  67. package/src/entity-picker/entity-picker.tokens.json +2 -0
  68. package/src/event-calendar/event-calendar.css +343 -385
  69. package/src/field/field.css +74 -78
  70. package/src/field-group/field-group.css +22 -25
  71. package/src/filter-bar/filter-bar.css +193 -209
  72. package/src/form/form.css +34 -24
  73. package/src/form/form.tokens.json +1 -0
  74. package/src/fullscreen/fullscreen.css +24 -25
  75. package/src/grid/grid.css +28 -28
  76. package/src/highlight/highlight.css +6 -6
  77. package/src/hover-card/hover-card.css +6 -6
  78. package/src/icon/icon.css +62 -15
  79. package/src/icon/icon.tokens.json +1 -0
  80. package/src/image/image.css +39 -39
  81. package/src/import-export-center/import-export-center.css +135 -156
  82. package/src/inline/inline.css +27 -27
  83. package/src/inline-message/inline-message.css +153 -77
  84. package/src/inline-message/inline-message.tokens.json +4 -0
  85. package/src/kbd/kbd.css +48 -36
  86. package/src/kbd/kbd.tokens.json +3 -0
  87. package/src/link/link.css +36 -15
  88. package/src/link/link.tokens.json +4 -0
  89. package/src/list/list.css +44 -17
  90. package/src/list/list.tokens.json +4 -0
  91. package/src/list-item/list-item.css +80 -66
  92. package/src/list-item/list-item.tokens.json +7 -0
  93. package/src/listbox/listbox.css +56 -59
  94. package/src/loading-overlay/loading-overlay.css +75 -92
  95. package/src/markdown/markdown.css +17 -17
  96. package/src/menu/menu.css +117 -74
  97. package/src/menu/menu.tokens.json +1 -0
  98. package/src/menubar/menubar.css +13 -13
  99. package/src/message/message.css +192 -202
  100. package/src/message/message.tokens.json +5 -0
  101. package/src/message-scroller/message-scroller.css +41 -42
  102. package/src/multi-select/multi-select.css +175 -160
  103. package/src/multi-select/multi-select.tokens.json +1 -0
  104. package/src/navigation-menu/navigation-menu.css +167 -188
  105. package/src/notification-center/notification-center.css +140 -148
  106. package/src/notification-center/notification-center.tokens.json +3 -0
  107. package/src/number-field/number-field.css +81 -83
  108. package/src/number-field/number-field.tokens.json +1 -0
  109. package/src/otp-input/otp-input.css +67 -57
  110. package/src/otp-input/otp-input.tokens.json +1 -0
  111. package/src/page/page.css +39 -23
  112. package/src/page/page.tokens.json +1 -0
  113. package/src/page-header/page-header.css +339 -284
  114. package/src/page-header/page-header.tokens.json +5 -0
  115. package/src/pagination/pagination.css +68 -72
  116. package/src/popover/popover.css +73 -61
  117. package/src/popover/popover.tokens.json +1 -0
  118. package/src/progress-indicator/progress-indicator.css +169 -113
  119. package/src/progress-indicator/progress-indicator.tokens.json +1 -0
  120. package/src/prompt-composer/prompt-composer.css +251 -104
  121. package/src/prompt-composer/prompt-composer.tokens.json +15 -0
  122. package/src/prose/prose.css +71 -75
  123. package/src/radio-group/radio-group.css +98 -103
  124. package/src/rating/rating.css +136 -132
  125. package/src/rating/rating.tokens.json +1 -0
  126. package/src/result-state/result-state.css +74 -77
  127. package/src/runtime-properties.mjs +2 -0
  128. package/src/saved-views/saved-views.css +41 -47
  129. package/src/scroll-area/scroll-area.css +39 -32
  130. package/src/section/section.css +178 -43
  131. package/src/section/section.tokens.json +8 -2
  132. package/src/segmented-control/segmented-control.css +254 -97
  133. package/src/segmented-control/segmented-control.tokens.json +15 -11
  134. package/src/select/select.css +154 -133
  135. package/src/select/select.tokens.json +2 -0
  136. package/src/side-navigation/side-navigation.css +179 -182
  137. package/src/side-navigation/side-navigation.tokens.json +1 -0
  138. package/src/skeleton/skeleton.css +47 -48
  139. package/src/slider/slider.css +86 -88
  140. package/src/sparkline/sparkline.css +62 -40
  141. package/src/sparkline/sparkline.tokens.json +2 -0
  142. package/src/spinner/spinner.css +83 -180
  143. package/src/spinner/spinner.tokens.json +0 -1
  144. package/src/split-button/split-button.css +30 -31
  145. package/src/split-button/split-button.tokens.json +1 -0
  146. package/src/splitter/splitter.css +35 -35
  147. package/src/stack/stack.css +24 -24
  148. package/src/stat-card/stat-card.css +380 -241
  149. package/src/stat-card/stat-card.tokens.json +5 -0
  150. package/src/status-indicator/status-indicator.css +107 -82
  151. package/src/status-indicator/status-indicator.tokens.json +0 -3
  152. package/src/stepper/stepper.css +58 -62
  153. package/src/switch/switch.css +86 -92
  154. package/src/table/table.css +340 -175
  155. package/src/table/table.tokens.json +6 -0
  156. package/src/table-of-contents/table-of-contents.css +57 -56
  157. package/src/table-of-contents/table-of-contents.tokens.json +1 -0
  158. package/src/tabs/tabs.css +322 -289
  159. package/src/tabs/tabs.tokens.json +7 -1
  160. package/src/tag/tag.css +79 -71
  161. package/src/tag/tag.tokens.json +9 -0
  162. package/src/tags-input/tags-input.css +145 -82
  163. package/src/tags-input/tags-input.tokens.json +7 -1
  164. package/src/text-field/text-field.css +132 -136
  165. package/src/text-field/text-field.tokens.json +1 -0
  166. package/src/textarea/textarea.css +31 -28
  167. package/src/textarea/textarea.tokens.json +1 -0
  168. package/src/time-field/time-field.css +72 -69
  169. package/src/time-field/time-field.tokens.json +1 -0
  170. package/src/time-picker/time-picker.css +56 -58
  171. package/src/time-range-picker/time-range-picker.css +126 -133
  172. package/src/timeline/timeline.css +254 -266
  173. package/src/timeline/timeline.tokens.json +5 -0
  174. package/src/toast/toast.css +115 -98
  175. package/src/toast/toast.tokens.json +6 -0
  176. package/src/toggle/toggle.css +62 -25
  177. package/src/toggle/toggle.tokens.json +8 -0
  178. package/src/toggle-group/toggle-group.css +106 -60
  179. package/src/toggle-group/toggle-group.tokens.json +10 -0
  180. package/src/toolbar/toolbar.css +30 -35
  181. package/src/tooltip/tooltip.css +59 -38
  182. package/src/tooltip/tooltip.tokens.json +1 -0
  183. package/src/top-navigation/top-navigation.css +243 -259
  184. package/src/tour/tour.css +51 -60
  185. package/src/transfer/transfer.css +160 -164
  186. package/src/tree/tree.css +103 -111
  187. package/src/typography/typography.css +40 -36
  188. package/src/typography/typography.tokens.json +1 -0
  189. package/src/upload/upload.css +224 -224
  190. package/src/visually-hidden/visually-hidden.css +1 -1
  191. package/src/wizard/wizard.css +185 -197
@@ -10,7 +10,7 @@
10
10
  * in: a container cannot change its own tracks
11
11
  * (`docs/build-briefing.md`, _Decisions already taken_).
12
12
  */
13
- [data-ui='stat-card'] {
13
+ [data-ui-stat-card] {
14
14
  --_edge-width: var(--slotted-stat-card-border-width, var(--slotted-border-width-thin, 1px));
15
15
  --_radius: var(--slotted-stat-card-radius, var(--slotted-radius-lg, 8px));
16
16
  --_inset-block: var(--slotted-stat-card-padding-block, var(--slotted-space-6, 1rem));
@@ -28,6 +28,13 @@
28
28
  --slotted-stat-card-trend-inline-size,
29
29
  calc(var(--slotted-space-12, 4rem) * 1.5)
30
30
  );
31
+ /* The trend's height when it takes the last row and the card's whole
32
+ width: one step above the sparkline's own, because a line as wide as
33
+ the card at the sparkline's height reads flat. */
34
+ --_trend-block: var(--slotted-stat-card-trend-block-size, var(--slotted-space-11, 3rem));
35
+ /* The least height of a trend beside the figure, which otherwise takes
36
+ the figure's height: the sparkline's own step. */
37
+ --_trend-floor: var(--slotted-sparkline-block-size, var(--slotted-space-9, 2rem));
31
38
 
32
39
  --_surface: var(--slotted-stat-card-background, var(--slotted-surface-raised, Canvas));
33
40
  --_edge: var(--slotted-stat-card-border-color, var(--slotted-border-subtle, ButtonBorder));
@@ -87,7 +94,7 @@
87
94
  }
88
95
 
89
96
  /* The edge, out of flow, so a frame that changes width moves no text. */
90
- [data-ui='stat-card']::before {
97
+ [data-ui-stat-card]::before {
91
98
  border: var(--_edge-width) solid var(--_edge);
92
99
  border-radius: inherit;
93
100
  content: '';
@@ -96,12 +103,14 @@
96
103
  position: absolute;
97
104
  }
98
105
 
99
- [data-ui='stat-card'][data-size='sm'] {
106
+ [data-ui-stat-card][data-size='sm'] {
100
107
  --_inset-block: var(--slotted-stat-card-padding-block-sm, var(--slotted-space-5, 0.75rem));
101
108
  --_inset-inline: var(--slotted-stat-card-padding-inline-sm, var(--slotted-space-5, 0.75rem));
102
109
  --_region-gap: var(--slotted-stat-card-region-gap-sm, var(--slotted-space-2, 0.25rem));
103
110
  --_trend-gap: var(--slotted-stat-card-trend-gap-sm, var(--slotted-space-5, 0.75rem));
104
111
  --_trend-size: var(--slotted-stat-card-trend-inline-size-sm, var(--slotted-space-12, 4rem));
112
+ --_trend-block: var(--slotted-stat-card-trend-block-size-sm, var(--slotted-space-9, 2rem));
113
+ --_trend-floor: var(--slotted-sparkline-block-size-sm, var(--slotted-space-7, 1.25rem));
105
114
  --_value-size: var(
106
115
  --slotted-stat-card-value-font-size-sm,
107
116
  var(--slotted-font-size-2xl, 1.25rem)
@@ -126,7 +135,7 @@
126
135
  --_value-line-narrow: var(--slotted-line-height-xl, 1.45);
127
136
  }
128
137
 
129
- [data-ui='stat-card'][data-size='lg'] {
138
+ [data-ui-stat-card][data-size='lg'] {
130
139
  --_inset-block: var(--slotted-stat-card-padding-block-lg, var(--slotted-space-8, 1.5rem));
131
140
  --_inset-inline: var(--slotted-stat-card-padding-inline-lg, var(--slotted-space-8, 1.5rem));
132
141
  --_region-gap: var(--slotted-stat-card-region-gap-lg, var(--slotted-space-4, 0.5rem));
@@ -135,6 +144,8 @@
135
144
  --slotted-stat-card-trend-inline-size-lg,
136
145
  calc(var(--slotted-space-12, 4rem) * 2)
137
146
  );
147
+ --_trend-block: var(--slotted-stat-card-trend-block-size-lg, var(--slotted-space-12, 4rem));
148
+ --_trend-floor: var(--slotted-sparkline-block-size-lg, var(--slotted-space-11, 3rem));
138
149
  --_value-size: var(--slotted-stat-card-value-font-size-lg, var(--slotted-font-size-4xl, 2rem));
139
150
  --_value-line: var(
140
151
  --slotted-stat-card-value-line-height-lg,
@@ -170,11 +181,11 @@
170
181
 
171
182
  /* ── Fill: the three frames a card has, and none ─────────────────────── */
172
183
 
173
- [data-ui='stat-card'][data-fill='elevated'] {
184
+ [data-ui-stat-card][data-fill='elevated'] {
174
185
  --_shadow: var(--slotted-stat-card-shadow-elevated, var(--slotted-shadow-md));
175
186
  }
176
187
 
177
- [data-ui='stat-card'][data-fill='subtle'] {
188
+ [data-ui-stat-card][data-fill='subtle'] {
178
189
  --_surface: var(--slotted-stat-card-background-subtle, var(--slotted-surface-sunken, Canvas));
179
190
  }
180
191
 
@@ -183,7 +194,7 @@
183
194
  * of metrics separated by dividers, inside a card that is already a card.
184
195
  * It keeps no inset either, because the host's inset is the inset.
185
196
  */
186
- [data-ui='stat-card'][data-fill='plain'] {
197
+ [data-ui-stat-card][data-fill='plain'] {
187
198
  --_surface: transparent;
188
199
  --_edge: transparent;
189
200
  --_shadow: none;
@@ -218,28 +229,32 @@
218
229
  * number is broken only when it is wider than the card itself. A floor on
219
230
  * the trend was tried and pushed the trend through the card's edge.
220
231
  */
221
- [data-ui='stat-card'] [data-part='body'] {
222
- column-gap: var(--_trend-gap);
223
- display: grid;
224
- flex: 1 1 auto;
225
- grid-template-areas:
226
- 'header header'
227
- 'figure trend'
228
- 'message message';
229
- grid-template-columns: minmax(min-content, 1fr) minmax(0, var(--_trend-size));
230
- grid-template-rows: auto minmax(0, 1fr) auto;
231
- min-inline-size: 0;
232
- row-gap: var(--_region-gap);
233
- }
234
-
235
- [data-ui='stat-card'][data-layout='stacked'] [data-part='body'] {
236
- grid-template-areas:
237
- 'header'
238
- 'figure'
239
- 'trend'
240
- 'message';
241
- grid-template-columns: minmax(0, 1fr);
242
- grid-template-rows: auto minmax(0, 1fr) auto auto;
232
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
233
+ :scope [data-part-body] {
234
+ column-gap: var(--_trend-gap);
235
+ display: grid;
236
+ flex: 1 1 auto;
237
+ grid-template-areas:
238
+ 'header header'
239
+ 'figure trend'
240
+ 'message message';
241
+ grid-template-columns: minmax(min-content, 1fr) minmax(0, var(--_trend-size));
242
+ grid-template-rows: auto minmax(0, 1fr) auto;
243
+ min-inline-size: 0;
244
+ row-gap: var(--_region-gap);
245
+ }
246
+ }
247
+
248
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
249
+ :scope[data-layout='stacked'] [data-part-body] {
250
+ grid-template-areas:
251
+ 'header'
252
+ 'figure'
253
+ 'message'
254
+ 'trend';
255
+ grid-template-columns: minmax(0, 1fr);
256
+ grid-template-rows: auto minmax(0, 1fr) auto auto;
257
+ }
243
258
  }
244
259
 
245
260
  /**
@@ -250,15 +265,19 @@
250
265
  * inline axis gives these regions no intrinsic width: the figure alone
251
266
  * decides the column, and the text is cut or wrapped by the card's width.
252
267
  */
253
- [data-ui='stat-card'] [data-part='header'] {
254
- contain: inline-size;
255
- grid-area: header;
268
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
269
+ :scope [data-part-header] {
270
+ contain: inline-size;
271
+ grid-area: header;
272
+ }
256
273
  }
257
274
 
258
- [data-ui='stat-card'] [data-part='figure'] {
259
- align-self: start;
260
- grid-area: figure;
261
- min-inline-size: 0;
275
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
276
+ :scope [data-part-figure] {
277
+ align-self: start;
278
+ grid-area: figure;
279
+ min-inline-size: 0;
280
+ }
262
281
  }
263
282
 
264
283
  /**
@@ -268,32 +287,62 @@
268
287
  * width is the space a wide value left, which a query on the card cannot
269
288
  * see.
270
289
  */
271
- [data-ui='stat-card'] [data-part='trend'] {
272
- /* The marker's ring is the card's ground, not the page's. */
273
- --slotted-sparkline-ring-color: var(--_surface);
274
-
275
- align-self: center;
276
- container-name: stat-card-trend;
277
- container-type: inline-size;
278
- grid-area: trend;
279
- inline-size: 100%;
280
- min-inline-size: 0;
290
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
291
+ :scope [data-part-trend] {
292
+ /* The marker's ring is the card's ground, not the page's. */
293
+ --slotted-sparkline-ring-color: var(--_surface);
294
+
295
+ align-self: stretch;
296
+ container-name: stat-card-trend;
297
+ container-type: inline-size;
298
+ grid-area: trend;
299
+ inline-size: 100%;
300
+ min-inline-size: 0;
301
+ }
281
302
  }
282
303
 
283
304
  @container stat-card-trend (max-width: 39px) {
284
- [data-ui='stat-card'] [data-part='trend'] > * {
285
- visibility: hidden;
305
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
306
+ :scope [data-part-trend] > * {
307
+ visibility: hidden;
308
+ }
309
+ }
310
+ }
311
+
312
+ /**
313
+ * On the last row the trend reaches the card's edges: its sides and its
314
+ * bottom bleed through the inset, and the card's corners round it. A line
315
+ * drawn inside the inset ends a gutter short of each edge and reads as a
316
+ * picture placed in the card; a line that runs to the frame reads as the
317
+ * card's ground. The edge is drawn over it, out of flow. A plain card has
318
+ * no inset, so the margins are nought there.
319
+ */
320
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
321
+ :scope[data-layout='stacked'] [data-part-trend] {
322
+ align-self: end;
323
+ border-end-end-radius: calc(var(--_radius) - var(--_edge-width));
324
+ border-end-start-radius: calc(var(--_radius) - var(--_edge-width));
325
+ margin-block-end: calc(-1 * var(--_inset-block));
326
+ margin-block-start: var(--slotted-space-2, 0.25rem);
327
+ margin-inline: calc(-1 * var(--_inset-inline));
328
+ overflow: clip;
329
+ /* The region is wider than the column by the two insets. */
330
+ inline-size: auto;
286
331
  }
287
332
  }
288
333
 
289
- [data-ui='stat-card'][data-layout='stacked'] [data-part='trend'] {
290
- align-self: end;
291
- margin-block-start: var(--slotted-space-2, 0.25rem);
334
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
335
+ :scope[data-layout='stacked'] [data-part-trend] > * {
336
+ block-size: var(--_trend-block);
337
+ min-block-size: 0;
338
+ }
292
339
  }
293
340
 
294
- [data-ui='stat-card'] [data-part='message'] {
295
- contain: inline-size;
296
- grid-area: message;
341
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
342
+ :scope [data-part-message] {
343
+ contain: inline-size;
344
+ grid-area: message;
345
+ }
297
346
  }
298
347
 
299
348
  /**
@@ -303,29 +352,51 @@
303
352
  * (`docs/token-foundation.md`, rule 4).
304
353
  */
305
354
  @container stat-card (max-width: 219px) {
306
- [data-ui='stat-card'] [data-part='body'] {
307
- grid-template-areas:
308
- 'header'
309
- 'figure'
310
- 'trend'
311
- 'message';
312
- grid-template-columns: minmax(0, 1fr);
313
- grid-template-rows: auto minmax(0, 1fr) auto auto;
355
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
356
+ :scope [data-part-body] {
357
+ grid-template-areas:
358
+ 'header'
359
+ 'figure'
360
+ 'message'
361
+ 'trend';
362
+ grid-template-columns: minmax(0, 1fr);
363
+ grid-template-rows: auto minmax(0, 1fr) auto auto;
364
+ }
314
365
  }
315
366
 
316
- [data-ui='stat-card'] [data-part='trend'] {
317
- align-self: end;
318
- margin-block-start: var(--slotted-space-2, 0.25rem);
367
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
368
+ :scope [data-part-trend] {
369
+ align-self: end;
370
+ border-end-end-radius: calc(var(--_radius) - var(--_edge-width));
371
+ border-end-start-radius: calc(var(--_radius) - var(--_edge-width));
372
+ margin-block-end: calc(-1 * var(--_inset-block));
373
+ margin-block-start: var(--slotted-space-2, 0.25rem);
374
+ margin-inline: calc(-1 * var(--_inset-inline));
375
+ overflow: clip;
376
+ /* The region is wider than the column by the two insets. */
377
+ inline-size: auto;
378
+ }
379
+ }
380
+
381
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
382
+ :scope [data-part-trend] > * {
383
+ block-size: var(--_trend-block);
384
+ min-block-size: 0;
385
+ }
319
386
  }
320
387
 
321
- [data-ui='stat-card'] [data-part='value'] {
322
- font-size: var(--_value-size-narrow);
323
- line-height: var(--_value-line-narrow);
388
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
389
+ :scope [data-part-value] {
390
+ font-size: var(--_value-size-narrow);
391
+ line-height: var(--_value-line-narrow);
392
+ }
324
393
  }
325
394
 
326
395
  /* The value steps down here, and so does the line its placeholder keeps. */
327
- [data-ui='stat-card'][data-loading] [data-part='value'] {
328
- min-block-size: calc(var(--_value-size-narrow) * var(--_value-line-narrow));
396
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
397
+ :scope[data-loading] [data-part-value] {
398
+ min-block-size: calc(var(--_value-size-narrow) * var(--_value-line-narrow));
399
+ }
329
400
  }
330
401
  }
331
402
 
@@ -337,13 +408,15 @@
337
408
  * them as part of the name, instead of floating them at the middle of the
338
409
  * block.
339
410
  */
340
- [data-ui='stat-card'] [data-part='header'] {
341
- align-items: baseline;
342
- column-gap: var(--slotted-space-3, 0.375rem);
343
- display: flex;
344
- flex-wrap: wrap;
345
- min-inline-size: 0;
346
- row-gap: var(--slotted-space-2, 0.25rem);
411
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
412
+ :scope [data-part-header] {
413
+ align-items: baseline;
414
+ column-gap: var(--slotted-space-3, 0.375rem);
415
+ display: flex;
416
+ flex-wrap: wrap;
417
+ min-inline-size: 0;
418
+ row-gap: var(--slotted-space-2, 0.25rem);
419
+ }
347
420
  }
348
421
 
349
422
  /**
@@ -355,32 +428,41 @@
355
428
  * proportion of the type rather than a scale step: it is a width of
356
429
  * words, and it scales with them.
357
430
  */
358
- [data-ui='stat-card'] [data-part='label'] {
359
- color: var(--_ink-muted);
360
- flex: 1 1 0%;
361
- font-size: var(--_label-size);
362
- font-weight: var(--slotted-font-weight-medium, 500);
363
- line-height: var(--_label-line);
364
- margin: 0;
365
- min-inline-size: min(100%, 10rem);
366
- overflow-wrap: break-word;
431
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
432
+ :scope [data-part-label] {
433
+ color: var(--_ink-muted);
434
+ flex: 1 1 0%;
435
+ font-size: var(--_label-size);
436
+ font-weight: var(--slotted-font-weight-medium, 500);
437
+ line-height: var(--_label-line);
438
+ margin: 0;
439
+ min-inline-size: min(100%, 10rem);
440
+ overflow-wrap: break-word;
441
+ }
367
442
  }
368
443
 
369
- [data-ui='stat-card'] [data-part='status'] {
370
- display: inline-flex;
371
- flex: none;
444
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
445
+ :scope [data-part-status] {
446
+ display: inline-flex;
447
+ flex: none;
448
+ }
372
449
  }
373
450
 
374
451
  /* The action takes the end of the header's first line and stays there
375
452
  when the label wraps: it is the one thing on the card the reader presses,
376
453
  and a corner is where a control is looked for. */
377
- [data-ui='stat-card'] [data-part='action'] {
378
- flex: none;
379
- /* The label's line, so a link here is as tall in the fallback face as in
380
- the web face and the header does not grow when the font arrives. */
381
- font-size: var(--_label-size);
382
- line-height: var(--_label-line);
383
- margin-inline-start: auto;
454
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
455
+ :scope [data-part-action] {
456
+ /* An action slot states one size for the links it holds. */
457
+ --slotted-link-font-size: var(--slotted-font-size-sm, 0.8125rem);
458
+
459
+ flex: none;
460
+ /* The label's line, so a link here is as tall in the fallback face as in
461
+ the web face and the header does not grow when the font arrives. */
462
+ font-size: var(--_label-size);
463
+ line-height: var(--_label-line);
464
+ margin-inline-start: auto;
465
+ }
384
466
  }
385
467
 
386
468
  /* On a finger the card's one control is a full target among 44-pixel
@@ -388,16 +470,18 @@
388
470
  part itself when `render` made it one — reaches
389
471
  the comfortable size in both axes, and the header keeps its height. */
390
472
  @media (pointer: coarse) {
391
- [data-ui='stat-card']
392
- :is([data-part='action']:is(a, button), [data-part='action'] > :is(a, button)) {
393
- position: relative;
473
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
474
+ :scope :is([data-part-action]:is(a, button), [data-part-action] > :is(a, button)) {
475
+ position: relative;
476
+ }
394
477
  }
395
478
 
396
- [data-ui='stat-card']
397
- :is([data-part='action']:is(a, button), [data-part='action'] > :is(a, button))::before {
398
- content: '';
399
- inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
400
- position: absolute;
479
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
480
+ :scope :is([data-part-action]:is(a, button), [data-part-action] > :is(a, button))::before {
481
+ content: '';
482
+ inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
483
+ position: absolute;
484
+ }
401
485
  }
402
486
  }
403
487
 
@@ -409,17 +493,21 @@
409
493
  * so a delta that does not fit beside a wide number drops under it rather
410
494
  * than pushing the number.
411
495
  */
412
- [data-ui='stat-card'] [data-part='figure'] {
413
- align-items: baseline;
414
- column-gap: var(--slotted-space-3, 0.375rem);
415
- display: flex;
416
- flex-wrap: wrap;
417
- row-gap: 0;
496
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
497
+ :scope [data-part-figure] {
498
+ align-items: baseline;
499
+ column-gap: var(--slotted-space-3, 0.375rem);
500
+ display: flex;
501
+ flex-wrap: wrap;
502
+ row-gap: 0;
503
+ }
418
504
  }
419
505
 
420
- [data-ui='stat-card'] [data-part='comparison'] {
421
- contain: inline-size;
422
- flex: 1 1 100%;
506
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
507
+ :scope [data-part-comparison] {
508
+ contain: inline-size;
509
+ flex: 1 1 100%;
510
+ }
423
511
  }
424
512
 
425
513
  /**
@@ -432,38 +520,44 @@
432
520
  * to pull a large numeral's counters back together, and it is the same
433
521
  * fraction at every size.
434
522
  */
435
- [data-ui='stat-card'] [data-part='value'] {
436
- /* The figure and its unit are two flex items on one baseline — the text
437
- node is an item of its own — so the gap spaces the unit from the digit
438
- on whichever side it stands. A margin on the unit, reset by
439
- `:first-child` for a leading unit, hugged a trailing one: after a bare
440
- figure the unit is the first element child. */
441
- align-items: baseline;
442
- color: var(--_ink);
443
- display: inline-flex;
444
- flex-wrap: wrap;
445
- gap: 0.15em;
446
- font-size: var(--_value-size);
447
- font-variant-numeric: proportional-nums;
448
- font-weight: var(--slotted-font-weight-semibold, 600);
449
- letter-spacing: -0.02em;
450
- unicode-bidi: plaintext;
451
- line-height: var(--_value-line);
452
- margin: 0;
453
- min-inline-size: 0;
454
- /* A number is never truncated: a value wider than its column breaks
455
- rather than clips, and a consumer who wants it whole formats it
456
- compact or stacks the card. */
457
- overflow-wrap: break-word;
523
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
524
+ :scope [data-part-value] {
525
+ /* The figure and its unit are two flex items on one baseline — the text
526
+ node is an item of its own — so the gap spaces the unit from the digit
527
+ on whichever side it stands. A margin on the unit, reset by
528
+ `:first-child` for a leading unit, hugged a trailing one: after a bare
529
+ figure the unit is the first element child. */
530
+ align-items: baseline;
531
+ color: var(--_ink);
532
+ display: inline-flex;
533
+ flex-wrap: wrap;
534
+ gap: 0.15em;
535
+ font-size: var(--_value-size);
536
+ font-variant-numeric: proportional-nums;
537
+ font-weight: var(--slotted-font-weight-semibold, 600);
538
+ /* The figure is set at the 3xl or 4xl step, where the theme's tighter
539
+ tracking applies. */
540
+ letter-spacing: var(--slotted-letter-spacing-tighter, -0.03em);
541
+ unicode-bidi: plaintext;
542
+ line-height: var(--_value-line);
543
+ margin: 0;
544
+ min-inline-size: 0;
545
+ /* A number is never truncated: a value wider than its column breaks
546
+ rather than clips, and a consumer who wants it whole formats it
547
+ compact or stacks the card. */
548
+ overflow-wrap: break-word;
549
+ }
458
550
  }
459
551
 
460
552
  /* The unit is in the value's own line, a step down in size and weight, so
461
553
  `$` and `%` read as annotation of the number rather than as digits. */
462
- [data-ui='stat-card'] [data-part='unit'] {
463
- color: var(--_ink-muted);
464
- font-size: var(--_delta-size);
465
- font-weight: var(--slotted-font-weight-medium, 500);
466
- letter-spacing: 0;
554
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
555
+ :scope [data-part-unit] {
556
+ color: var(--_ink-muted);
557
+ font-size: var(--_delta-size);
558
+ font-weight: var(--slotted-font-weight-medium, 500);
559
+ letter-spacing: 0;
560
+ }
467
561
  }
468
562
 
469
563
  /**
@@ -472,44 +566,62 @@
472
566
  * metrics, and the tone's text role already clears the reading ratio on
473
567
  * the surface. It sits on the value's baseline.
474
568
  */
475
- [data-ui='stat-card'] [data-part='delta'] {
476
- align-items: center;
477
- color: var(--_tone-text);
478
- column-gap: var(--slotted-space-1, 0.125rem);
479
- display: inline-flex;
480
- font-size: var(--_delta-size);
481
- font-variant-numeric: tabular-nums;
482
- font-weight: var(--slotted-font-weight-semibold, 600);
483
- line-height: 1;
484
- /* A signed number is a run of its own: in a right-to-left document the
485
- sign of `+12.4%` is a neutral character and drifts to the far end of
486
- the run, so the run is laid out by its own content. */
487
- unicode-bidi: plaintext;
488
- white-space: nowrap;
489
- }
490
-
491
- [data-ui='stat-card'] [data-part='delta'][data-tone='neutral'] {
492
- --_tone-text: var(--_ink-muted);
569
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
570
+ :scope [data-part-delta] {
571
+ align-items: center;
572
+ color: var(--_tone-text);
573
+ column-gap: var(--slotted-space-1, 0.125rem);
574
+ display: inline-flex;
575
+ font-size: var(--_delta-size);
576
+ font-variant-numeric: tabular-nums;
577
+ font-weight: var(--slotted-font-weight-semibold, 600);
578
+ line-height: 1;
579
+ /* A signed number is a run of its own: in a right-to-left document the
580
+ sign of `+12.4%` is a neutral character and drifts to the far end of
581
+ the run, so the run is laid out by its own content. */
582
+ unicode-bidi: plaintext;
583
+ white-space: nowrap;
584
+ }
493
585
  }
494
586
 
495
- [data-ui='stat-card'] [data-part='delta'][data-tone='accent'] {
496
- --_tone-text: var(--slotted-tone-accent-text);
587
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
588
+ :scope [data-part-delta][data-tone='neutral'] {
589
+ --_tone-text: var(--_ink-muted);
590
+ }
497
591
  }
498
592
 
499
- [data-ui='stat-card'] [data-part='delta'][data-tone='secondary'] {
500
- --_tone-text: var(--slotted-tone-secondary-text);
593
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
594
+ :scope [data-part-delta][data-tone='accent'] {
595
+ --_tone-text: var(--slotted-tone-accent-text);
596
+ }
501
597
  }
502
598
 
503
- [data-ui='stat-card'] [data-part='delta'][data-tone='success'] {
504
- --_tone-text: var(--slotted-tone-success-text);
599
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
600
+ :scope [data-part-delta][data-tone='secondary'] {
601
+ --_tone-text: var(--slotted-tone-secondary-text);
602
+ }
505
603
  }
506
604
 
507
- [data-ui='stat-card'] [data-part='delta'][data-tone='warning'] {
508
- --_tone-text: var(--slotted-tone-warning-text);
605
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
606
+ :scope [data-part-delta][data-tone='success'] {
607
+ --_tone-text: var(--slotted-tone-success-text);
608
+ }
609
+
610
+ :scope [data-part-delta][data-tone='info'] {
611
+ --_tone-text: var(--slotted-tone-info-text);
612
+ }
613
+ }
614
+
615
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
616
+ :scope [data-part-delta][data-tone='warning'] {
617
+ --_tone-text: var(--slotted-tone-warning-text);
618
+ }
509
619
  }
510
620
 
511
- [data-ui='stat-card'] [data-part='delta'][data-tone='danger'] {
512
- --_tone-text: var(--slotted-tone-danger-text);
621
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
622
+ :scope [data-part-delta][data-tone='danger'] {
623
+ --_tone-text: var(--slotted-tone-danger-text);
624
+ }
513
625
  }
514
626
 
515
627
  /**
@@ -520,38 +632,43 @@
520
632
  * change draws `minus`. The binding renders the glyph inside the icon box;
521
633
  * the part hands the box its size, and the box inherits the delta's ink.
522
634
  */
523
- [data-ui='stat-card'] [data-part='indicator'] {
524
- --slotted-icon-size: var(--_indicator-size);
635
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
636
+ :scope [data-part-indicator] {
637
+ --slotted-icon-size: var(--_indicator-size);
525
638
 
526
- display: inline-flex;
527
- flex: none;
639
+ display: inline-flex;
640
+ flex: none;
641
+ }
528
642
  }
529
643
 
530
644
  /* A reflection across the horizontal axis, not motion: nothing travels when
531
645
  a rise becomes a fall. Time runs from the right in a right-to-left
532
646
  document, so the rise points the other way there, as the sparkline beside
533
647
  it does — the `directional` icon box the binding draws does that. */
534
- [data-ui='stat-card']
535
- [data-part='delta'][data-trend='down']
536
- [data-part='indicator']
537
- > [data-ui='icon'] {
538
- rotate: x 180deg;
648
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
649
+ :scope [data-part-delta][data-trend='down'] [data-part-indicator] > [data-ui-icon] {
650
+ rotate: x 180deg;
651
+ }
539
652
  }
540
653
 
541
654
  /* ── Comparison: the prose under the figure ───────────────────────────── */
542
655
 
543
- [data-ui='stat-card'] [data-part='comparison'] {
544
- color: var(--_ink-muted);
545
- font-size: var(--_prose-size);
546
- line-height: var(--_prose-line);
547
- margin-block-start: var(--_region-gap);
548
- margin: 0;
549
- min-inline-size: 0;
550
- overflow-wrap: anywhere;
656
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
657
+ :scope [data-part-comparison] {
658
+ color: var(--_ink-muted);
659
+ font-size: var(--_prose-size);
660
+ line-height: var(--_prose-line);
661
+ margin-block-start: var(--_region-gap);
662
+ margin: 0;
663
+ min-inline-size: 0;
664
+ overflow-wrap: anywhere;
665
+ }
551
666
  }
552
667
 
553
- [data-ui='stat-card'] [data-part='period'] {
554
- color: var(--_ink-muted);
668
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
669
+ :scope [data-part-period] {
670
+ color: var(--_ink-muted);
671
+ }
555
672
  }
556
673
 
557
674
  /* ── Trend: where a sparkline goes ────────────────────────────────────── */
@@ -564,64 +681,105 @@
564
681
  * — a card with no delta, or a metric with no valence, draws its trend in
565
682
  * the theme's blue and not in grey.
566
683
  */
567
- [data-ui='stat-card'] [data-part='trend'] {
568
- align-self: center;
569
- display: flex;
684
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
685
+ :scope [data-part-trend] {
686
+ display: flex;
687
+ }
688
+ }
689
+
690
+ /**
691
+ * Beside the figure the trend is as tall as the figure — the value, the
692
+ * delta and the comparison under them — so its last point is read level
693
+ * with the number it ends at, and no gap opens above or below a line of a
694
+ * fixed height centred on a taller column. The sparkline's own step is the
695
+ * floor, for a figure with no comparison.
696
+ */
697
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
698
+ :scope [data-part-trend] > * {
699
+ block-size: auto;
700
+ /* No height of its own to give the row: the drawing would otherwise
701
+ make the figure's row taller than the figure. */
702
+ contain: size;
703
+ min-block-size: var(--_trend-floor);
704
+ }
570
705
  }
571
706
 
572
- [data-ui='stat-card'][data-tone='success'] [data-part='trend'] {
573
- --slotted-sparkline-color: var(--slotted-tone-success-text);
707
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
708
+ :scope[data-tone='success'] [data-part-trend] {
709
+ --slotted-sparkline-color: var(--slotted-tone-success-text);
710
+ }
711
+
712
+ :scope[data-tone='info'] [data-part-trend] {
713
+ --slotted-sparkline-color: var(--slotted-tone-info-text);
714
+ }
574
715
  }
575
716
 
576
- [data-ui='stat-card'][data-tone='danger'] [data-part='trend'] {
577
- --slotted-sparkline-color: var(--slotted-tone-danger-text);
717
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
718
+ :scope[data-tone='danger'] [data-part-trend] {
719
+ --slotted-sparkline-color: var(--slotted-tone-danger-text);
720
+ }
578
721
  }
579
722
 
580
- [data-ui='stat-card'][data-tone='warning'] [data-part='trend'] {
581
- --slotted-sparkline-color: var(--slotted-tone-warning-text);
723
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
724
+ :scope[data-tone='warning'] [data-part-trend] {
725
+ --slotted-sparkline-color: var(--slotted-tone-warning-text);
726
+ }
582
727
  }
583
728
 
584
- [data-ui='stat-card'][data-tone='accent'] [data-part='trend'] {
585
- --slotted-sparkline-color: var(--slotted-tone-accent-text);
729
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
730
+ :scope[data-tone='accent'] [data-part-trend] {
731
+ --slotted-sparkline-color: var(--slotted-tone-accent-text);
732
+ }
586
733
  }
587
734
 
588
- [data-ui='stat-card'][data-tone='secondary'] [data-part='trend'] {
589
- --slotted-sparkline-color: var(--slotted-tone-secondary-text);
735
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
736
+ :scope[data-tone='secondary'] [data-part-trend] {
737
+ --slotted-sparkline-color: var(--slotted-tone-secondary-text);
738
+ }
590
739
  }
591
740
 
592
- [data-ui='stat-card'][data-fill='plain'] [data-part='trend'] {
593
- --slotted-sparkline-ring-color: var(--slotted-surface-raised, Canvas);
741
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
742
+ :scope[data-fill='plain'] [data-part-trend] {
743
+ --slotted-sparkline-ring-color: var(--slotted-surface-raised, Canvas);
744
+ }
594
745
  }
595
746
 
596
747
  /* ── Message: what stands in for a value that is missing or failed ────── */
597
748
 
598
- [data-ui='stat-card'] [data-part='message'] {
599
- color: var(--_ink-muted);
600
- font-size: var(--_prose-size);
601
- line-height: var(--_prose-line);
602
- margin: 0;
603
- min-inline-size: 0;
604
- overflow-wrap: anywhere;
749
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
750
+ :scope [data-part-message] {
751
+ color: var(--_ink-muted);
752
+ font-size: var(--_prose-size);
753
+ line-height: var(--_prose-line);
754
+ margin: 0;
755
+ min-inline-size: 0;
756
+ overflow-wrap: anywhere;
757
+ }
605
758
  }
606
759
 
607
- [data-ui='stat-card'][data-status='error'] [data-part='message'] {
608
- color: var(--slotted-tone-danger-text);
760
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
761
+ :scope[data-status='error'] [data-part-message] {
762
+ color: var(--slotted-tone-danger-text);
763
+ }
609
764
  }
610
765
 
611
766
  /* A value that is not there is a dash in the muted step, at the value's
612
767
  own size, so the row keeps its height and its rhythm. */
613
- [data-ui='stat-card'][data-status='empty'] [data-part='value'],
614
- [data-ui='stat-card'][data-status='error'] [data-part='value'] {
615
- color: var(--_ink-muted);
768
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
769
+ :scope[data-status='empty'] [data-part-value],
770
+ :scope[data-status='error'] [data-part-value] {
771
+ color: var(--_ink-muted);
772
+ }
616
773
  }
617
774
 
618
775
  /* ── Loading ──────────────────────────────────────────────────────────── */
619
776
 
620
777
  /**
621
778
  * The binding renders a `skeleton` in place of each text part and a block
622
- * in the trend, each the height of what it stands for; the sheet only has
623
- * to keep the trend's box at the sparkline's height so the card does not
624
- * change size when the line arrives.
779
+ * in the trend. The block is the trend region's child, so the rules that
780
+ * size a sparkline there size it too: the figure's height beside the
781
+ * figure, the card's width and `--_trend-block` on the last row. The card
782
+ * does not change size when the line arrives.
625
783
  */
626
784
  /**
627
785
  * The value's box is an inline flex line, so its height is its content's.
@@ -632,28 +790,9 @@
632
790
  * arrived. The floor is one line of the value's own type, so the two states
633
791
  * occupy the same box.
634
792
  */
635
- [data-ui='stat-card'][data-loading] [data-part='value'] {
636
- min-block-size: calc(var(--_value-size) * var(--_value-line));
637
- }
638
-
639
- [data-ui='stat-card'][data-loading] [data-part='trend'] {
640
- --slotted-skeleton-block-size: var(
641
- --slotted-sparkline-block-size,
642
- var(--slotted-space-9, 2rem)
643
- );
644
- }
645
-
646
- [data-ui='stat-card'][data-loading][data-size='sm'] [data-part='trend'] {
647
- --slotted-skeleton-block-size: var(
648
- --slotted-sparkline-block-size-sm,
649
- var(--slotted-space-7, 1.25rem)
650
- );
651
- }
652
-
653
- [data-ui='stat-card'][data-loading][data-size='lg'] [data-part='trend'] {
654
- --slotted-skeleton-block-size: var(
655
- --slotted-sparkline-block-size-lg,
656
- var(--slotted-space-11, 3rem)
657
- );
793
+ @scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
794
+ :scope[data-loading] [data-part-value] {
795
+ min-block-size: calc(var(--_value-size) * var(--_value-line));
796
+ }
658
797
  }
659
798
  }