actual-css 0.17.1 → 0.19.0

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 (76) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/README.md +10 -6
  3. package/components.json +26 -6
  4. package/dist/actual.full.css +484 -76
  5. package/dist/actual.full.js +2 -2
  6. package/dist/actual.full.min.css +1 -1
  7. package/docs/design-notes/enhancement-contract.md +20 -11
  8. package/docs/design-notes/motion-cost.md +62 -0
  9. package/docs/design-notes/tokens.md +6 -1
  10. package/docs/navigation.json +4 -0
  11. package/docs/pages/components/alert.md +8 -6
  12. package/docs/pages/components/aura.md +3 -0
  13. package/docs/pages/components/button.md +26 -24
  14. package/docs/pages/components/list.md +117 -29
  15. package/docs/pages/components/mark-sweep.md +42 -0
  16. package/docs/pages/components/rating.md +53 -22
  17. package/docs/pages/components/reveal.md +54 -0
  18. package/docs/pages/components/shimmer.md +3 -2
  19. package/docs/pages/components/timeline.md +130 -2
  20. package/docs/pages/enhancements/in-view.md +109 -0
  21. package/docs/pages/enhancements/overview.md +3 -2
  22. package/docs/pages/enhancements/scrollspy.md +5 -5
  23. package/docs/pages/examples/overview.md +7 -2
  24. package/docs/pages/forms/date-picker.md +3 -2
  25. package/docs/pages/forms/switch.md +25 -16
  26. package/docs/pages/foundations/theming.md +6 -4
  27. package/docs/pages/foundations/tokens.md +39 -16
  28. package/docs/pages/foundations/typography.md +13 -2
  29. package/docs/pages/guides/coding-agents.md +163 -0
  30. package/docs/pages/guides/introduction.md +1 -1
  31. package/docs/pages/guides/modular-import.md +1 -1
  32. package/docs/pages/guides/progressive-enhancement.md +2 -1
  33. package/docs/pages/guides/upgrading.md +2 -2
  34. package/docs/pages/layout/scroll-snap.md +26 -1
  35. package/docs/pages/patterns/code-block.md +1 -1
  36. package/docs/pages/patterns/empty-state.md +3 -3
  37. package/docs/pages/patterns/exclusive-accordion.md +3 -2
  38. package/docs/pages/patterns/hierarchical-nav.md +5 -4
  39. package/docs/pages/patterns/icon-input.md +1 -1
  40. package/docs/pages/patterns/icon-slot.md +4 -4
  41. package/docs/pages/patterns/intent-nesting.md +2 -3
  42. package/docs/pages/patterns/navigation-list.md +7 -4
  43. package/docs/pages/patterns/stat.md +3 -3
  44. package/docs/pages/patterns/structured-lists.md +1 -2
  45. package/llms.txt +3 -2
  46. package/package.json +3 -1
  47. package/reserved-classes.json +6 -0
  48. package/skills/actual-css/PROJECT.md.example +13 -2
  49. package/skills/actual-css/README.md +5 -0
  50. package/skills/actual-css/SKILL.md +13 -2
  51. package/src/css/components/alert.css +40 -3
  52. package/src/css/components/button.css +20 -2
  53. package/src/css/components/join.css +3 -10
  54. package/src/css/components/list.css +32 -0
  55. package/src/css/components/navbar.css +13 -5
  56. package/src/css/components/rating.css +23 -2
  57. package/src/css/components/scrollspy.css +4 -2
  58. package/src/css/components/timeline.css +113 -10
  59. package/src/css/core/base.css +16 -0
  60. package/src/css/core/focus.css +13 -12
  61. package/src/css/core/reset.css +10 -0
  62. package/src/css/core/theme.css +15 -0
  63. package/src/css/core/tokens.css +8 -11
  64. package/src/css/effects/aura.css +5 -0
  65. package/src/css/effects/index.css +2 -0
  66. package/src/css/effects/mark-sweep.css +64 -0
  67. package/src/css/effects/reveal.css +66 -0
  68. package/src/css/effects/shimmer.css +28 -10
  69. package/src/css/forms/switch.css +9 -9
  70. package/src/js/full.js +1 -0
  71. package/src/js/in-view.js +152 -0
  72. package/src/js/scrollspy.js +81 -2
  73. package/src/js/selectors.js +3 -0
  74. package/src/tooling/design-components.js +2 -2
  75. package/src/tooling/design-tokens.js +2 -0
  76. package/tokens.json +2 -0
@@ -34,6 +34,16 @@ select {
34
34
  display: none !important;
35
35
  }
36
36
 
37
+ /* The UA hides a closed dialog from its own origin, so any author display
38
+ wins over it, even at zero specificity: `<dialog class="card">` stayed on
39
+ screen after its method="dialog" form closed it. Not !important, unlike
40
+ [hidden]: an important declaration outranks transitions, and the modal's
41
+ exit fade transitions display. A dialog that needs another closed display
42
+ says so with a more specific selector. */
43
+ dialog:not([open]) {
44
+ display: none;
45
+ }
46
+
37
47
  :where(img, svg, video) {
38
48
  max-inline-size: 100%;
39
49
  block-size: auto;
@@ -81,7 +91,10 @@ select {
81
91
  */
82
92
 
83
93
  /* Typography */
84
- --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
94
+ /* The platform's own faces, never a download: a framework cannot assume a
95
+ locally installed family, and naming one renders the same page differently
96
+ on two machines of the same OS. The docs site loads a webfont instead. */
97
+ --font-sans: system-ui, sans-serif;
85
98
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
86
99
  --font-width: 100%;
87
100
  --line-height: 1.5;
@@ -137,19 +150,13 @@ select {
137
150
  --duration-fast: 100ms;
138
151
  --duration-slow: 200ms;
139
152
  --duration-spin: 0.75s;
140
- --duration-shimmer: 1.2s;
153
+ --duration-shimmer: 2s;
141
154
  --ease-enter: cubic-bezier(0.2, 0, 0, 1);
142
155
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
143
156
 
144
- /* Generic focus fallback — an adaptive currentColor line for elements
145
- without a component ring (links, summary, plain items). Components draw
146
- the themed ring instead: --focus-ring-width solid --focus. See focus.css
147
- for the two contracts. Both share --focus-ring-width: they differ in
148
- color only. No --focus-outline alias here: declared on :root it would be
149
- inherited already computed, so a theme island or a region setting
150
- --focus-ring-width would not reach it. focus.css composes the line on the
151
- focused element instead. */
152
- --focus-outline-color: currentColor;
157
+ /* Focus geometry is shared by the generic line and component rings.
158
+ focus.css composes the line on its target; the optional color and whole-
159
+ outline hooks stay unset so local theme tokens reach their fallbacks. */
153
160
  --focus-outline-offset: 2px;
154
161
  --focus-ring-width: 2px;
155
162
 
@@ -416,6 +423,11 @@ select {
416
423
  --text-muted: hsl(259 9% 42%);
417
424
  --text-subtle: hsl(258 7% 57%);
418
425
 
426
+ /* Highlight pair for <mark> and .mark-sweep: a warm, non-warning yellow that
427
+ keeps the phrase legible in both schemes. */
428
+ --mark-bg: hsl(48 95% 68%);
429
+ --mark-fg: hsl(38 45% 12%);
430
+
419
431
  /* Lines and focus */
420
432
  --border: hsl(260 15% 88%);
421
433
  /* A primary-hued mid-tone on purpose, one value for both schemes: focus
@@ -472,6 +484,16 @@ select {
472
484
  --control-default-bg: var(--surface);
473
485
  }
474
486
 
487
+ /* Custom properties accept unknown functions, so guard the pair to preserve
488
+ the light fallback. Redeclare on islands to follow their own color-scheme. */
489
+ @supports (color: light-dark(red, blue)) {
490
+ :root,
491
+ [data-theme] {
492
+ --mark-bg: light-dark(hsl(48 95% 68%), hsl(44 55% 30%));
493
+ --mark-fg: light-dark(hsl(38 45% 12%), hsl(44 60% 94%));
494
+ }
495
+ }
496
+
475
497
  @supports (color: color-mix(in oklab, red, white)) {
476
498
  :root,
477
499
  [data-theme] {
@@ -692,6 +714,22 @@ small {
692
714
  font-size: 0.875em;
693
715
  }
694
716
 
717
+ /* A semantic highlight. The UA's yellow ignores the theme and clashes with a
718
+ dark palette, so the pair comes from the theme instead. `.mark-sweep` reuses
719
+ the same pair for its animated background. Forced colors keep the system
720
+ Mark pair, the one place the glyph/background relationship is guaranteed. */
721
+ mark {
722
+ background: var(--mark-bg);
723
+ color: var(--mark-fg);
724
+ }
725
+
726
+ @media (forced-colors: active) {
727
+ mark {
728
+ background: Mark;
729
+ color: MarkText;
730
+ }
731
+ }
732
+
695
733
  ::selection {
696
734
  background: var(--selection-bg, var(--primary));
697
735
  color: var(--selection-fg, var(--primary-fg));
@@ -947,17 +985,11 @@ small {
947
985
  for its keyboard focus indicator; forced colors keep outlines and drop
948
986
  shadows.
949
987
 
950
- Two contracts share the job, both --focus-ring-width wide. Text-like
951
- elements, whose ink is the thing being focused (links, summary, .nav-link,
952
- .menu-item, breadcrumb links, .navbar-brand), declare no outline and take
953
- the generic fallback below: a currentColor line that follows whatever the
954
- application painted. Boxed components, with a fill or border of their own,
955
- draw the themed ring instead — a solid line in --focus: inset on fields
956
- (inside their border box), offset by --focus-outline-offset on discrete
957
- actions. The color never derives from an intent or a local
958
- surface — the theme guarantees --focus at 3:1 against both --surface and
959
- --surface-solid, so one token reads on the page, on a solid band and on
960
- any nested surface.
988
+ All default indicators use --focus, independently of intent, selection or
989
+ text color. Components adapt the geometry: inset on fields (inside their
990
+ border box), offset by --focus-outline-offset on discrete actions. Themes
991
+ target 3:1 against --surface and --surface-solid; other painted backgrounds
992
+ still need their own contrast check.
961
993
 
962
994
  A .segment is an action but takes the inset ring: its track's padding is
963
995
  narrower than an offset ring, which would cover the neighbouring segment.
@@ -969,9 +1001,16 @@ small {
969
1001
 
970
1002
  Public hooks:
971
1003
  --focus-outline (fallback-only: replaces the whole generic line)
1004
+ --focus-outline-color (fallback-only: overrides the generic line color)
972
1005
  */
973
1006
  :focus {
974
- outline: var(--focus-outline, var(--focus-ring-width) solid var(--focus-outline-color));
1007
+ /* Resolve the default on the target: a root alias would freeze --focus
1008
+ before a theme island or a plain region could override it. Keeping the
1009
+ color hook unset also lets an inherited author override cross islands. */
1010
+ outline: var(
1011
+ --focus-outline,
1012
+ var(--focus-ring-width) solid var(--focus-outline-color, var(--focus))
1013
+ );
975
1014
  outline-offset: var(--focus-outline-offset);
976
1015
  }
977
1016
 
@@ -3164,11 +3203,12 @@ small {
3164
3203
 
3165
3204
  .switch {
3166
3205
  --switch-bg: var(--border);
3167
- --switch-border: var(--border-control);
3206
+ /* Keep the border in the geometry without outlining the track. */
3207
+ --switch-border: var(--switch-bg);
3168
3208
  --switch-knob: var(--surface-raised);
3169
3209
  --switch-block-size: calc(var(--choice-control-size) + 0.125em);
3170
3210
  --switch-width: calc(var(--switch-block-size) * 1.8);
3171
- --switch-knob-margin: calc(var(--switch-block-size) * 0.08);
3211
+ --switch-knob-margin: calc(var(--switch-block-size) * 0.1);
3172
3212
 
3173
3213
  /* The knob is concentric in the track: --switch-block-size is a border-box
3174
3214
  height, so the borders have to come out before the inset is applied on
@@ -3231,16 +3271,16 @@ small {
3231
3271
  background-color var(--duration);
3232
3272
  }
3233
3273
 
3234
- /* Hover is not selected: an unchecked switch keeps the brand fallback on hover,
3235
- so a theme that separates --primary from --state-selected never tints an
3236
- OFF control with the selection accent before it is checked. */
3237
- .switch:not(:checked):hover:not(:disabled) {
3238
- --switch-border: var(--intent, var(--primary));
3274
+ /* Guard the custom property so older browsers keep the resting fill rather
3275
+ than substituting an unsupported mix into both background and border. */
3276
+ @supports (color: color-mix(in oklab, black, white)) {
3277
+ .switch:not(:checked):hover:not(:disabled) {
3278
+ --switch-bg: color-mix(in oklab, var(--text) 10%, var(--border));
3279
+ }
3239
3280
  }
3240
3281
 
3241
3282
  .switch:checked {
3242
3283
  --switch-bg: var(--intent, var(--state-selected));
3243
- --switch-border: var(--intent, var(--state-selected));
3244
3284
  --switch-knob: var(--intent-fg, var(--state-selected-fg));
3245
3285
  }
3246
3286
 
@@ -3271,7 +3311,6 @@ small {
3271
3311
 
3272
3312
  .switch:disabled {
3273
3313
  --switch-bg: var(--surface-subtle);
3274
- --switch-border: var(--border);
3275
3314
  --switch-knob: var(--state-disabled);
3276
3315
  opacity: 1;
3277
3316
  cursor: not-allowed;
@@ -4426,8 +4465,26 @@ small {
4426
4465
  --ui-border: transparent;
4427
4466
  }
4428
4467
 
4429
- /* Solid keeps the overlay darkening on hover; soft/outline/ghost/link stay
4430
- flat. The soft hover is its own fill change (--soft-hover-alpha) — a second
4468
+ /* A neutral outline is a quiet action, so its edge is the control edge that
4469
+ identifies a field, not the full text ink. An explicit intent still wins
4470
+ through --intent, and --border-control stays the theme's override point. */
4471
+ .btn.outline {
4472
+ --ui-border: var(--intent, var(--border-control));
4473
+ }
4474
+
4475
+ /* A surface button is neutral chrome, so it hovers at the .outline rate: an
4476
+ opaque mix keeps its fill (--ui-bg, so an author override follows), and ink
4477
+ rather than a black wash stays visible on a dark page. Without color-mix()
4478
+ the solid overlay is the fallback. */
4479
+ @supports (color: color-mix(in oklab, red, white)) {
4480
+ .btn.surface {
4481
+ --ui-hover-bg: color-mix(in oklab, var(--ui-bg) 90%, var(--intent, var(--text)));
4482
+ --btn-hover-overlay: transparent;
4483
+ }
4484
+ }
4485
+
4486
+ /* Solid keeps the overlay darkening on hover. The recipes below keep their
4487
+ fill: the soft hover is its own fill change (--soft-hover-alpha) — a second
4431
4488
  overlay on top would double the fill step and drag its ink below the resting
4432
4489
  contrast on every intent. Routed through a variable instead of a
4433
4490
  :not(.outline, .ghost, .link) exclusion so the hover rule below only has to
@@ -4964,8 +5021,10 @@ a.badge[aria-disabled="true"] {
4964
5021
  * --alert-pad-block
4965
5022
  * --alert-pad-inline
4966
5023
  * --alert-font-size
5024
+ * --alert-line-height
4967
5025
  * --alert-radius
4968
5026
  * --alert-icon-size
5027
+ * --alert-icon-nudge
4969
5028
  * --alert-border-inline-start-color
4970
5029
  * --alert-border-inline-start-width
4971
5030
  *
@@ -4992,6 +5051,7 @@ a.badge[aria-disabled="true"] {
4992
5051
  --alert-pad-block: var(--space-30);
4993
5052
  --alert-pad-inline: var(--space-40);
4994
5053
  --alert-font-size: var(--font-size-md);
5054
+ --alert-line-height: var(--line-height);
4995
5055
  --alert-icon-size: 1.25rem;
4996
5056
  --alert-default-bg: var(--surface-subtle);
4997
5057
  --alert-default-fg: var(--intent, var(--text));
@@ -5009,6 +5069,11 @@ a.badge[aria-disabled="true"] {
5009
5069
  border-inline-start-width: var(--alert-border-inline-start-width, var(--border-width));
5010
5070
  border-radius: var(--alert-radius, var(--radius-lg));
5011
5071
  font-size: var(--alert-font-size);
5072
+ /* why: the icon offset below is derived from this line box. Inheriting the
5073
+ leading would leave the formula blind to a container that changed it, so
5074
+ the alert owns its line height the way it owns its font size; an author
5075
+ changing the rhythm sets the hook, not `line-height` directly. */
5076
+ line-height: var(--alert-line-height);
5012
5077
  }
5013
5078
 
5014
5079
  /* Density steps the block padding only: the inline padding is the text
@@ -5030,7 +5095,7 @@ a.badge[aria-disabled="true"] {
5030
5095
  siblings instead of a wrapper carrying an inline --gap. What made that pair
5031
5096
  read as detached is the UA paragraph margin: trimming only the outer edges
5032
5097
  left it in place between them. Content keeps its own internal rhythm — a
5033
- nested list keeps its bullets and padding, a .prose child keeps its flow.
5098
+ list keeps its bullets, a .prose child keeps its flow.
5034
5099
  The slots are excluded because they are anatomy, not content: an
5035
5100
  admonition's title bar has to stay flush against its body. The list follows
5036
5101
  the anatomy, so it grows with it. */
@@ -5044,6 +5109,13 @@ a.badge[aria-disabled="true"] {
5044
5109
  margin-block-start: var(--space-10);
5045
5110
  }
5046
5111
 
5112
+ /* why: the UA indent (40px) set a list's bullets in a column of their own,
5113
+ detached from the title above it. The bullets start on the text column's
5114
+ edge instead, the way an error summary reads. */
5115
+ .alert > :where(ul, ol) {
5116
+ padding-inline-start: 1.25em;
5117
+ }
5118
+
5047
5119
  /* Alerts are soft by default. The recipe writes local defaults rather than
5048
5120
  --ui-* so an explicit shared treatment always wins without exclusions. The
5049
5121
  fill is the translucent soft tint (see badge.css), with no rim unless a
@@ -5136,13 +5208,25 @@ a.badge[aria-disabled="true"] {
5136
5208
  icon sat in the title row alone — any icon taller than one line inflated
5137
5209
  that row and pushed the body down. Spanning the title and body rows lets
5138
5210
  its height spread over both; only an icon taller than both together still
5139
- splits its excess between them. */
5211
+ splits its excess between them. Spanning is also why the icon cannot ride
5212
+ the text baseline (align-self: baseline): a baseline group over both
5213
+ rows would let a tall icon set the row's baseline, inflating row 1 and
5214
+ pushing the title down — the regression alert-anatomy.test.js guards. */
5140
5215
  .alert:has(> .alert-icon) > .alert-icon {
5141
5216
  grid-column: 1;
5142
5217
  grid-row: 1 / span 2;
5143
5218
  display: inline-grid;
5144
5219
  place-items: center;
5145
- margin-block-start: 0.125em;
5220
+ /* The line box's centre is not the cap-height centre: cap/ex cannot derive
5221
+ an optical correction from it. Keep glyph corrections explicit.
5222
+ --alert-font-size must stay in rem or px because em resolves against
5223
+ the icon's own size here. The nudge also accommodates a theme tile whose
5224
+ padding and border grow the icon box (neo-brutalist). */
5225
+ margin-block-start: calc(
5226
+ (var(--alert-line-height) * var(--alert-font-size) - var(--alert-icon-size)) /
5227
+ 2 +
5228
+ var(--alert-icon-nudge, 0px)
5229
+ );
5146
5230
  }
5147
5231
 
5148
5232
  .alert:has(> .alert-icon) > :not(.alert-icon, .close) {
@@ -5160,6 +5244,11 @@ a.badge[aria-disabled="true"] {
5160
5244
  .alert:has(> .close) > .close {
5161
5245
  grid-column: -2 / -1;
5162
5246
  grid-row: 1;
5247
+ /* why: the button is taller than the line, so top-aligned it sat 2px below
5248
+ the title centre, opposite an icon centred on it, and grew row 1, pushing
5249
+ the body down. Equal negative margins centre it on the first line box and
5250
+ let it overflow into the padding instead; the hit area is unchanged. */
5251
+ margin-block: calc((var(--alert-line-height) * var(--alert-font-size) - var(--close-size)) / 2);
5163
5252
  }
5164
5253
  /* Links */
5165
5254
  .alert :where(a:not(.btn)) {
@@ -5211,6 +5300,11 @@ a.badge[aria-disabled="true"] {
5211
5300
  border-start-end-radius: calc(var(--alert-radius, var(--radius-lg)) - var(--border-width));
5212
5301
  }
5213
5302
 
5303
+ /* Translate preserves the title bar's flex geometry when nudging a glyph. */
5304
+ .alert.admonition > .alert-title > .alert-icon {
5305
+ translate: 0 var(--alert-icon-nudge, 0px);
5306
+ }
5307
+
5214
5308
  /* Close inside an admonition title bar rides the inline end. */
5215
5309
  .alert.admonition > .alert-title > .close {
5216
5310
  margin-inline-start: auto;
@@ -7888,6 +7982,7 @@ a.avatar[aria-disabled="true"] {
7888
7982
  * --rating-empty
7889
7983
  * --rating-star
7890
7984
  * --rating-star-empty (the empty star's shape; the filled one by default)
7985
+ * --rating-star-outline (a ready outline of the default star, for the hook above)
7891
7986
  * --rating-value (display: the shown value, fractions allowed)
7892
7987
  * --rating-max (display: the number of stars)
7893
7988
  *
@@ -7903,10 +7998,18 @@ a.avatar[aria-disabled="true"] {
7903
7998
  .rating {
7904
7999
  --rating-size: 1.25rem;
7905
8000
  --rating-gap: var(--space-10);
7906
- --rating-color: var(--intent, var(--warning));
8001
+ /* why: gold stars are the convention a reader recognizes, so the default
8002
+ owns its color instead of borrowing --warning's meaning. A literal, not
8003
+ light-dark(): it reads on both schemes, and an unsupported light-dark()
8004
+ here would invalidate the fill. Accepted trade-off: 2.1:1 on a white
8005
+ surface, under the 3:1 graphics target; the value lives in the
8006
+ aria-label, and a theme picks its own ink on .rating. */
8007
+ --rating-color: var(--intent, hsl(38 92% 50%));
7907
8008
  --rating-empty: var(--border);
7908
8009
  --rating-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='2 2 16 16'%3E%3Cpath d='M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 0 0 .95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0 0-.364 1.118l1.07 3.292c.3.922-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0 0-1.175 0l-2.8 2.034c-.783.57-1.838-.196-1.539-1.118l1.07-3.292a1 1 0 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 0 0 .951-.69l1.07-3.292Z'/%3E%3C/svg%3E");
7909
- /* An outline here turns the empty stars into a shape cue (see the docs). */
8010
+ /* The default star stroked inside its own clip, so the line never grows
8011
+ the silhouette and a filled and an empty star stay the same size. */
8012
+ --rating-star-outline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='2 2 16 16'%3E%3CclipPath id='c'%3E%3Cpath d='M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 0 0 .95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0 0-.364 1.118l1.07 3.292c.3.922-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0 0-1.175 0l-2.8 2.034c-.783.57-1.838-.196-1.539-1.118l1.07-3.292a1 1 0 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 0 0 .951-.69l1.07-3.292Z'/%3E%3C/clipPath%3E%3Cpath d='M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 0 0 .95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 0 0-.364 1.118l1.07 3.292c.3.922-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 0 0-1.175 0l-2.8 2.034c-.783.57-1.838-.196-1.539-1.118l1.07-3.292a1 1 0 0 0-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 0 0 .951-.69l1.07-3.292Z' fill='none' stroke='black' stroke-width='2.4' clip-path='url(%23c)'/%3E%3C/svg%3E");
7910
8013
  --rating-star-empty: var(--rating-star);
7911
8014
 
7912
8015
  display: inline-flex;
@@ -7914,6 +8017,18 @@ a.avatar[aria-disabled="true"] {
7914
8017
  color: var(--rating-color);
7915
8018
  }
7916
8019
 
8020
+ /* why: an empty star is a fill, not a stroke. --border is a stroke token, and
8021
+ a theme with ink-dark borders (brutalist, cyberpunk) turned every empty star
8022
+ solid black, louder than the filled ones. A light ink tint over the surface
8023
+ reads as the same pale star on every theme. Guarded: inside a custom
8024
+ property an unsupported color-mix() would invalidate the fill, not fall back
8025
+ to --border. */
8026
+ @supports (color: color-mix(in oklab, red, white)) {
8027
+ .rating {
8028
+ --rating-empty: color-mix(in oklab, var(--text) 15%, var(--surface));
8029
+ }
8030
+ }
8031
+
7917
8032
  .rating > input[type="radio"] {
7918
8033
  appearance: none;
7919
8034
  flex: 0 0 auto;
@@ -8504,18 +8619,29 @@ a.avatar[aria-disabled="true"] {
8504
8619
  * place. A direct <time> child is the event's dateline. The content stays in
8505
8620
  * block flow, so a sentence mixing text and links is never split into items.
8506
8621
  *
8622
+ * .timeline-dates-end moves every dateline to the inline end of the event's
8623
+ * first line, beside the title instead of above it.
8624
+ *
8507
8625
  * Progress through a process is .steps, not a timeline.
8508
8626
  *
8509
8627
  * Public hooks:
8510
8628
  * --timeline-dot-size
8511
8629
  * --timeline-slot-size
8630
+ * --timeline-glyph-size
8512
8631
  * --timeline-gap
8513
8632
  * --timeline-inline-gap
8514
8633
  * --timeline-line-size
8634
+ * --timeline-marker-nudge
8515
8635
  *
8516
8636
  * Internal:
8517
8637
  * --timeline-rail-size
8518
8638
  * --timeline-line-box
8639
+ * --timeline-marker-shift
8640
+ * --timeline-marker-inset
8641
+ * --timeline-marker-center
8642
+ * --timeline-slot-bg
8643
+ * --timeline-slot-border
8644
+ * --timeline-slot-fg
8519
8645
  */
8520
8646
 
8521
8647
  /* Registered so the event's line box computes to a length on the <li> and
@@ -8531,9 +8657,18 @@ a.avatar[aria-disabled="true"] {
8531
8657
  initial-value: 0px;
8532
8658
  }
8533
8659
 
8660
+ /* An author nudge in em must resolve against the event's text before it
8661
+ inherits into a slot with a different glyph size. */
8662
+ @property --timeline-marker-shift {
8663
+ syntax: "<length>";
8664
+ inherits: true;
8665
+ initial-value: 0px;
8666
+ }
8667
+
8534
8668
  .timeline {
8535
8669
  --timeline-dot-size: 0.625rem;
8536
- --timeline-slot-size: 1.75rem;
8670
+ --timeline-slot-size: 2rem;
8671
+ --timeline-glyph-size: calc(var(--timeline-slot-size) / 2);
8537
8672
  --timeline-gap: var(--density-space);
8538
8673
  --timeline-inline-gap: var(--space-30);
8539
8674
  --timeline-line-size: var(--border-width);
@@ -8561,11 +8696,38 @@ a.avatar[aria-disabled="true"] {
8561
8696
 
8562
8697
  /* The line box is a length, not the unitless ratio: a smaller <time> opening
8563
8698
  the event keeps the same first line as text would, so the marker centred on
8564
- it lines up whichever element comes first. */
8699
+ it lines up whichever element comes first.
8700
+
8701
+ A slot taller than the line box would overflow the event above and below:
8702
+ the first marker would poke out of the list (clipped by a card with
8703
+ overflow), and the gap between two discs would shrink below the gap. The
8704
+ inset pushes the first line down until the marker, nudge included, starts
8705
+ at the top, and the minimum size ends the event at the marker's bottom, so
8706
+ the event box always holds its marker. Every marker position derives from
8707
+ the one centre.
8708
+
8709
+ Points, discs and avatars share the first line box's centre. The nudge
8710
+ moves that shared geometry; correct an off-centre glyph inside its disc
8711
+ instead, so the marker and rail stay aligned. */
8565
8712
  .timeline > li {
8566
8713
  --timeline-line-box: calc(var(--line-height) * 1em);
8714
+ --timeline-marker-shift: var(--timeline-marker-nudge, 0px);
8715
+ --timeline-marker-inset: max(
8716
+ 0px,
8717
+ (var(--timeline-rail-size) - var(--timeline-line-box)) /
8718
+ 2 -
8719
+ var(--timeline-marker-shift)
8720
+ );
8721
+ --timeline-marker-center: calc(
8722
+ var(--timeline-marker-inset) +
8723
+ var(--timeline-line-box) /
8724
+ 2 +
8725
+ var(--timeline-marker-shift)
8726
+ );
8567
8727
 
8568
8728
  position: relative;
8729
+ min-block-size: calc(var(--timeline-marker-center) + var(--timeline-rail-size) / 2);
8730
+ padding-block-start: var(--timeline-marker-inset);
8569
8731
  padding-inline-start: calc(var(--timeline-rail-size) + var(--timeline-inline-gap));
8570
8732
  line-height: var(--timeline-line-box);
8571
8733
  }
@@ -8580,12 +8742,43 @@ a.avatar[aria-disabled="true"] {
8580
8742
  display: block;
8581
8743
  color: var(--text-muted);
8582
8744
  font-size: var(--font-size-sm);
8745
+ /* Equal-width digits keep times aligned down the list. */
8746
+ font-variant-numeric: tabular-nums;
8747
+ }
8748
+
8749
+ /* A float, not a grid: a grid would turn each run of bare text between links
8750
+ into its own item and split the sentence. The dateline comes first in the
8751
+ source, so it floats on the first line and shares its line box; the text
8752
+ wraps beside it, and the next lines take the full width. flow-root keeps a
8753
+ float taller than a one-line event inside the <li>, where the rail segment
8754
+ measures from. */
8755
+ .timeline-dates-end > li {
8756
+ display: flow-root;
8757
+ }
8758
+
8759
+ .timeline-dates-end > li > time {
8760
+ float: inline-end;
8761
+ /* The strut below grows the dateline's line past the line box; held to
8762
+ one line box, the float never narrows the event's second line. */
8763
+ block-size: var(--timeline-line-box);
8764
+ margin-inline-start: var(--timeline-inline-gap);
8765
+ }
8766
+
8767
+ /* A float lays out its own line, so the smaller dateline centres in the line
8768
+ box while the title beside it sits on the event's baseline: a pixel or two
8769
+ apart, by font, and the eye compares baselines on a shared row. An empty
8770
+ strut at the event's font size gives the dateline's line that same
8771
+ baseline. The size comes from the registered line box, since 1em here is
8772
+ the dateline's own. */
8773
+ .timeline-dates-end > li > time::before {
8774
+ content: "";
8775
+ font-size: calc(var(--timeline-line-box) / var(--line-height));
8583
8776
  }
8584
8777
 
8585
8778
  .timeline > li::before {
8586
8779
  content: "";
8587
8780
  position: absolute;
8588
- inset-block-start: calc((var(--timeline-line-box) - var(--timeline-dot-size)) / 2);
8781
+ inset-block-start: calc(var(--timeline-marker-center) - var(--timeline-dot-size) / 2);
8589
8782
  inset-inline-start: calc((var(--timeline-rail-size) - var(--timeline-dot-size)) / 2);
8590
8783
  inline-size: var(--timeline-dot-size);
8591
8784
  block-size: var(--timeline-dot-size);
@@ -8607,7 +8800,7 @@ a.avatar[aria-disabled="true"] {
8607
8800
  .timeline > li:not(:last-child)::after {
8608
8801
  content: "";
8609
8802
  position: absolute;
8610
- inset-block-start: calc((var(--timeline-line-box) + var(--timeline-rail-size)) / 2);
8803
+ inset-block-start: calc(var(--timeline-marker-center) + var(--timeline-rail-size) / 2);
8611
8804
  inset-inline-start: calc((var(--timeline-rail-size) - var(--timeline-line-size)) / 2);
8612
8805
  block-size: calc(100% + var(--timeline-gap) - var(--timeline-rail-size));
8613
8806
  border-inline-start: var(--timeline-line-size) solid var(--border);
@@ -8617,25 +8810,50 @@ a.avatar[aria-disabled="true"] {
8617
8810
  --avatar-size: var(--timeline-rail-size);
8618
8811
 
8619
8812
  position: absolute;
8620
- inset-block-start: calc((var(--timeline-line-box) - var(--timeline-rail-size)) / 2);
8813
+ inset-block-start: calc(var(--timeline-marker-center) - var(--timeline-rail-size) / 2);
8621
8814
  inset-inline-start: 0;
8622
8815
  }
8623
8816
 
8624
8817
  /* An icon slot gets a disc of the avatar's size, so both slot kinds read as one
8625
- rail. The event's intent colors the glyph. */
8818
+ rail. The event's intent colors the glyph, sized from the slot so a larger
8819
+ disc never looks empty. */
8626
8820
  .timeline > li > [aria-hidden="true"]:first-child:not(.avatar) {
8627
8821
  display: grid;
8628
8822
  place-items: center;
8629
8823
  inline-size: var(--timeline-rail-size);
8630
8824
  block-size: var(--timeline-rail-size);
8631
- border: var(--border-width) solid var(--border);
8825
+ border: var(--border-width) solid var(--timeline-slot-border, var(--border));
8632
8826
  border-radius: var(--radius-full);
8633
- background: var(--surface-opaque);
8634
- color: var(--intent, var(--text-muted));
8635
- font-size: var(--font-size-sm);
8827
+ background: var(--timeline-slot-bg, var(--surface-opaque));
8828
+ color: var(--timeline-slot-fg, var(--intent, var(--text-muted)));
8829
+ font-size: var(--timeline-glyph-size);
8636
8830
  line-height: 1;
8637
8831
  }
8638
8832
 
8833
+ /* An event with an intent tints its disc like a soft badge: a translucent
8834
+ fill, a rim, and the soft ink. Each mix names var(--intent) bare, so an
8835
+ event without one leaves them guaranteed-invalid and the disc falls back to
8836
+ the neutral surface above. Guarded because an unsupported color-mix() in a
8837
+ custom property is not dropped: it would void the fallback with it. */
8838
+ @supports (color: color-mix(in oklch, red, white)) {
8839
+ .timeline > li > [aria-hidden="true"]:first-child:not(.avatar) {
8840
+ --timeline-slot-bg: color-mix(
8841
+ in oklab,
8842
+ var(--intent) calc(100% - var(--soft-bg-mix)),
8843
+ transparent
8844
+ );
8845
+ --timeline-slot-border: color-mix(
8846
+ in oklab,
8847
+ var(--intent) calc(100% - var(--soft-border-mix, 70%)),
8848
+ transparent
8849
+ );
8850
+ --timeline-slot-fg: var(
8851
+ --intent-soft-fg,
8852
+ color-mix(in oklab, var(--text), var(--intent) var(--soft-fg-mix))
8853
+ );
8854
+ }
8855
+ }
8856
+
8639
8857
  .timeline > li > [aria-hidden="true"]:first-child:not(.avatar) > svg {
8640
8858
  inline-size: 1em;
8641
8859
  block-size: 1em;
@@ -8769,10 +8987,12 @@ a.avatar[aria-disabled="true"] {
8769
8987
  * Public hooks:
8770
8988
  * --nav-current-bg (fallback-only: current-link fill)
8771
8989
  * --nav-current-fg (fallback-only: current-link ink)
8772
- * --nav-list-indent (fallback-only: nested .nav-list inset)
8990
+ * --nav-list-icon-size (fallback-only: leading icon width the nested rail centres on)
8991
+ * --nav-list-rail-color (fallback-only: transparent hides the rail, alignment kept)
8773
8992
  *
8774
8993
  * Internal:
8775
8994
  * --gap (local value for the shared gap token)
8995
+ * --nav-list-rail-inset (half the icon on each side of the nested rail)
8776
8996
  */
8777
8997
  /* Intent boundary — inherited intents do not tint this component.
8778
8998
  Local intent classes still win because :where() has zero specificity.
@@ -8937,12 +9157,18 @@ a.avatar[aria-disabled="true"] {
8937
9157
  transform: rotate(180deg);
8938
9158
  }
8939
9159
 
8940
- /* A nested list is indented so its labels start under the parent's label,
8941
- past a 1em leading icon and the link gap. Fallback-only: a base
8942
- declaration on .nav-list would reset an override at every level. */
9160
+ /* A nested list hangs from a rail under the centre of the parent's leading
9161
+ icon, and its labels start under the parent's label. The two halves of the
9162
+ icon split around the rail, which balances because .nav-link's gap and
9163
+ inline padding are the same step. --nav-list-icon-size is the icon's width,
9164
+ fallback-only: a base declaration on .nav-list would reset an override at
9165
+ every level. */
8943
9166
  .nav-list .nav-list {
8944
9167
  margin-block-start: var(--gap);
8945
- padding-inline-start: var(--nav-list-indent, calc(1em + var(--space-20)));
9168
+ --nav-list-rail-inset: calc((var(--nav-list-icon-size, 1em) - var(--border-width)) / 2);
9169
+ margin-inline-start: calc(var(--space-20) + var(--nav-list-rail-inset));
9170
+ padding-inline-start: var(--nav-list-rail-inset);
9171
+ border-inline-start: var(--border-width) solid var(--nav-list-rail-color, var(--border));
8946
9172
  }
8947
9173
 
8948
9174
  /* Forced colors drops the fill and maps both inks to LinkText, so the current
@@ -9704,11 +9930,13 @@ a.avatar[aria-disabled="true"] {
9704
9930
  */
9705
9931
 
9706
9932
  @supports selector(.scrollspy a:target-current) {
9707
- .scrollspy {
9933
+ /* Native and JS activation lines can select different links. Once JS has
9934
+ a current location, it owns the state and the native group must yield. */
9935
+ .scrollspy:not(:has([aria-current="location"])) {
9708
9936
  scroll-target-group: auto;
9709
9937
  }
9710
9938
 
9711
- .scrollspy a:target-current {
9939
+ .scrollspy:not(:has([aria-current="location"])) a:target-current {
9712
9940
  color: var(--text);
9713
9941
  font-weight: var(--font-weight-medium);
9714
9942
  }
@@ -9777,6 +10005,7 @@ a.avatar[aria-disabled="true"] {
9777
10005
  * --list-item-pad-inline
9778
10006
  * --list-item-gap
9779
10007
  * --list-divider
10008
+ * --list-radius
9780
10009
  */
9781
10010
  .list {
9782
10011
  --list-item-min-size: var(--control-size-lg);
@@ -9798,6 +10027,37 @@ a.avatar[aria-disabled="true"] {
9798
10027
  margin: 0;
9799
10028
  }
9800
10029
 
10030
+ /*
10031
+ * Grouped — the list owns a raised surface for rows that stand alone: a
10032
+ * settings group, a member list, an active-sessions panel. A bare list (the
10033
+ * default) leaves the surface to its container, so the shell is opt-in.
10034
+ *
10035
+ * The shell replaces the leading divider with its own border. It is not a
10036
+ * scroll container: a row flyout must be able to escape it. The first and last
10037
+ * rows carry the matching corner radius directly instead, which keeps a hover
10038
+ * or current fill inside the shell without clipping the panel.
10039
+ */
10040
+ .list.grouped {
10041
+ --list-item-pad-inline: var(--space-40);
10042
+ --list-radius: var(--radius-lg);
10043
+
10044
+ border: var(--border-width) solid var(--border);
10045
+ border-radius: var(--list-radius);
10046
+ background: var(--surface-raised);
10047
+ }
10048
+
10049
+ /* A row's fill sits inside the shell's border box, so its inner radius is the
10050
+ shell radius minus that border — and never negative on a square theme. */
10051
+ .list.grouped > :where(li:first-child > .list-item, .list-item:first-child) {
10052
+ border-start-start-radius: max(0px, calc(var(--list-radius) - var(--border-width)));
10053
+ border-start-end-radius: max(0px, calc(var(--list-radius) - var(--border-width)));
10054
+ }
10055
+
10056
+ .list.grouped > :where(li:last-child > .list-item, .list-item:last-child) {
10057
+ border-end-start-radius: max(0px, calc(var(--list-radius) - var(--border-width)));
10058
+ border-end-end-radius: max(0px, calc(var(--list-radius) - var(--border-width)));
10059
+ }
10060
+
9801
10061
  /*
9802
10062
  * Flex, not a three-track grid: the leading and trailing regions are optional,
9803
10063
  * and a fixed `auto minmax(0, 1fr) auto` template gives an absent region a
@@ -10248,16 +10508,9 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
10248
10508
 
10249
10509
  /* Text controls paint their own inset focus outline (control.css), so a
10250
10510
  .join never moves the ring to the group: button-only groups and wrapped
10251
- inputs alike keep per-control focus, with no :has() group treatment. */
10252
-
10253
- /* A default outline action belongs to the composite field border. An explicit
10254
- intent still provides its own outline color — --intent is guaranteed-invalid
10255
- for a neutral button (the :where(.btn) boundary), so the fallback applies.
10256
- The second :has() covers a control nested one wrapper level deep. */
10257
- .join:has(> :is(.input, .textarea, .select)) > .btn.outline,
10258
- .join:has(> * > :is(.input, .textarea, .select)) > .btn.outline {
10259
- --btn-border-color: var(--intent, var(--border-control));
10260
- }
10511
+ inputs alike keep per-control focus, with no :has() group treatment.
10512
+ A neutral outline action draws the same --border-control edge as the field
10513
+ by its own base rule, so the group needs no special case. */
10261
10514
 
10262
10515
  /* Effects — purely visual enrichments. */
10263
10516
  /*
@@ -10272,6 +10525,11 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
10272
10525
  * follows the animated gradient, so a rotating aura repaints one blurred layer
10273
10526
  * per frame, not two.
10274
10527
  *
10528
+ * Per-frame cost is the registered --aura-angle animation itself: style and a
10529
+ * full repaint every frame, off screen too. Containment and a static near
10530
+ * halo do not change it; a compositor rotation needs an extra element. Measured
10531
+ * in docs/design-notes/motion-cost.md (bun run report:paint).
10532
+ *
10275
10533
  * Public hooks:
10276
10534
  * --aura-color
10277
10535
  * --aura-width
@@ -10455,6 +10713,138 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
10455
10713
  --aura-radius: var(--radius-full);
10456
10714
  }
10457
10715
 
10716
+ /*
10717
+ * Mark sweep — a highlight that sweeps in behind a phrase.
10718
+ *
10719
+ * Docs: docs/pages/components/mark-sweep.md
10720
+ *
10721
+ * <mark> carries the semantics of contextually relevant text and is styled by
10722
+ * base.css. `.mark-sweep` is the effect alone and composes on any inline
10723
+ * element. Both read the same --mark-bg / --mark-fg pair, so a theme or an
10724
+ * intent retints the phrase and its sweep together, without a second palette.
10725
+ *
10726
+ * The highlight is a full-size background image at rest. `is-pending` shrinks
10727
+ * it to zero and the transition grows it back from the reading direction's
10728
+ * start edge. Without JavaScript, under reduced motion and in print, the full
10729
+ * highlight is already there.
10730
+ *
10731
+ * Public hooks:
10732
+ * --mark-sweep-duration
10733
+ */
10734
+ .mark-sweep {
10735
+ --mark-sweep-duration: 700ms;
10736
+
10737
+ /* The shorthand is deliberate: it also clears the background-color base.css
10738
+ paints on <mark>, which would otherwise show the whole highlight while
10739
+ the element is pending. */
10740
+ background: linear-gradient(var(--mark-bg), var(--mark-bg)) 0 0 / 100% 100% no-repeat;
10741
+ color: var(--mark-fg);
10742
+ }
10743
+
10744
+ /* The zero-width box is anchored to the reading direction's start edge. Only
10745
+ the anchor changes under RTL; the gradient itself is symmetric. */
10746
+ .mark-sweep:dir(rtl) {
10747
+ background-position: 100% 0;
10748
+ }
10749
+
10750
+ /* Solid intent ink needs its fill to stay legible. A sweep exposes the surface
10751
+ until the fill arrives, so use a soft tint with ordinary theme ink instead.
10752
+ Guard the custom property: unsupported color-mix() would invalidate the
10753
+ background at computed time instead of preserving the theme highlight. */
10754
+ @supports (color: color-mix(in oklab, red, white)) {
10755
+ .mark-sweep:is(.primary, .secondary, .success, .warning, .danger, .neutral) {
10756
+ --mark-bg: color-mix(in oklab, var(--surface) var(--soft-bg-mix), var(--intent));
10757
+ --mark-fg: var(--text);
10758
+ }
10759
+ }
10760
+
10761
+ @media screen and (prefers-reduced-motion: no-preference) {
10762
+ .mark-sweep {
10763
+ /* A readable sweep needs a gentler start than surface entrance timing. */
10764
+ transition: background-size var(--mark-sweep-duration) ease-out;
10765
+ }
10766
+
10767
+ .mark-sweep.is-pending {
10768
+ background-size: 0 100%;
10769
+ }
10770
+ }
10771
+
10772
+ /* Forced colors drops the background image, so the system Mark pair keeps the
10773
+ phrase distinct whether .mark-sweep sits on <mark> or a <span>. */
10774
+ @media (forced-colors: active) {
10775
+ .mark-sweep {
10776
+ background: Mark;
10777
+ color: MarkText;
10778
+ }
10779
+ }
10780
+
10781
+ /*
10782
+ * Reveal — entrance motion for a block or a group of children.
10783
+ *
10784
+ * Docs: docs/pages/components/reveal.md
10785
+ *
10786
+ * The entrance is a one-shot animation, so `.reveal` alone plays it on the
10787
+ * first render, without JavaScript. in-view.js adds the scroll trigger: it
10788
+ * writes `is-pending` on an element that waits outside the viewport, and this
10789
+ * file holds it hidden with the animation removed. Removing the class puts the
10790
+ * animation back, which starts it from the beginning on the first appearance.
10791
+ *
10792
+ * Everything sits under `screen and (prefers-reduced-motion: no-preference)`:
10793
+ * reduced motion and print neither animate nor hide anything.
10794
+ *
10795
+ * An animation rather than a transition, on purpose: the `transition`
10796
+ * shorthand replaced the transitions of the component it sat on (a `.btn`
10797
+ * lost its hover motion). The `animation` shorthand still replaces another
10798
+ * animation on the same element, which is the remaining composition limit.
10799
+ *
10800
+ * Fill mode `backwards` holds the first keyframe through a stagger delay and
10801
+ * leaves no animated value in the cascade once the entrance ends. A pending
10802
+ * element revealed by focus has its new animation finished by in-view.js,
10803
+ * because a :focus-within override lapses on blur and replays the entrance.
10804
+ *
10805
+ * Public hooks:
10806
+ * --reveal-duration
10807
+ * --reveal-distance
10808
+ * --reveal-stagger
10809
+ */
10810
+ .reveal,
10811
+ .reveal-group {
10812
+ --reveal-duration: 450ms;
10813
+ --reveal-distance: 1rem;
10814
+ --reveal-stagger: 60ms;
10815
+ }
10816
+
10817
+ @media screen and (prefers-reduced-motion: no-preference) {
10818
+ .reveal,
10819
+ .reveal-group > * {
10820
+ /* The gentler ease-out keeps the fade gradual; surface entrance timing
10821
+ makes most of the content visible too early. */
10822
+ animation: actual-reveal var(--reveal-duration) ease-out backwards;
10823
+ }
10824
+
10825
+ /* The cap keeps a long list from becoming an endless cascade: the ninth and
10826
+ later items share the eighth step's delay. An engine without
10827
+ sibling-index() drops this declaration alone and reveals the group
10828
+ together, which is the intended degradation. */
10829
+ .reveal-group > * {
10830
+ animation-delay: calc(min(sibling-index() - 1, 8) * var(--reveal-stagger));
10831
+ }
10832
+
10833
+ .reveal.is-pending,
10834
+ .reveal-group.is-pending > * {
10835
+ animation: none;
10836
+ opacity: 0;
10837
+ }
10838
+ }
10839
+
10840
+ /* The end keyframe is implicit: the element's own opacity and translate. */
10841
+ @keyframes actual-reveal {
10842
+ from {
10843
+ opacity: 0;
10844
+ translate: 0 var(--reveal-distance);
10845
+ }
10846
+ }
10847
+
10458
10848
  /*
10459
10849
  * Highlight sweeping across a text label — an activity in progress.
10460
10850
  *
@@ -10467,6 +10857,9 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
10467
10857
  * Public hooks:
10468
10858
  * --shimmer-color
10469
10859
  * --shimmer-highlight
10860
+ *
10861
+ * Internal:
10862
+ * --shimmer-band
10470
10863
  */
10471
10864
  .shimmer {
10472
10865
  --shimmer-color: var(--text-muted);
@@ -10481,34 +10874,49 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
10481
10874
  the fill, not `color`: a label class that sets its own color (.muted, a
10482
10875
  caption style) would otherwise win the cascade and paint opaque glyphs over
10483
10876
  the sweep. Reduced motion keeps the plain label — a frozen band would read
10484
- as a random tint. */
10877
+ as a random tint.
10878
+
10879
+ The band has a fixed width in em, not a share of the label: a proportional
10880
+ band covered most of a short label like "Working…" and lit the whole word
10881
+ instead of crossing it. */
10485
10882
  @supports (background-clip: text) {
10486
10883
  @media (prefers-reduced-motion: no-preference) {
10487
10884
  .shimmer {
10885
+ --shimmer-band: 1.25em;
10886
+
10488
10887
  -webkit-text-fill-color: transparent;
10489
10888
  background:
10490
10889
  linear-gradient(
10491
10890
  90deg,
10492
- var(--shimmer-color) 40%,
10891
+ var(--shimmer-color) calc(50% - var(--shimmer-band)),
10493
10892
  var(--shimmer-highlight) 50%,
10494
- var(--shimmer-color) 60%
10893
+ var(--shimmer-color) calc(50% + var(--shimmer-band))
10495
10894
  )
10496
- 0 0 / 300% 100%;
10895
+ 0 0 / calc(200% + 2 * var(--shimmer-band)) 100%;
10497
10896
  background-clip: text;
10498
- animation: actual-shimmer var(--duration-shimmer) linear infinite;
10897
+ animation: actual-shimmer var(--duration-shimmer) ease-in-out infinite;
10898
+ }
10899
+
10900
+ /* The sweep follows the reading direction. Reversing also moves the rest
10901
+ to the start of the cycle, which reads the same in a loop. */
10902
+ .shimmer:dir(rtl) {
10903
+ animation-direction: reverse;
10499
10904
  }
10500
10905
  }
10501
10906
  }
10502
10907
 
10503
- /* The band occupies the middle third of a background three times the label's
10504
- width, so each pass leaves the end of the label before the next one enters
10505
- at the start. */
10908
+ /* A background of twice the label plus the band puts the band's far edge at
10909
+ the label's start at 100% and its near edge at the label's end at 0%, so
10910
+ every pass enters and leaves completely, whatever the label's length. The
10911
+ last quarter rests off the label: a continuous sweep reads as a machine,
10912
+ the rest between passes as a breath. */
10506
10913
  @keyframes actual-shimmer {
10507
- from {
10914
+ 0% {
10508
10915
  background-position: 100% 0;
10509
10916
  }
10510
10917
 
10511
- to {
10918
+ 75%,
10919
+ 100% {
10512
10920
  background-position: 0% 0;
10513
10921
  }
10514
10922
  }