@slotted/styles 0.1.0-beta.37 → 0.1.0-beta.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slotted/styles",
3
- "version": "0.1.0-beta.37",
3
+ "version": "0.1.0-beta.39",
4
4
  "description": "Per-family stylesheets of Slotted, bundled by the React and Angular bindings.",
5
5
  "keywords": [
6
6
  "slotted",
@@ -487,6 +487,12 @@
487
487
  font-weight: var(--slotted-font-weight-semibold, 600);
488
488
  }
489
489
 
490
+ /* The disc says it, and the rest of the day keeps its own ink. */
491
+ [data-ui-calendar]:where([data-layout='fill'][data-today-mark='disc'])
492
+ [data-part-day][data-today] {
493
+ color: inherit;
494
+ }
495
+
490
496
  [data-ui-calendar] [data-part-day]::before {
491
497
  /* Reserved in every cell and painted in one, so the row keeps its line. */
492
498
  background-color: transparent;
@@ -746,6 +752,17 @@
746
752
  background-color: transparent;
747
753
  }
748
754
 
755
+ /* A day that holds nothing to choose answers nothing, in the ink of any day. */
756
+ [data-ui-calendar] [data-part-cell][data-inert] [data-part-day] {
757
+ cursor: default;
758
+ }
759
+
760
+ [data-ui-calendar]
761
+ [data-part-cell][data-inert]:not([data-selected], [data-in-range])
762
+ [data-part-day]:is(:hover, :active):not([data-disabled]) {
763
+ background-color: transparent;
764
+ }
765
+
749
766
  /**
750
767
  * The chosen date. A fill rather than a ring, so it and today can be true at
751
768
  * once and still read as two facts.
@@ -903,6 +920,90 @@
903
920
  padding-block: var(--slotted-space-2, 0.25rem);
904
921
  }
905
922
 
923
+ /**
924
+ * The content at the start of the day: the number on the first line, the
925
+ * figure on the end of its own, the marks on the last. Every number stands in
926
+ * the middle of one box, so the digits of a column line up whatever their
927
+ * count, and today's disc is that box filled.
928
+ */
929
+ [data-ui-calendar][data-layout='fill'] [data-part-day-number] {
930
+ --_number: calc(1em + 2 * var(--slotted-space-2, 0.25rem));
931
+ }
932
+
933
+ [data-ui-calendar][data-layout='fill']:is([data-day-align='start'], [data-today-mark='disc'])
934
+ [data-part-day-number] {
935
+ block-size: var(--_number);
936
+ border-radius: var(--slotted-radius-full, 9999px);
937
+ display: grid;
938
+ flex: none;
939
+ min-inline-size: var(--_number);
940
+ place-items: center;
941
+ }
942
+
943
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-week-header] {
944
+ padding-inline: calc(
945
+ var(--slotted-border-width-thin, 1px) + var(--slotted-space-2, 0.25rem) +
946
+ var(--slotted-space-1, 0.125rem)
947
+ );
948
+ text-align: start;
949
+ }
950
+
951
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-day] {
952
+ align-items: start;
953
+ padding-inline: var(--slotted-space-2, 0.25rem);
954
+ }
955
+
956
+ /* Under the middle of the number's box. */
957
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-day]::before,
958
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-mark] {
959
+ margin-inline-start: calc(0.5em + var(--slotted-space-2, 0.25rem) / 2);
960
+ }
961
+
962
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-day-content] {
963
+ align-items: start;
964
+ flex: 1;
965
+ min-block-size: 0;
966
+ }
967
+
968
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-day-marks] {
969
+ justify-content: start;
970
+ padding-inline: var(--slotted-space-1, 0.125rem);
971
+ }
972
+
973
+ [data-ui-calendar][data-layout='fill'][data-day-align='start'] [data-part-day-marks]:last-child {
974
+ margin-block-start: auto;
975
+ }
976
+
977
+ /* Today in a disc: the dot leaves, its row with it. */
978
+ [data-ui-calendar][data-layout='fill'][data-today-mark='disc'] [data-part-day]::before {
979
+ display: none;
980
+ }
981
+
982
+ [data-ui-calendar][data-layout='fill'][data-today-mark='disc']
983
+ [data-part-cell]:not([data-outside-month])
984
+ [data-part-day][data-today]
985
+ > [data-part-day-number] {
986
+ background-color: var(--slotted-calendar-today-background, var(--slotted-tone-accent-solid));
987
+ color: var(--slotted-calendar-today-color, var(--slotted-tone-accent-on-solid));
988
+ }
989
+
990
+ /* On the ground of a chosen day the disc is that ground and its ink, exchanged. */
991
+ [data-ui-calendar][data-layout='fill'][data-today-mark='disc']
992
+ [data-part-cell][data-selected]:not([data-outside-month])
993
+ [data-part-day][data-today]
994
+ > [data-part-day-number] {
995
+ background-color: var(--slotted-calendar-today-background, var(--slotted-tone-accent-on-solid));
996
+ color: var(--slotted-calendar-today-color, var(--slotted-tone-accent-solid));
997
+ }
998
+
999
+ [data-ui-calendar][data-part-root][data-layout='fill'][data-today-mark='disc'][data-disabled]
1000
+ [data-part-cell]:not([data-outside-month])
1001
+ [data-part-day][data-today]
1002
+ > [data-part-day-number] {
1003
+ background-color: var(--slotted-disabled-background);
1004
+ color: var(--slotted-disabled-foreground);
1005
+ }
1006
+
906
1007
  /* Between the days and not around them: the lines divide a plane, they frame nothing. */
907
1008
  [data-ui-calendar][data-layout='fill'][data-lines]
908
1009
  [data-part-week]
@@ -941,11 +1042,11 @@
941
1042
  --_mark: var(--slotted-tone-accent-solid, currentcolor);
942
1043
 
943
1044
  background-color: var(--_mark);
944
- block-size: var(--slotted-space-3, 0.375rem);
1045
+ block-size: var(--slotted-calendar-day-mark-size, var(--slotted-space-3, 0.375rem));
945
1046
  border: var(--slotted-border-width-thin, 1px) solid var(--_mark);
946
1047
  border-radius: var(--slotted-radius-full, 9999px);
947
1048
  box-sizing: border-box;
948
- inline-size: var(--slotted-space-3, 0.375rem);
1049
+ inline-size: var(--slotted-calendar-day-mark-size, var(--slotted-space-3, 0.375rem));
949
1050
  }
950
1051
 
951
1052
  [data-ui-calendar] [data-part-day-mark][data-hollow] {
@@ -1012,6 +1113,15 @@
1012
1113
  }
1013
1114
 
1014
1115
  @media (forced-colors: active) {
1116
+ [data-ui-calendar][data-layout='fill'][data-today-mark='disc']
1117
+ [data-part-cell]:not([data-outside-month])
1118
+ [data-part-day][data-today]
1119
+ > [data-part-day-number] {
1120
+ background-color: Highlight;
1121
+ color: HighlightText;
1122
+ forced-color-adjust: none;
1123
+ }
1124
+
1015
1125
  [data-ui-calendar] [data-part-day-mark] {
1016
1126
  background-color: CanvasText;
1017
1127
  border-color: CanvasText;
@@ -6,6 +6,7 @@
6
6
  "--slotted-calendar-cell-size",
7
7
  "--slotted-calendar-color",
8
8
  "--slotted-calendar-day-height",
9
+ "--slotted-calendar-day-mark-size",
9
10
  "--slotted-calendar-day-radius",
10
11
  "--slotted-calendar-disabled-color",
11
12
  "--slotted-calendar-hover-background",
@@ -23,6 +24,7 @@
23
24
  "--slotted-calendar-range-hover-background",
24
25
  "--slotted-calendar-selected-background",
25
26
  "--slotted-calendar-selected-color",
27
+ "--slotted-calendar-today-background",
26
28
  "--slotted-calendar-today-color",
27
29
  "--slotted-calendar-trigger-color",
28
30
  "--slotted-calendar-unavailable-color",
@@ -255,6 +255,33 @@
255
255
  transition: opacity var(--slotted-duration-long) var(--slotted-easing-standard);
256
256
  }
257
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
+
258
285
  /* ── The box the panel sits in ────────────────────────────────────────── */
259
286
 
260
287
  /**
@@ -31,6 +31,7 @@
31
31
  "--slotted-dialog-radius",
32
32
  "--slotted-dialog-rule-color",
33
33
  "--slotted-dialog-scrim",
34
+ "--slotted-dialog-scrim-backdrop-filter",
34
35
  "--slotted-dialog-surface",
35
36
  "--slotted-dialog-title-color",
36
37
  "--slotted-dialog-title-font-family",
@@ -334,6 +334,35 @@
334
334
  transition: opacity var(--slotted-duration-long) var(--slotted-easing-standard);
335
335
  }
336
336
 
337
+ /**
338
+ * A theme filters the page under a modal layer with
339
+ * `--slotted-drawer-scrim-backdrop-filter`, `none` unless set. A filter makes
340
+ * the scrim a stacking context, which its place in the document would paint
341
+ * over the panel, so it stands at the bottom of the layer's own. It comes and
342
+ * goes with the scrim's opacity.
343
+ */
344
+ [data-ui-drawer][data-mode='overlay'][data-modal] > [data-part-backdrop] {
345
+ transition-property:
346
+ opacity,
347
+ -webkit-backdrop-filter,
348
+ backdrop-filter;
349
+ z-index: -1;
350
+ }
351
+
352
+ [data-ui-drawer][data-mode='overlay'][data-modal][data-open]:not([data-undimmed])
353
+ > [data-part-backdrop] {
354
+ -webkit-backdrop-filter: var(--slotted-drawer-scrim-backdrop-filter, none);
355
+ backdrop-filter: var(--slotted-drawer-scrim-backdrop-filter, none);
356
+ }
357
+
358
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
359
+ [data-ui-drawer][data-mode='overlay'][data-modal][data-open]:not([data-undimmed])
360
+ > [data-part-backdrop] {
361
+ -webkit-backdrop-filter: none;
362
+ backdrop-filter: none;
363
+ }
364
+ }
365
+
337
366
  /* ── The panel ────────────────────────────────────────────────────────── */
338
367
 
339
368
  /**
@@ -1709,13 +1738,24 @@
1709
1738
  /**
1710
1739
  * The scrim dims with the sheet: out of sight it is clear, at the lowest stop
1711
1740
  * it is whole. The element keeps the fade it opens and closes with; the
1712
- * scroll drives a layer inside it, and the two multiply.
1741
+ * scroll drives a layer inside it, and the two multiply. The scroll drives the
1742
+ * filter of the element itself, from none to the token.
1713
1743
  */
1714
1744
  @supports (animation-timeline: scroll()) {
1715
1745
  [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag] > [data-part-backdrop] {
1716
1746
  background: none;
1717
1747
  }
1718
1748
 
1749
+ [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag][data-modal]:not(
1750
+ [data-sheet-content],
1751
+ [data-sheet-travel]
1752
+ )
1753
+ > [data-part-backdrop] {
1754
+ animation: slotted-drawer-sheet-filter linear both;
1755
+ animation-timeline: --slotted-drawer-sheet;
1756
+ animation-range: 0px var(--slotted-drawer-sheet-floor, 100%);
1757
+ }
1758
+
1719
1759
  [data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]
1720
1760
  > [data-part-backdrop]::before {
1721
1761
  content: '';
@@ -1743,6 +1783,13 @@
1743
1783
  }
1744
1784
  }
1745
1785
 
1786
+ @keyframes slotted-drawer-sheet-filter {
1787
+ from {
1788
+ -webkit-backdrop-filter: none;
1789
+ backdrop-filter: none;
1790
+ }
1791
+ }
1792
+
1746
1793
  @keyframes slotted-drawer-sheet-dim {
1747
1794
  from {
1748
1795
  opacity: 0;
@@ -33,6 +33,7 @@
33
33
  "--slotted-drawer-resizer-line-color",
34
34
  "--slotted-drawer-rule-color",
35
35
  "--slotted-drawer-scrim",
36
+ "--slotted-drawer-scrim-backdrop-filter",
36
37
  "--slotted-drawer-sheet-dim",
37
38
  "--slotted-drawer-sheet-floor",
38
39
  "--slotted-drawer-sheet-height",
@@ -61,6 +61,10 @@
61
61
  calc((var(--_min-block) - var(--_font-size) * var(--slotted-line-height-md, 1.5)) / 2)
62
62
  )
63
63
  );
64
+ /* What stands above and below a control of `actions`. The row is as tall as
65
+ a control of its own size, so a control one step smaller left two pixels
66
+ at each edge and the outlines of two rows read as one column of boxes. */
67
+ --_actions-inset: var(--slotted-space-3, 0.375rem);
64
68
  --_radius: var(--slotted-list-item-radius, var(--slotted-radius-md, 6px));
65
69
 
66
70
  /* Ink. `secondary` is the library's neutral, and a neutral row takes the
@@ -618,6 +622,7 @@
618
622
  display: flex;
619
623
  flex: none;
620
624
  gap: var(--_gap);
625
+ padding-block: var(--_actions-start, var(--_actions-inset)) var(--_actions-inset);
621
626
  padding-inline-end: var(--_pad-inline);
622
627
  position: relative;
623
628
  }
@@ -658,8 +663,9 @@
658
663
  * on two different lines — the one thing a trailing pair must not do.
659
664
  */
660
665
  [data-ui-list-item][data-align='start'] > [data-part-actions] {
666
+ --_actions-start: max(var(--_pad-block), var(--_actions-inset));
667
+
661
668
  align-items: start;
662
- padding-block-start: var(--_pad-block);
663
669
  }
664
670
 
665
671
  /**
@@ -948,7 +954,7 @@
948
954
  [data-ui-list-item] > [data-part-actions] {
949
955
  flex-basis: 100%;
950
956
  justify-content: flex-end;
951
- padding-block-end: var(--_pad-block);
957
+ padding-block: var(--_actions-start, 0px) max(var(--_pad-block), var(--_actions-inset));
952
958
  padding-inline: var(--_pad-inline);
953
959
  }
954
960
 
@@ -967,7 +973,7 @@
967
973
  */
968
974
  [data-ui-list-item] > [data-part-actions]:not(:has(> :not([data-shape]))) {
969
975
  flex-basis: auto;
970
- padding-block-end: 0;
976
+ padding-block: var(--_actions-start, var(--_actions-inset)) var(--_actions-inset);
971
977
  padding-inline: 0 var(--_pad-inline);
972
978
  }
973
979
 
@@ -1261,9 +1261,11 @@
1261
1261
  * stand in the plain ink.
1262
1262
  */
1263
1263
  :scope {
1264
+ --_tile-surface: var(--slotted-surface);
1265
+
1264
1266
  display: inline-flex;
1265
1267
  flex-direction: column;
1266
- gap: var(--slotted-space-3, 0.375rem);
1268
+ gap: var(--slotted-message-activity-gap, var(--slotted-space-3, 0.375rem));
1267
1269
  box-sizing: border-box;
1268
1270
  max-inline-size: 100%;
1269
1271
  padding-block: var(--_pad-block);
@@ -1279,6 +1281,8 @@
1279
1281
 
1280
1282
  /* On a rail, with no bubbles, a frame is a block floating in the turn. */
1281
1283
  :scope[data-variant='plain'] {
1284
+ --_tile-surface: var(--slotted-surface-raised);
1285
+
1282
1286
  padding: 0;
1283
1287
  border: 0;
1284
1288
  border-radius: 0;
@@ -1289,7 +1293,7 @@
1289
1293
  [data-part-activity-step] {
1290
1294
  display: flex;
1291
1295
  align-items: center;
1292
- gap: var(--slotted-space-4, 0.5rem);
1296
+ gap: var(--slotted-message-activity-step-gap, var(--slotted-space-4, 0.5rem));
1293
1297
  min-inline-size: 0;
1294
1298
  transition:
1295
1299
  opacity var(--slotted-duration-medium) var(--slotted-easing-enter, ease-out),
@@ -1298,7 +1302,7 @@
1298
1302
 
1299
1303
  @starting-style {
1300
1304
  opacity: 0;
1301
- translate: 0 var(--slotted-space-2, 0.25rem);
1305
+ translate: 0 var(--slotted-message-activity-rise, var(--slotted-space-2, 0.25rem));
1302
1306
  }
1303
1307
  }
1304
1308
 
@@ -1315,27 +1319,40 @@
1315
1319
  }
1316
1320
 
1317
1321
  [data-part-activity-step][data-complete] > :first-child {
1318
- color: var(--slotted-tone-success-text);
1322
+ color: var(--slotted-message-activity-color-complete, var(--slotted-tone-success-text));
1319
1323
  }
1320
1324
 
1321
1325
  /**
1322
1326
  * The source of a step, in a tile: the icon of what the step consulted,
1323
1327
  * and the tick in its place once the step is complete. The tile is edged
1324
1328
  * in the accent while the step is current, which is the state the ring
1325
- * says where no icon is given.
1329
+ * says where no icon is given. Its ground is a step away from what it
1330
+ * stands on: the surface inside the raised frame, the raised surface where
1331
+ * there is no frame.
1326
1332
  */
1327
1333
  [data-part-activity-step] > [data-part-activity-step-icon] {
1334
+ --_tile-glyph: var(--slotted-message-activity-icon-glyph-size, 0.75rem);
1335
+ --slotted-icon-size: var(--_tile-glyph);
1336
+
1328
1337
  inline-size: var(--slotted-message-activity-icon-size, 1.375rem);
1329
1338
  block-size: var(--slotted-message-activity-icon-size, 1.375rem);
1330
1339
  box-sizing: border-box;
1331
1340
  border: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle);
1332
- border-radius: var(--slotted-radius-sm, 4px);
1333
- background-color: var(--slotted-surface);
1341
+ border-radius: var(--slotted-message-activity-icon-radius, var(--slotted-radius-md, 6px));
1342
+ background-color: var(--slotted-message-activity-icon-surface, var(--_tile-surface));
1334
1343
  transition: border-color var(--slotted-duration-medium) var(--slotted-easing-standard, ease);
1335
1344
  }
1336
1345
 
1346
+ [data-part-activity-step-icon] > svg {
1347
+ inline-size: var(--_tile-glyph);
1348
+ block-size: var(--_tile-glyph);
1349
+ }
1350
+
1337
1351
  [data-part-activity-step][data-current] > [data-part-activity-step-icon] {
1338
- border-color: var(--slotted-tone-accent-border);
1352
+ border-color: var(
1353
+ --slotted-message-activity-icon-border-color-current,
1354
+ var(--slotted-tone-accent-border)
1355
+ );
1339
1356
  }
1340
1357
 
1341
1358
  [data-part-activity-step][data-current] {
@@ -1346,7 +1363,7 @@
1346
1363
  color: var(--slotted-tone-accent-text);
1347
1364
  }
1348
1365
 
1349
- [data-part-activity-step][data-current] > :last-child {
1366
+ :scope[data-shimmer] [data-part-activity-step][data-current] > :last-child {
1350
1367
  --_base: color-mix(in oklab, var(--slotted-text) 72%, var(--slotted-text-muted));
1351
1368
 
1352
1369
  background-image: linear-gradient(
@@ -1364,7 +1381,7 @@
1364
1381
  }
1365
1382
 
1366
1383
  @media (prefers-reduced-motion: reduce) {
1367
- [data-part-activity-step][data-current] > :last-child {
1384
+ :scope[data-shimmer] [data-part-activity-step][data-current] > :last-child {
1368
1385
  animation: none;
1369
1386
  background-image: none;
1370
1387
  color: inherit;
@@ -29,7 +29,15 @@
29
29
  "--slotted-font-weight-semibold",
30
30
  "--slotted-line-height-md",
31
31
  "--slotted-line-height-xs",
32
+ "--slotted-message-activity-color-complete",
33
+ "--slotted-message-activity-gap",
34
+ "--slotted-message-activity-icon-border-color-current",
35
+ "--slotted-message-activity-icon-glyph-size",
36
+ "--slotted-message-activity-icon-radius",
32
37
  "--slotted-message-activity-icon-size",
38
+ "--slotted-message-activity-icon-surface",
39
+ "--slotted-message-activity-rise",
40
+ "--slotted-message-activity-step-gap",
33
41
  "--slotted-message-avatar-size",
34
42
  "--slotted-message-bubble-padding-block",
35
43
  "--slotted-message-bubble-padding-inline",
@@ -198,6 +198,9 @@
198
198
  * their column; the tags never leave the heading's row.
199
199
  */
200
200
  [data-ui-section] > [data-part-header] > [data-part-title] {
201
+ /* The heading's text, which an inline icon button in the tags takes too. */
202
+ --_text-size: var(--_heading-size);
203
+ --_text-line-height: var(--_heading-line-height);
201
204
  align-items: baseline;
202
205
  display: grid;
203
206
  grid-column: 1;
@@ -225,10 +228,10 @@
225
228
  --slotted-font-family-heading,
226
229
  var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif)
227
230
  );
228
- font-size: var(--_heading-size);
231
+ font-size: var(--_text-size);
229
232
  font-weight: var(--slotted-font-weight-semibold, 600);
230
233
  letter-spacing: 0.08em;
231
- line-height: var(--_heading-line-height);
234
+ line-height: var(--_text-line-height);
232
235
  text-transform: uppercase;
233
236
  grid-column: 1;
234
237
  grid-row: 2;
@@ -243,13 +246,16 @@
243
246
  * section whose body opens with text heavier than a label. It stands above
244
247
  * the subsection's rule, so a nested section keeps the subsection's form.
245
248
  */
249
+ [data-ui-section][data-heading='title'] > [data-part-header] > [data-part-title] {
250
+ --_text-size: var(--_title-size);
251
+ --_text-line-height: var(--_title-line-height);
252
+ }
253
+
246
254
  [data-ui-section][data-heading='title']
247
255
  > [data-part-header]
248
256
  > [data-part-title]
249
257
  > [data-part-heading] {
250
- font-size: var(--_title-size);
251
258
  letter-spacing: normal;
252
- line-height: var(--_title-line-height);
253
259
  text-transform: none;
254
260
  }
255
261
 
@@ -258,15 +264,18 @@
258
264
  * read without the color. The text stays the muted token, which the theme
259
265
  * holds above 4.5:1 on every ground a section stands on.
260
266
  */
267
+ [data-ui-section] [data-ui-section] > [data-part-header] > [data-part-title] {
268
+ --_text-size: var(--_subheading-size);
269
+ --_text-line-height: var(--_subheading-line-height);
270
+ }
271
+
261
272
  [data-ui-section]
262
273
  [data-ui-section]
263
274
  > [data-part-header]
264
275
  > [data-part-title]
265
276
  > [data-part-heading] {
266
277
  color: var(--_muted);
267
- font-size: var(--_subheading-size);
268
278
  letter-spacing: normal;
269
- line-height: var(--_subheading-line-height);
270
279
  text-transform: none;
271
280
  }
272
281
 
@@ -289,6 +298,39 @@
289
298
  display: none;
290
299
  }
291
300
 
301
+ /**
302
+ * An inline icon button is a mark on the text before it, so it takes the
303
+ * heading's text and keeps the distance it keeps after a word: its own
304
+ * margin, with neither the tags' margin nor their gap added to it.
305
+ */
306
+ [data-ui-section]
307
+ > [data-part-header]
308
+ > [data-part-title]
309
+ > [data-part-tags]
310
+ > [data-ui-button][data-shape][data-inline] {
311
+ font-family: var(
312
+ --slotted-font-family-heading,
313
+ var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif)
314
+ );
315
+ font-size: var(--_text-size);
316
+ line-height: var(--_text-line-height);
317
+ }
318
+
319
+ [data-ui-section]
320
+ > [data-part-header]
321
+ > [data-part-title]
322
+ > [data-part-tags]:has(> [data-ui-button][data-shape][data-inline]:first-child) {
323
+ margin-inline-start: 0;
324
+ }
325
+
326
+ [data-ui-section]
327
+ > [data-part-header]
328
+ > [data-part-title]
329
+ > [data-part-tags]
330
+ > [data-ui-button][data-shape][data-inline]:not(:first-child) {
331
+ margin-inline-start: calc(0.25em - var(--slotted-space-3, 0.375rem));
332
+ }
333
+
292
334
  [data-ui-section] > [data-part-header] > [data-part-title] > [data-part-description] {
293
335
  color: var(--_muted);
294
336
  font-size: var(--slotted-font-size-sm, 0.8125rem);
@@ -1204,7 +1204,10 @@
1204
1204
  * half the expander plus a step of the space scale, so the line one level up
1205
1205
  * sits on the expander's center and the row's own expander starts a fixed
1206
1206
  * distance past it. A row without an expander keeps the expander's box as
1207
- * space, so a leaf's text lines up with a sibling's that has one.
1207
+ * space, so a leaf's text lines up with a sibling's that has one. An expander
1208
+ * that leads a cell with no mark stands out of flow in that same space, on
1209
+ * the middle of the content where `cellAlign` places it: in flow it stood on
1210
+ * one line of text, above the middle of any content taller than that line.
1208
1211
  *
1209
1212
  * The guide is one box per row with a line per ancestor level, through the
1210
1213
  * whole row and over the rule above it, so it stays continuous across rows
@@ -1221,23 +1224,53 @@
1221
1224
  --slotted-table-guide-color,
1222
1225
  color-mix(in oklab, var(--slotted-border-strong) 60%, var(--slotted-border-subtle))
1223
1226
  );
1227
+ /* Where the row's lead starts in its cell. */
1228
+ --_own: calc(var(--_pad-inline) + var(--_tree-step) * var(--slotted-table-depth, 0));
1224
1229
  }
1225
1230
 
1231
+ /**
1232
+ * The middle the row's lead stands on: in the cell, in the box of the lines,
1233
+ * which starts a rule above it, and of a line placed there as a tile. A cell
1234
+ * that states `blockAlign` answers for its own lead.
1235
+ */
1226
1236
  [data-ui-table] [data-part-row][data-level] > :nth-child(1 of :not([data-part-selection])) {
1237
+ --_y: 50%;
1238
+ --_at: calc(var(--_y) + var(--_rule-width) / 2);
1239
+ --_tile: calc(var(--_y) + var(--_rule-width) / 2);
1227
1240
  inline-size: auto;
1228
1241
  padding-inline-end: var(--_pad-inline);
1229
- padding-inline-start: calc(
1230
- var(--_pad-inline) + var(--_tree-step) * var(--slotted-table-depth, 0)
1231
- );
1242
+ padding-inline-start: var(--_own);
1232
1243
  }
1233
1244
 
1245
+ [data-ui-table][data-cell-align='start']
1246
+ [data-part-row][data-level]
1247
+ > :nth-child(1 of :not([data-part-selection])):not([data-block-align]),
1234
1248
  [data-ui-table]
1235
1249
  [data-part-row][data-level]
1236
- > :nth-child(1 of :not([data-part-selection])):not(:has(> [data-part-expander])) {
1237
- padding-inline-start: calc(
1238
- var(--_pad-inline) + var(--_tree-step) * var(--slotted-table-depth, 0) +
1239
- var(--slotted-target-min, 24px) + var(--_gap)
1240
- );
1250
+ > :nth-child(1 of :not([data-part-selection]))[data-block-align='start'] {
1251
+ --_y: calc(var(--_pad-block) + var(--_line) / 2);
1252
+ --_at: calc(var(--_y) + var(--_rule-width));
1253
+ }
1254
+
1255
+ [data-ui-table][data-cell-align='end']
1256
+ [data-part-row][data-level]
1257
+ > :nth-child(1 of :not([data-part-selection])):not([data-block-align]),
1258
+ [data-ui-table]
1259
+ [data-part-row][data-level]
1260
+ > :nth-child(1 of :not([data-part-selection]))[data-block-align='end'] {
1261
+ --_y: calc(100% - var(--_pad-block) - var(--_line) / 2);
1262
+ --_at: var(--_y);
1263
+ }
1264
+
1265
+ [data-ui-table]
1266
+ [data-part-row][data-level]
1267
+ > :nth-child(1 of :not([data-part-selection])):not(:has(> [data-part-expander])),
1268
+ [data-ui-table]
1269
+ [data-part-row][data-level]
1270
+ > :nth-child(1 of :not([data-part-selection])):has(> [data-part-expander]:first-child):not(
1271
+ :has(> [data-part-mark])
1272
+ ) {
1273
+ padding-inline-start: calc(var(--_own) + var(--slotted-target-min, 24px) + var(--_gap));
1241
1274
  }
1242
1275
 
1243
1276
  [data-ui-table]
@@ -1277,6 +1310,16 @@
1277
1310
  vertical-align: top;
1278
1311
  }
1279
1312
 
1313
+ [data-ui-table]
1314
+ [data-part-row][data-level]
1315
+ > :nth-child(1 of :not([data-part-selection])):not(:has(> [data-part-mark]))
1316
+ > [data-part-expander]:first-child {
1317
+ inset-block-start: calc(var(--_y) - var(--slotted-target-min, 24px) / 2);
1318
+ inset-inline-start: var(--_own);
1319
+ margin: 0;
1320
+ position: absolute;
1321
+ }
1322
+
1280
1323
  [data-ui-table][data-guides='false']
1281
1324
  [data-part-row][data-level]
1282
1325
  > :nth-child(1 of :not([data-part-selection]))::before {
@@ -1331,7 +1374,11 @@
1331
1374
  --_node-child: round(var(--slotted-table-mark-child-size, 1.25rem), 1px);
1332
1375
  }
1333
1376
 
1334
- /* An expander written before the mark keeps its room in every row. */
1377
+ /* An expander written before the mark keeps its room in every row, and in a
1378
+ table where no row folds when the table asks for it. */
1379
+ [data-ui-table][data-guides='branch'][data-expander-room='always']:has(
1380
+ [data-part-row][data-level] [data-part-mark]
1381
+ ),
1335
1382
  [data-ui-table][data-guides='branch']:has(
1336
1383
  [data-part-row][data-level] > * > [data-part-expander] + [data-part-mark]
1337
1384
  ) {
@@ -1364,11 +1411,6 @@
1364
1411
  --_own: calc(var(--_pad-inline) + var(--_lead));
1365
1412
  --_from: 0px;
1366
1413
  --_mark-size: var(--_node);
1367
- /* The middle of the mark: in the cell, and in the box of the lines, which
1368
- starts a rule above it; the middle of a line placed there as a tile. */
1369
- --_y: 50%;
1370
- --_at: calc(50% + var(--_rule-width) / 2);
1371
- --_tile: calc(50% + var(--_rule-width) / 2);
1372
1414
  }
1373
1415
 
1374
1416
  [data-ui-table][data-guides='branch'] [data-part-row][data-level]:not([data-level='0']) {
@@ -1377,20 +1419,8 @@
1377
1419
  --_mark-size: var(--_node-child);
1378
1420
  }
1379
1421
 
1380
- [data-ui-table][data-guides='branch'][data-cell-align='start'] [data-part-row][data-level] {
1381
- --_y: calc(var(--_pad-block) + var(--_line) / 2);
1382
- --_at: calc(var(--_y) + var(--_rule-width));
1383
- --_tile: calc(var(--_y) + var(--_rule-width) / 2);
1384
- }
1385
-
1386
- [data-ui-table][data-guides='branch'][data-cell-align='end'] [data-part-row][data-level] {
1387
- --_y: calc(100% - var(--_pad-block) - var(--_line) / 2);
1388
- --_at: var(--_y);
1389
- --_tile: calc(var(--_y) + var(--_rule-width) / 2);
1390
- }
1391
-
1392
1422
  /* The row's lead: the mark stands out of flow at one place of its level, and
1393
- the cell keeps its room. An expander before it is in flow, inside the indent. */
1423
+ the cell keeps its room. An expander before it stands inside the indent. */
1394
1424
  [data-ui-table][data-guides='branch']
1395
1425
  [data-part-row][data-level]
1396
1426
  > :nth-child(1 of :not([data-part-selection])) {