actual-css 0.11.1 → 0.13.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 (123) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +25 -6
  3. package/components.json +12 -18
  4. package/dist/actual.full.css +780 -479
  5. package/dist/actual.full.js +1 -1
  6. package/dist/actual.full.min.css +1 -1
  7. package/docs/brand/favicon.svg +5 -0
  8. package/docs/brand/lockup.svg +12 -0
  9. package/docs/brand/logo-dark.svg +9 -0
  10. package/docs/brand/logo-light.svg +9 -0
  11. package/docs/brand/logo.svg +11 -0
  12. package/docs/brand/mark.svg +11 -0
  13. package/docs/design-notes/architecture.md +67 -0
  14. package/docs/design-notes/steps.md +45 -28
  15. package/docs/navigation.json +3 -2
  16. package/docs/pages/components/alert.md +2 -10
  17. package/docs/pages/components/avatar.md +17 -11
  18. package/docs/pages/components/badge.md +3 -9
  19. package/docs/pages/components/breadcrumb.md +16 -2
  20. package/docs/pages/components/card.md +31 -2
  21. package/docs/pages/components/dialog.md +121 -33
  22. package/docs/pages/components/drawer.md +2 -2
  23. package/docs/pages/components/list.md +9 -13
  24. package/docs/pages/components/navbar.md +49 -30
  25. package/docs/pages/components/pagination.md +19 -0
  26. package/docs/pages/components/steps.md +24 -20
  27. package/docs/pages/components/table.md +3 -3
  28. package/docs/pages/enhancements/flyout.md +2 -2
  29. package/docs/pages/enhancements/scrollspy.md +7 -7
  30. package/docs/pages/enhancements/status-bar.md +2 -2
  31. package/docs/pages/enhancements/tabs.md +74 -3
  32. package/docs/pages/examples/overview.md +2 -1
  33. package/docs/pages/forms/date-picker.md +90 -0
  34. package/docs/pages/forms/detached-actions.md +37 -30
  35. package/docs/pages/forms/floating-field.md +21 -7
  36. package/docs/pages/forms/form-actions.md +58 -28
  37. package/docs/pages/forms/input-policy.md +1 -1
  38. package/docs/pages/forms/overview.md +6 -5
  39. package/docs/pages/forms/states-and-sizes.md +15 -15
  40. package/docs/pages/forms/sticky-actions.md +85 -83
  41. package/docs/pages/forms/validation.md +5 -5
  42. package/docs/pages/foundations/philosophy.md +102 -4
  43. package/docs/pages/foundations/theming.md +15 -4
  44. package/docs/pages/foundations/tokens.md +89 -36
  45. package/docs/pages/foundations/typography.md +4 -7
  46. package/docs/pages/guides/bootstrap.md +2 -2
  47. package/docs/pages/guides/design-tools.md +2 -2
  48. package/docs/pages/guides/integrating-actual-css.md +79 -9
  49. package/docs/pages/guides/introduction.md +5 -5
  50. package/docs/pages/guides/modular-import.md +3 -0
  51. package/docs/pages/guides/progressive-enhancement.md +27 -9
  52. package/docs/pages/guides/tailwind.md +70 -0
  53. package/docs/pages/guides/upgrading.md +151 -0
  54. package/docs/pages/layout/center.md +2 -1
  55. package/docs/pages/layout/cluster.md +37 -4
  56. package/docs/pages/layout/grid.md +2 -0
  57. package/docs/pages/layout/overview.md +1 -1
  58. package/docs/pages/layout/sidebar-layout.md +3 -0
  59. package/docs/pages/layout/stack.md +21 -16
  60. package/docs/pages/layout/switcher.md +2 -0
  61. package/docs/pages/layout/topbar.md +7 -5
  62. package/docs/pages/patterns/icon-slot.md +17 -1
  63. package/docs/pages/patterns/navigation-list.md +16 -46
  64. package/docs/pages/patterns/overview.md +3 -4
  65. package/docs/pages/utilities/flex.md +30 -20
  66. package/docs/pages/utilities/sizing-wrapping.md +52 -7
  67. package/docs/pages/utilities/spacing.md +4 -3
  68. package/package.json +6 -6
  69. package/reserved-classes.json +3 -3
  70. package/skills/actual-css/references/enhancements.md +10 -7
  71. package/src/cli/actual-css.js +39 -13
  72. package/src/css/components/alert.css +34 -34
  73. package/src/css/components/avatar.css +8 -17
  74. package/src/css/components/badge.css +1 -6
  75. package/src/css/components/breadcrumb.css +74 -8
  76. package/src/css/components/button.css +3 -9
  77. package/src/css/components/card.css +18 -10
  78. package/src/css/components/chat.css +4 -5
  79. package/src/css/components/drawer.css +42 -45
  80. package/src/css/components/flyout.css +3 -1
  81. package/src/css/components/index.css +0 -1
  82. package/src/css/components/join.css +2 -2
  83. package/src/css/components/list.css +10 -10
  84. package/src/css/components/modal.css +113 -134
  85. package/src/css/components/navbar.css +22 -31
  86. package/src/css/components/pagination.css +5 -0
  87. package/src/css/components/scrollspy.css +1 -1
  88. package/src/css/components/steps.css +66 -12
  89. package/src/css/components/tab.css +134 -4
  90. package/src/css/core/base.css +1 -1
  91. package/src/css/core/focus.css +8 -6
  92. package/src/css/core/reset.css +2 -1
  93. package/src/css/core/theme.css +10 -1
  94. package/src/css/core/tokens.css +32 -12
  95. package/src/css/core/variants.css +41 -14
  96. package/src/css/forms/choice-card.css +1 -1
  97. package/src/css/forms/choice.css +1 -1
  98. package/src/css/forms/control.css +1 -1
  99. package/src/css/forms/floating-field.css +20 -18
  100. package/src/css/forms/form-actions.css +14 -12
  101. package/src/css/forms/native.css +2 -2
  102. package/src/css/forms/otp.css +4 -5
  103. package/src/css/forms/switch.css +1 -1
  104. package/src/css/forms/validation.css +23 -30
  105. package/src/css/layout/center.css +2 -0
  106. package/src/css/layout/cluster.css +25 -0
  107. package/src/css/layout/grid.css +7 -0
  108. package/src/css/layout/scroller.css +19 -3
  109. package/src/css/layout/sidebar-layout.css +3 -0
  110. package/src/css/layout/switcher.css +3 -0
  111. package/src/css/layout/topbar.css +12 -6
  112. package/src/css/utilities/base.css +5 -0
  113. package/src/css/utilities/extra.css +3 -7
  114. package/src/js/full.js +4 -0
  115. package/src/js/inline-visible.js +54 -0
  116. package/src/js/parsed.js +21 -0
  117. package/src/js/tab.js +33 -7
  118. package/src/tooling/color.js +65 -0
  119. package/src/tooling/design-export.js +1 -1
  120. package/src/tooling/design-tokens.js +53 -34
  121. package/src/tooling/theme-contrast.js +217 -0
  122. package/docs/pages/patterns/actions.md +0 -52
  123. package/src/css/components/actions.css +0 -27
@@ -6,13 +6,12 @@
6
6
 
7
7
  ## Class reference
8
8
 
9
- | Class | Kind | Description |
10
- | ---------------------- | ----------- | ---------------------------------------------- |
11
- | `.modal` | Component | Centered surface on the native `<dialog>`. |
12
- | `.scrollable` | Variant | Header and footer stay while the body scrolls. |
13
- | `.dialog-confirmation` | Variant | Message above a full-width action band. |
14
- | `.dialog-icon` | Component | Circular intent-aware icon well. |
15
- | `.close` | Composition | Icon-only close button, at the top end. |
9
+ | Class | Kind | Description |
10
+ | -------------- | ----------- | ---------------------------------------------- |
11
+ | `.modal` | Component | Centered surface on the native `<dialog>`. |
12
+ | `.scrollable` | Variant | Header and footer stay while the body scrolls. |
13
+ | `.dialog-icon` | Component | Circular intent-aware icon well. |
14
+ | `.close` | Composition | Icon-only close button, at the top end. |
16
15
 
17
16
  ## Anatomy
18
17
 
@@ -26,8 +25,10 @@ controls second. The title has the close control's minimum height; its leading
26
25
  icon and every trailing control share the same center axis. A wrapped title
27
26
  simply makes the row taller.
28
27
 
29
- A direct `dialog > header` is dialog chrome and forms a distinct header band.
30
- Put an ordinary content heading inside the padded `form` or `.stack` instead.
28
+ A direct `dialog > header` is dialog chrome and forms a distinct header band,
29
+ painted `--surface-subtle`. Change the fill with a surface utility on the header
30
+ (`<header class="background-raised">`). Put an ordinary content heading inside
31
+ the padded `form` or `.stack` instead.
31
32
 
32
33
  Keep a corner [`.close`](close.md) as a direct child of the dialog and put the
33
34
  title in the wrapper's direct `<header>`. The button then stays outside the
@@ -42,9 +43,35 @@ The corner close overlays the panel edge, so a body tall enough to scroll would
42
43
  run its scrollbar under the button. Give such a dialog the `scrollable` anatomy:
43
44
  the close then sits over the fixed header and the scrollbar starts below it.
44
45
 
45
- Add `.bleed` to that header when it should form a full-width band. It reaches
46
- the dialog edges, keeps the modal's inner padding, and can take a surface token
47
- such as `background: var(--surface-subtle)`.
46
+ Add `.bleed` to that header, or to the wrapper's footer, when it should form a
47
+ full-width band. It reaches the dialog edges and corners, keeps the modal's
48
+ inner padding, and takes a surface utility such as `.background-subtle`.
49
+
50
+ The wrapper's `<footer>` is a structural slot: it stays fixed under
51
+ `.scrollable` but has no layout of its own. Compose the action row in markup —
52
+ `<footer class="cluster justify-content-end">` for trailing actions,
53
+ `.justify-content-space-between` for a split pair.
54
+
55
+ ### Where each region lives
56
+
57
+ Two anatomies are legitimate. Pick one; each owns its scroll, footer, and close
58
+ placement.
59
+
60
+ **Wrapper header** — a `<header>` inside the `form`/`.stack` body. The wrapper
61
+ owns padding, rhythm, and overflow. With `.scrollable` the header and footer are
62
+ fixed rows and the content between them scrolls. The `.close` stays a direct
63
+ child of the dialog and the header reserves its inline room.
64
+
65
+ **External header** — a direct `dialog > header`, before the body wrapper. The
66
+ header is dialog chrome outside the scroll container, so it never scrolls. The
67
+ footer stays inside the wrapper and is the trailing fixed row under
68
+ `.scrollable`. Wrap the `.close` in the header's trailing `.cluster` to keep it
69
+ in flow; a `.close` that is a direct child of the header is still the absolute
70
+ corner overlay, and the header reserves its room.
71
+
72
+ The `.scrollable` row template follows the regions the wrapper actually holds,
73
+ so a modal without a header, without a footer, or with an external header all
74
+ keep the footer reachable and the body scrollable.
48
75
 
49
76
  ## Usage
50
77
 
@@ -97,7 +124,7 @@ runtime, backdrop clicks give a small static feedback instead of closing.
97
124
  <p>The project, saved reports, and connected automations will be removed permanently.</p>
98
125
  </div>
99
126
 
100
- <footer>
127
+ <footer class="cluster justify-content-end">
101
128
  <button class="btn outline" value="cancel">Cancel</button>
102
129
 
103
130
  <button class="btn danger"
@@ -109,12 +136,19 @@ runtime, backdrop clicks give a small static feedback instead of closing.
109
136
  </dialog>
110
137
  ```
111
138
 
112
- For a compact destructive confirmation with a leading status icon, compose
113
- `dialog-confirmation` with the media object. The icon well accepts the shared
114
- intent and emphasis classes; `dialog-icon danger soft` creates the tinted red
115
- circle while keeping the glyph centered. The footer becomes a separate action
116
- band whose two actions sit at its edges, so the cancel-style control never sits
117
- next to the committing one.
139
+ ### Confirmation with an icon and an action band
140
+
141
+ For a compact confirmation with a leading status icon, put a `.dialog-icon` and
142
+ the text column in a `.media` row. The first heading of that column centers on
143
+ the icon; following copy stays in the same column. The icon well accepts the
144
+ shared intent and emphasis classes: `dialog-icon danger soft` is the tinted red
145
+ circle.
146
+
147
+ The action band is the footer composed with existing primitives: `.bleed`
148
+ reaches the panel edges and corners, `.background-subtle` paints it, and
149
+ `.cluster.justify-content-space-between` splits the decision pair. Keep the
150
+ cancel-style action first, so it holds the leading edge and never sits next to
151
+ the committing one.
118
152
 
119
153
  ```html demo
120
154
  <button class="btn danger"
@@ -126,7 +160,7 @@ next to the committing one.
126
160
  Deactivate account
127
161
  </button>
128
162
 
129
- <dialog class="modal dialog-confirmation"
163
+ <dialog class="modal"
130
164
  id="deactivate-dialog"
131
165
  closedby="none"
132
166
  style="--modal-size: 40rem">
@@ -136,13 +170,13 @@ next to the committing one.
136
170
  <i class="ti ti-alert-triangle"></i>
137
171
  </span>
138
172
 
139
- <header>
173
+ <header class="stack">
140
174
  <h3>Deactivate account</h3>
141
175
  <p class="muted">Are you sure you want to deactivate your account? All of your data will be permanently removed. This action cannot be undone.</p>
142
176
  </header>
143
177
  </div>
144
178
 
145
- <footer>
179
+ <footer class="bleed background-subtle cluster justify-content-space-between">
146
180
  <button class="btn outline" value="cancel">Cancel</button>
147
181
  <button class="btn danger" value="deactivate">Deactivate</button>
148
182
  </footer>
@@ -152,8 +186,7 @@ next to the committing one.
152
186
 
153
187
  For a trailing illustration, use a direct `<header>` as the message region and
154
188
  compose it as a non-wrapping split cluster. `.grow` keeps the text column
155
- flexible while `.dialog-icon` stays at the inline end. The confirmation variant
156
- pads either this header or the leading-icon `.media` shape above.
189
+ flexible while `.dialog-icon` stays at the inline end.
157
190
 
158
191
  Use the same anatomy in a `.card` instead when the surface belongs in page
159
192
  content and does not need modal focus or a backdrop.
@@ -168,7 +201,7 @@ content and does not need modal focus or a backdrop.
168
201
  Customize workspace
169
202
  </button>
170
203
 
171
- <dialog class="modal dialog-confirmation"
204
+ <dialog class="modal"
172
205
  id="customize-dialog"
173
206
  closedby="none"
174
207
  aria-labelledby="customize-dialog-title">
@@ -185,9 +218,9 @@ content and does not need modal focus or a backdrop.
185
218
  </span>
186
219
  </header>
187
220
 
188
- <footer>
189
- <button class="btn primary" value="customize">Customize</button>
221
+ <footer class="bleed background-subtle cluster justify-content-end">
190
222
  <button class="btn ghost" value="later">Later</button>
223
+ <button class="btn primary" value="customize">Customize</button>
191
224
  </footer>
192
225
  </form>
193
226
  </dialog>
@@ -289,7 +322,7 @@ the dialog title itself is not an alert.
289
322
 
290
323
  <p>Confirm these settings to finish setting up the workspace.</p>
291
324
 
292
- <footer>
325
+ <footer class="cluster justify-content-end">
293
326
  <button class="btn primary inline-size-full" value="continue">Continue</button>
294
327
  </footer>
295
328
  </form>
@@ -310,6 +343,9 @@ keyboard-focusable so it can be scrolled without a pointer — it takes a focus
310
343
  ring like any other focusable element, and it can claim initial focus when
311
344
  nothing focusable precedes it. Mark the control you want focused `autofocus`.
312
345
 
346
+ Each non-header/footer child region is its own scrollport, so wrap the body in a
347
+ single element (`<div class="stack">`) when there should be one scrollbar.
348
+
313
349
  ```html demo
314
350
  <button class="btn"
315
351
  type="button"
@@ -341,7 +377,7 @@ nothing focusable precedes it. Mark the control you want focused `autofocus`.
341
377
  <p>Section 7. Continued use confirms acceptance of the current terms.</p>
342
378
  </div>
343
379
 
344
- <footer>
380
+ <footer class="cluster justify-content-end">
345
381
  <button class="btn outline" value="cancel">Cancel</button>
346
382
 
347
383
  <button class="btn primary" value="accept">
@@ -352,6 +388,55 @@ nothing focusable precedes it. Mark the control you want focused `autofocus`.
352
388
  </dialog>
353
389
  ```
354
390
 
391
+ An external header follows the same contract from the other side: the header is
392
+ chrome outside the wrapper, the footer stays in the wrapper, and the content
393
+ between them scrolls.
394
+
395
+ ```html demo
396
+ <button class="btn"
397
+ type="button"
398
+ commandfor="external-scroll-dialog"
399
+ command="show-modal"
400
+ aria-haspopup="dialog"
401
+ aria-controls="external-scroll-dialog">
402
+ Open external-header modal
403
+ </button>
404
+
405
+ <dialog class="modal scrollable"
406
+ id="external-scroll-dialog"
407
+ closedby="any"
408
+ aria-labelledby="external-scroll-title">
409
+ <header>
410
+ <h3 id="external-scroll-title">Release notes</h3>
411
+
412
+ <div class="cluster">
413
+ <button class="close"
414
+ type="button"
415
+ commandfor="external-scroll-dialog"
416
+ command="request-close"
417
+ aria-controls="external-scroll-dialog"
418
+ aria-label="Close dialog"></button>
419
+ </div>
420
+ </header>
421
+
422
+ <form method="dialog" class="stack">
423
+ <div class="stack">
424
+ <p>Section 1. The service stores project settings, interface preferences, and theme choices.</p>
425
+ <p>Section 2. Administrators can invite users and review access periodically.</p>
426
+ <p>Section 3. Billing changes may affect future invoices.</p>
427
+ <p>Section 4. Export tools are provided for common formats.</p>
428
+ <p>Section 5. Support requests should include browser and account context.</p>
429
+ <p>Section 6. Continued use confirms acceptance of the current terms.</p>
430
+ </div>
431
+
432
+ <footer class="cluster justify-content-end">
433
+ <button class="btn outline" value="cancel">Cancel</button>
434
+ <button class="btn primary" value="accept">Accept</button>
435
+ </footer>
436
+ </form>
437
+ </dialog>
438
+ ```
439
+
355
440
  ## Overlays inside modals
356
441
 
357
442
  Flyouts and tooltips opened from inside a modal dialog stay exactly where they
@@ -490,7 +575,7 @@ transition.
490
575
  <p>This dialog morphs to and from the trigger button.</p>
491
576
  </header>
492
577
 
493
- <footer>
578
+ <footer class="cluster justify-content-end">
494
579
  <button class="btn outline" value="cancel">Cancel</button>
495
580
  <button class="btn primary" value="confirm">Confirm</button>
496
581
  </footer>
@@ -510,10 +595,13 @@ animation-friendly, and consistent across supported browsers.
510
595
  dialog or an inherited value both reach it. A dialog is shrink-to-fit: a
511
596
  composition that must fill this width sets `inline-size` as well.
512
597
  - `--modal-pad` — padding of the direct `<form>` or `.stack` content wrapper.
513
- - `--modal-header-bg` — background of a direct header band.
514
598
  - `--dialog-viewport-gap` — distance kept between the dialog and the viewport edges.
515
- - `--dialog-icon-size` — diameter of the `.dialog-icon` circle.
516
- - `--dialog-icon-glyph-size` — size of the glyph centered inside `.dialog-icon`.
599
+ - `--dialog-icon-size` — diameter of the `.dialog-icon` circle. The heading
600
+ beside a leading icon reads the same hook to center on it, so set it on the
601
+ icon's media row (or the dialog) and both inherit one value. A value on the
602
+ icon alone sizes only the circle.
603
+ - `--dialog-icon-glyph-size` — size of the glyph centered inside `.dialog-icon`;
604
+ same placement as `--dialog-icon-size`.
517
605
  - `--close-size` / `--close-icon-size` — size of the corner `.close` and of its
518
606
  X. The header reserves the close size, its edge inset, and a content gap so
519
607
  the title never runs under it.
@@ -61,7 +61,7 @@ your intended target `autofocus`; otherwise the body claims initial focus.
61
61
  </header>
62
62
 
63
63
  <nav>
64
- <ul class="nav-list stack">
64
+ <ul class="nav-list">
65
65
  <li><a href="#" aria-current="page">Home</a></li>
66
66
  <li><a href="#">Users</a></li>
67
67
  <li><a href="#">Settings</a></li>
@@ -103,7 +103,7 @@ actions and the close button can close the drawer.
103
103
  <p>Unsaved changes will be lost if you close without saving.</p>
104
104
  </div>
105
105
 
106
- <footer class="cluster" style="--cluster-justify: end">
106
+ <footer class="cluster justify-content-end">
107
107
  <button class="btn" value="save">Save</button>
108
108
  </footer>
109
109
  </form>
@@ -39,14 +39,10 @@ gap: `.list-item-content` always takes the row's free space and
39
39
  leading region or not. A settings row — a label, a description, and one
40
40
  control on the end edge — is the two-region form.
41
41
 
42
- Regions align to the row's first line: the leading check or avatar, the title,
43
- and the trailing metadata or control sit on one horizontal line while
44
- supporting text wraps beneath — a structured row, not a centered button. For a
45
- shared two-line arrangement where leading and trailing truly need to center,
46
- the app composes the alignment itself rather than switching this default.
47
- A pure traversal affordance such as a trailing caret can opt out of the
48
- first-line rule on its own item with `align-self: center`, keeping metadata
49
- rows unaffected.
42
+ Regions center on the row. When supporting text runs to three lines or more,
43
+ add `.items-start` to the row, or to the `.list` for every row, so the leading
44
+ avatar and the trailing control stay on the title line instead of floating
45
+ mid-paragraph (top-align, align to first line).
50
46
 
51
47
  ```html demo
52
48
  <ul class="list">
@@ -83,7 +79,7 @@ For a navigable row, keep the list semantics and put `.list-item` on the link:
83
79
  <strong class="list-item-title">Profile</strong>
84
80
  <span class="list-item-text">Name, photo, and contact details</span>
85
81
  </span>
86
- <i class="ti ti-chevron-right list-item-trailing" style="align-self: center" aria-hidden="true"></i>
82
+ <i class="ti ti-chevron-right list-item-trailing" aria-hidden="true"></i>
87
83
  </a>
88
84
  </li>
89
85
  </ul>
@@ -92,10 +88,10 @@ For a navigable row, keep the list semantics and put `.list-item` on the link:
92
88
  Do not attach click JavaScript to the entire row. Use a link for navigation and
93
89
  a button or native control for actions.
94
90
 
95
- In a master/detail navigation, mark the current row with `aria-current` on its
96
- link, using the value that matches the semantics (`page`, `location`, …).
97
- Presence is the contract: set the attribute on the current row and remove it
98
- elsewhere, never `aria-current="false"`. The [Workspaces example](../examples/overview.md)
91
+ Mark the current row on its link with `aria-current="page"` when the row opens
92
+ a page, or `aria-current="true"` when it is the current item of a master/detail
93
+ view (a conversation, a thread, a record) that is not a page of its own. Any
94
+ other value is inert. The [Workspaces example](../examples/overview.md)
99
95
  shows a current row with trailing actions and a flyout. Navigable rows usually
100
96
  want a non-zero `--list-item-pad-inline`: without that gutter, the current
101
97
  indicator touches the leading region and the trailing touches the row edge.
@@ -1,23 +1,22 @@
1
1
  # Navbar
2
2
 
3
- > Horizontal top-level navigation bar with a brand, an inline link list, and a vertical nav-list for drawers.
3
+ > Horizontal top-level navigation bar with a brand, an inline `.cluster` link list, and a vertical `.nav-list` for drawers.
4
4
 
5
5
  - Use `.navbar` for the horizontal bar shell.
6
6
  - `.navbar-brand` is the brand link at the inline start.
7
- - `.navbar-nav` is the horizontal link list; its items are `.nav-link`.
7
+ - Horizontal links live in a `.cluster`; its items are `.nav-link`.
8
8
  - `.nav-list` is the shared vertical navigation list, reused by `.drawer` for stacked links.
9
- - Mark the current page with `aria-current="page"` on the active `.nav-link`.
10
- - Presence is the contract: set `aria-current` on the current link and remove
11
- it elsewhere, never `aria-current="false"`. Scrollspy follows the same rule
12
- with `aria-current="location"`.
9
+ - Mark the current page with `aria-current="page"` on the active `.nav-link`,
10
+ or the current section of the page with `aria-current="location"` (what
11
+ scrollspy sets). Any other value is inert.
13
12
 
14
13
  For a public or normally scrolling page, `.navbar` belongs inside the semantic
15
14
  site header. Do not use `.topbar` or `.app-layout` unless the page actually has
16
15
  the specialized persistent application-shell behavior those APIs describe.
17
16
 
18
- `.navbar-nav` and `.nav-list` are mutually exclusive: `.navbar-nav` is a horizontal
19
- flex list, `.nav-list` a vertical grid. Putting both on one element resolves to
20
- `.nav-list` (vertical) — pick one per container.
17
+ Horizontal navbar links use a `.cluster`. Use `.nav-list` when the navigation
18
+ becomes a full-width vertical list. The two are distinct contracts, so pick one
19
+ per container.
21
20
 
22
21
  `.navbar` stays the horizontal bar for a site or webapp header with a brand and
23
22
  normal document scrolling. `.app-nav` is not merely a stacked-icon flavour of it:
@@ -32,7 +31,6 @@ icons. See [App Navigation](app-navigation.md).
32
31
  | --------------- | ----------- | ----------------------------------------------------- |
33
32
  | `.navbar` | Component | Horizontal bar shell. |
34
33
  | `.navbar-brand` | Composition | Brand link at the inline start. |
35
- | `.navbar-nav` | Composition | Horizontal link list. |
36
34
  | `.nav-link` | Component | A link item; current page via `aria-current="page"`. |
37
35
  | `.nav-list` | Component | Shared vertical navigation list, reused by `.drawer`. |
38
36
 
@@ -41,7 +39,7 @@ icons. See [App Navigation](app-navigation.md).
41
39
  ```html demo
42
40
  <nav class="navbar" aria-label="Main">
43
41
  <a class="navbar-brand" href="/">Actual CSS</a>
44
- <ul class="navbar-nav">
42
+ <ul class="cluster">
45
43
  <li><a class="nav-link" href="/docs" aria-current="page">Docs</a></li>
46
44
  <li><a class="nav-link" href="/components">Components</a></li>
47
45
  <li><a class="nav-link" href="/examples">Examples</a></li>
@@ -60,31 +58,36 @@ section titles, a pinned account footer, and the native current state.
60
58
  There is no collapse/toggler mechanism. For a responsive navigation, keep the
61
59
  horizontal `.navbar` for the desktop bar and compose the mobile experience from
62
60
  a `.drawer` with a vertical `.nav-list`, opened by a `command="show-modal"` /
63
- `commandfor` trigger. Keep that trigger outside the `<nav>` subtree you hide at
64
- narrow widths, or hiding the nav hides the control that opens it.
61
+ `commandfor` trigger. Keep that trigger in the bar but outside the `<nav>`
62
+ subtree you hide at narrow widths, or hiding the nav hides the control that
63
+ opens it: the bar is then the `<header>`, and the links get their own `<nav>`.
65
64
 
66
65
  When the compact layout drops labels, keep that text in the DOM and hide it
67
66
  visually instead of replacing it with `aria-label` strings: one source for the
68
67
  accessible name.
69
68
 
70
69
  ```html demo
71
- <nav class="navbar" aria-label="Main">
70
+ <header class="navbar">
72
71
  <a class="navbar-brand" href="/">Actual CSS</a>
73
- <ul class="navbar-nav">
74
- <li><a class="nav-link" href="/" aria-current="page">Home</a></li>
75
- <li><a class="nav-link" href="/docs">Docs</a></li>
76
- </ul>
77
- </nav>
78
-
79
- <button class="btn ghost"
80
- type="button"
81
- command="show-modal"
82
- commandfor="site-nav"
83
- aria-haspopup="dialog"
84
- aria-controls="site-nav"
85
- aria-label="Open menu">
86
- <i class="ti ti-menu-2" aria-hidden="true"></i>
87
- </button>
72
+ <div class="cluster">
73
+ <nav class="site-links" aria-label="Main">
74
+ <ul class="cluster">
75
+ <li><a class="nav-link" href="/" aria-current="page">Home</a></li>
76
+ <li><a class="nav-link" href="/docs">Docs</a></li>
77
+ </ul>
78
+ </nav>
79
+
80
+ <button class="btn ghost site-menu"
81
+ type="button"
82
+ command="show-modal"
83
+ commandfor="site-nav"
84
+ aria-haspopup="dialog"
85
+ aria-controls="site-nav"
86
+ aria-label="Open menu">
87
+ <i class="ti ti-menu-2" aria-hidden="true"></i>
88
+ </button>
89
+ </div>
90
+ </header>
88
91
 
89
92
  <dialog class="drawer"
90
93
  id="site-nav"
@@ -99,7 +102,7 @@ accessible name.
99
102
  </header>
100
103
 
101
104
  <nav>
102
- <ul class="nav-list stack">
105
+ <ul class="nav-list">
103
106
  <li><a class="nav-link" href="#" aria-current="page">Home</a></li>
104
107
  <li><a class="nav-link" href="#">Docs</a></li>
105
108
  <li><a class="nav-link" href="#">Components</a></li>
@@ -108,6 +111,22 @@ accessible name.
108
111
  </dialog>
109
112
  ```
110
113
 
114
+ The demo shows both controls; the application picks one per width:
115
+
116
+ ```css
117
+ @media (width < 40rem) {
118
+ .site-links {
119
+ display: none;
120
+ }
121
+ }
122
+
123
+ @media (width >= 40rem) {
124
+ .site-menu {
125
+ display: none;
126
+ }
127
+ }
128
+ ```
129
+
111
130
  The drawer can be hidden until opened: give the `dialog` the `hidden` attribute
112
131
  in the HTML and let the command runtime manage it, or rely on the drawer being
113
132
  rendered only on the mobile layout. `command` and `commandfor` work without
@@ -54,3 +54,22 @@ buttons — they are decorative, not actionable.
54
54
  </ol>
55
55
  </nav>
56
56
  ```
57
+
58
+ ## Narrow screens
59
+
60
+ When the items do not fit, the row wraps: every page stays visible and
61
+ clickable. That is the fallback, not the mobile design. For a phone or a
62
+ narrow column (responsive, mobile, small screen), render a shorter range — the
63
+ server knows which pages matter around the current one:
64
+
65
+ ```html demo
66
+ <nav aria-label="Pagination">
67
+ <ol class="pagination sm">
68
+ <li><a href="?page=7" class="btn ghost" rel="prev"><i class="ti ti-chevron-left" aria-hidden="true"></i> Previous</a></li>
69
+ <li><a href="?page=7" class="btn ghost" aria-label="Page 7">7</a></li>
70
+ <li><a href="?page=8" class="btn ghost" aria-current="page" aria-label="Page 8">8</a></li>
71
+ <li><a href="?page=9" class="btn ghost" aria-label="Page 9">9</a></li>
72
+ <li><a href="?page=9" class="btn ghost" rel="next">Next <i class="ti ti-chevron-right" aria-hidden="true"></i></a></li>
73
+ </ol>
74
+ </nav>
75
+ ```
@@ -145,23 +145,28 @@ names, or when a step should be navigable:
145
145
  ```
146
146
 
147
147
  **Actual CSS never hides an authored step label.** Labels stay visible at every
148
- width. If a labelled row does not fit its space, it scrolls — and the honest
149
- answers to that are more room, fewer stages, or `.steps-vertical`.
148
+ width. Stacked steps keep their markers evenly spaced, and long names wrap
149
+ inside their share, hyphenated when the page declares a `lang`. The first and
150
+ last steps align with the row's edges, labels included, so the track lines up
151
+ with the heading above it. Short labels fit a phone with no width budget.
150
152
 
151
- Since scrolling is the fallback, a labelled row is worth pairing with
152
- `.scroller`, which gives the native scrollbar the theme's density and colour
153
- instead of the OS default:
153
+ Set `--step-min` when names need a wider minimum share. If the markers or that
154
+ minimum do not fit, the row scrolls; use `.steps-vertical` when every name must
155
+ remain visible without horizontal scrolling.
156
+
157
+ In supporting browsers, a row that scrolls starts on its `aria-current="step"`
158
+ instead of step 1. A row
159
+ that raises `--step-min` can scroll, so it is worth pairing with `.scroller`,
160
+ which gives the native scrollbar the theme's density and colour instead of the
161
+ OS default:
154
162
 
155
163
  ```html
156
164
  <ol class="steps steps-horizontal scroller">
157
165
  ```
158
166
 
159
- Steps does not apply it for you, because scrollbar treatment is an app-wide
160
- decision rather than a per-component one. Every other scroll container —
161
- `.table`, a `.flyout`, a scrolling `dialog` — leaves the scrollbar alone too,
162
- so a page that thinned only its stepper would show two kinds of scrollbar. Put
163
- `.scroller` on whatever scrolls, once. See the sizing and wrapping page for its
164
- hooks.
167
+ Steps does not apply it for you; see
168
+ [one-row strips](../utilities/sizing-wrapping.md#one-row-strips) for the
169
+ page-wide rule and the hooks.
165
170
 
166
171
  Do not add `.stable-gutter` here. It reserves gutter on the inline axis, for a
167
172
  vertical scrollbar this row never draws, so it narrows the row instead of
@@ -361,8 +366,9 @@ On `.steps`, so both orientations read them:
361
366
 
362
367
  `.steps-horizontal` only:
363
368
 
364
- - `--step-min` — minimum item width in the stacked horizontal layout
365
- - `--step-gap` — marker-to-label space in the stacked horizontal layout
369
+ - `--step-min` — minimum width budget for stacked steps; the first and last
370
+ cells use half that budget plus half the marker width
371
+ - `--step-gap` — marker-to-label and between-step space in the stacked layout
366
372
  - `--step-connector` — default horizontal connector background
367
373
  - `--step-inline-connector` — optional connector background for wide horizontal steps
368
374
 
@@ -372,12 +378,11 @@ On `.steps`, so both orientations read them:
372
378
 
373
379
  ## Notes
374
380
 
375
- Do not mix labelled and unlabelled steps in one sequence. Each step is sized on
376
- its own content, so a mixed sequence renders a narrow marker between reading-
377
- width steps — it lays out, but it reads as a gap rather than as progress.
381
+ Do not mix labelled and unlabelled steps in one sequence. Empty steps align
382
+ their markers to the start; labelled steps centre them over their names.
378
383
 
379
384
  A step name belongs in a `.step-label`. Bare text in an `<li>` is outside the
380
- contract: it is content, so it gets a reading width like a label, but no rule
385
+ contract: it takes the same item floor as a label, but no rule
381
386
  places or aligns it.
382
387
 
383
388
  The **2 to 5** range applies to the horizontal orientation, and the inline
@@ -399,9 +404,8 @@ to stay distinguishable there. Steps deliberately ships no forced-colors
399
404
  override of its own: painting the marker `Highlight` makes the number or glyph
400
405
  inside it unreadable, which is worse than the ambiguity it removes.
401
406
 
402
- The inline threshold is calibrated to the default `--step-min`. Container
403
- queries cannot read custom properties, so changing `--step-min` moves the
404
- scroll budget but not the threshold.
407
+ The inline threshold reserves connector space for five named stages. Changing
408
+ `--step-min` moves the stacked scroll budget without moving that threshold.
405
409
 
406
410
  See [Steps representations and thresholds](https://github.com/lekoala/actual-css/blob/master/docs/design-notes/steps.md)
407
411
  for why the contract is shaped this way, and which alternatives were measured
@@ -101,9 +101,9 @@ table width before the wrapper scrolls horizontally.
101
101
  ## Compact tables
102
102
 
103
103
  `.compact` lowers cell padding and establishes compact density for controls or
104
- spacing helpers inside cells. Font size and icons stay unchanged; the framework's
105
- denser font width may apply when the typeface supports it. It is the
106
- same vocabulary as `.card.compact`.
104
+ spacing helpers inside cells. The text stays as set; a data-heavy table that
105
+ also wants condensed type sets `font-stretch` on itself. It is the same
106
+ vocabulary as `.card.compact`.
107
107
 
108
108
  ```html demo
109
109
  <div class="table-wrap">
@@ -322,7 +322,7 @@ can be multi-column with `<section>` / `<ul>` groups.
322
322
 
323
323
  ```html demo
324
324
  <nav aria-label="Main navigation">
325
- <ul class="list-reset cluster">
325
+ <ul class="cluster">
326
326
  <li class="flyout-trigger">
327
327
  <button class="btn ghost"
328
328
  type="button"
@@ -373,7 +373,7 @@ a separate `dialog.drawer` when the content needs a modal mobile presentation.
373
373
 
374
374
  ```html demo
375
375
  <nav aria-label="Product navigation">
376
- <ul class="list-reset cluster">
376
+ <ul class="cluster">
377
377
  <li class="flyout-trigger">
378
378
  <button class="btn ghost"
379
379
  type="button"
@@ -4,15 +4,15 @@
4
4
 
5
5
  Scrollspy is a behavior hook, not a visual component. It marks a navigation
6
6
  region for the JavaScript enhancement. Pair it with `.nav-list` and `.nav-link`,
7
- or style `[aria-current]` yourself.
7
+ or style `[aria-current="location"]` yourself.
8
8
 
9
9
  ## Class reference
10
10
 
11
- | Class | Kind | Description |
12
- | ------------ | ----------- | --------------------------------------------------------------- |
13
- | `.scrollspy` | Component | Marks the nav region for the enhancer; adds no visual styles. |
14
- | `.nav-list` | Composition | Vertical list of navigation links. |
15
- | `.nav-link` | Component | Navigation link whose active state comes from `[aria-current]`. |
11
+ | Class | Kind | Description |
12
+ | ------------ | ----------- | ------------------------------------------------------------- |
13
+ | `.scrollspy` | Component | Marks the nav region for the enhancer; adds no visual styles. |
14
+ | `.nav-list` | Composition | Vertical list of navigation links. |
15
+ | `.nav-link` | Component | Navigation link, current on `aria-current="location"`. |
16
16
 
17
17
  ## Usage
18
18
 
@@ -26,7 +26,7 @@ or style `[aria-current]` yourself.
26
26
 
27
27
  ```html demo
28
28
  <nav class="scrollspy" data-enhance="scrollspy" aria-label="Page sections">
29
- <ol class="nav-list stack">
29
+ <ol class="nav-list">
30
30
  <li><a class="nav-link" href="#overview" aria-current="location">Overview</a></li>
31
31
  <li><a class="nav-link" href="#tokens">Tokens</a></li>
32
32
  <li><a class="nav-link" href="#components">Components</a></li>