actual-css 0.3.1 → 0.4.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 (203) hide show
  1. package/CHANGELOG.md +67 -3
  2. package/README.md +35 -30
  3. package/dist/actual.css +73 -4946
  4. package/dist/actual.full.css +7090 -0
  5. package/dist/actual.full.js +1 -0
  6. package/dist/actual.full.min.css +1 -0
  7. package/dist/actual.js +1 -1
  8. package/dist/actual.min.css +1 -1
  9. package/docs/design-notes/cascade-layer.md +34 -13
  10. package/docs/design-notes/column-layout.md +677 -0
  11. package/docs/design-notes/forced-colors.md +3 -0
  12. package/docs/design-notes/grid.md +612 -0
  13. package/docs/design-notes/naming.md +15 -0
  14. package/docs/design-notes/widget-primitives.md +1 -0
  15. package/docs/navigation.json +5 -1
  16. package/docs/pages/components/alert.md +16 -14
  17. package/docs/pages/components/aura.md +1 -1
  18. package/docs/pages/components/avatar.md +6 -6
  19. package/docs/pages/components/badge.md +7 -7
  20. package/docs/pages/components/button.md +16 -16
  21. package/docs/pages/components/card.md +13 -9
  22. package/docs/pages/components/chat.md +8 -8
  23. package/docs/pages/components/dialog.md +7 -7
  24. package/docs/pages/components/drawer.md +3 -3
  25. package/docs/pages/components/fab.md +7 -7
  26. package/docs/pages/components/navbar.md +9 -8
  27. package/docs/pages/components/pagination.md +4 -3
  28. package/docs/pages/components/skeleton.md +4 -4
  29. package/docs/pages/components/spinner.md +5 -5
  30. package/docs/pages/components/table.md +30 -5
  31. package/docs/pages/enhancements/flyout.md +13 -13
  32. package/docs/pages/enhancements/overview.md +1 -1
  33. package/docs/pages/enhancements/scrollspy.md +6 -6
  34. package/docs/pages/enhancements/status-bar.md +5 -1
  35. package/docs/pages/enhancements/tabs.md +6 -6
  36. package/docs/pages/enhancements/tooltip.md +1 -1
  37. package/docs/pages/examples/overview.md +39 -22
  38. package/docs/pages/forms/choice-cards.md +11 -6
  39. package/docs/pages/forms/controls.md +1 -1
  40. package/docs/pages/forms/detached-actions.md +1 -1
  41. package/docs/pages/forms/floating-field.md +10 -5
  42. package/docs/pages/forms/form-actions.md +1 -1
  43. package/docs/pages/forms/input-policy.md +1 -1
  44. package/docs/pages/forms/joined-controls.md +4 -4
  45. package/docs/pages/forms/labels.md +6 -6
  46. package/docs/pages/forms/otp.md +1 -1
  47. package/docs/pages/forms/overview.md +19 -19
  48. package/docs/pages/forms/password.md +1 -1
  49. package/docs/pages/forms/range.md +1 -1
  50. package/docs/pages/forms/states-and-sizes.md +41 -45
  51. package/docs/pages/forms/sticky-actions.md +3 -3
  52. package/docs/pages/forms/switch.md +110 -2
  53. package/docs/pages/forms/validation.md +9 -9
  54. package/docs/pages/foundations/philosophy.md +1 -1
  55. package/docs/pages/foundations/theming.md +17 -2
  56. package/docs/pages/foundations/tokens.md +22 -10
  57. package/docs/pages/foundations/typography.md +50 -20
  58. package/docs/pages/guides/bootstrap.md +11 -11
  59. package/docs/pages/guides/integrating-actual-css.md +186 -0
  60. package/docs/pages/guides/introduction.md +23 -26
  61. package/docs/pages/guides/modular-import.md +173 -0
  62. package/docs/pages/guides/progressive-enhancement.md +81 -78
  63. package/docs/pages/guides/tailwind.md +6 -8
  64. package/docs/pages/layout/app-shell.md +1 -1
  65. package/docs/pages/layout/center.md +1 -1
  66. package/docs/pages/layout/choosing.md +39 -0
  67. package/docs/pages/layout/column-layout.md +206 -0
  68. package/docs/pages/layout/frame.md +6 -1
  69. package/docs/pages/layout/grid.md +100 -102
  70. package/docs/pages/layout/list.md +1 -1
  71. package/docs/pages/layout/media.md +1 -1
  72. package/docs/pages/layout/overview.md +15 -2
  73. package/docs/pages/layout/scroll-snap.md +2 -2
  74. package/docs/pages/layout/scroll-target.md +45 -0
  75. package/docs/pages/layout/sidebar-layout.md +20 -19
  76. package/docs/pages/layout/stack.md +53 -1
  77. package/docs/pages/layout/switcher.md +10 -26
  78. package/docs/pages/layout/topbar.md +2 -2
  79. package/docs/pages/patterns/actions.md +1 -1
  80. package/docs/pages/patterns/code-block.md +1 -1
  81. package/docs/pages/patterns/exclusive-accordion.md +1 -1
  82. package/docs/pages/patterns/hierarchical-nav.md +1 -1
  83. package/docs/pages/patterns/icon-input.md +1 -1
  84. package/docs/pages/patterns/intent-nesting.md +1 -1
  85. package/docs/pages/patterns/navigation-list.md +1 -1
  86. package/docs/pages/patterns/overview.md +1 -1
  87. package/docs/pages/patterns/structured-lists.md +1 -1
  88. package/docs/pages/utilities/accessibility.md +3 -3
  89. package/docs/pages/utilities/flex.md +15 -15
  90. package/docs/pages/utilities/links.md +4 -4
  91. package/docs/pages/utilities/list.md +8 -8
  92. package/docs/pages/utilities/overflow.md +8 -8
  93. package/docs/pages/utilities/overview.md +1 -1
  94. package/docs/pages/utilities/shape.md +3 -3
  95. package/docs/pages/utilities/sizing-wrapping.md +23 -16
  96. package/docs/pages/utilities/spacing.md +20 -20
  97. package/docs/pages/utilities/text.md +10 -10
  98. package/llms.txt +46 -4
  99. package/package.json +42 -13
  100. package/scripts/reserved-classes.json +261 -0
  101. package/src/cli/actual-css.js +133 -0
  102. package/src/css/actual.css +1 -31
  103. package/src/css/actual.full.css +11 -2
  104. package/src/css/components/alert.css +17 -4
  105. package/src/css/components/badge.css +18 -6
  106. package/src/css/components/breadcrumb.css +1 -1
  107. package/src/css/components/button.css +19 -1
  108. package/src/css/components/card.css +27 -2
  109. package/src/css/components/drawer.css +27 -2
  110. package/src/css/components/flyout.css +5 -0
  111. package/src/css/components/index.css +32 -27
  112. package/src/css/components/join.css +8 -1
  113. package/src/css/components/key.css +2 -0
  114. package/src/css/components/menu.css +11 -1
  115. package/src/css/components/meter.css +4 -1
  116. package/src/css/components/modal.css +5 -0
  117. package/src/css/components/pagination.css +11 -0
  118. package/src/css/components/spinner.css +5 -0
  119. package/src/css/components/status-bar.css +5 -0
  120. package/src/css/components/surface.css +5 -0
  121. package/src/css/components/table.css +6 -0
  122. package/src/css/components/tooltip.css +5 -0
  123. package/src/css/core/index.css +9 -0
  124. package/src/css/core/print.css +18 -0
  125. package/src/css/{theme.css → core/theme.css} +20 -10
  126. package/src/css/{tokens.css → core/tokens.css} +15 -2
  127. package/src/css/{variants.css → core/variants.css} +3 -2
  128. package/src/css/effects/index.css +2 -0
  129. package/src/css/forms/base.css +8 -0
  130. package/src/css/forms/choice-card.css +5 -4
  131. package/src/css/forms/choice.css +49 -37
  132. package/src/css/forms/control.css +4 -1
  133. package/src/css/forms/custom-select.css +2 -0
  134. package/src/css/{optional → forms}/floating-field.css +25 -7
  135. package/src/css/forms/index.css +10 -13
  136. package/src/css/forms/native.css +15 -2
  137. package/src/css/{optional → forms}/otp.css +20 -16
  138. package/src/css/forms/switch.css +31 -29
  139. package/src/css/layout/app-shell.css +6 -0
  140. package/src/css/layout/center.css +13 -0
  141. package/src/css/layout/cluster.css +21 -0
  142. package/src/css/layout/column-layout.css +144 -0
  143. package/src/css/layout/container-query.css +13 -0
  144. package/src/css/layout/frame.css +19 -0
  145. package/src/css/layout/grid.css +141 -0
  146. package/src/css/layout/index.css +42 -0
  147. package/src/css/layout/measure.css +9 -0
  148. package/src/css/layout/media.css +10 -0
  149. package/src/css/layout/scroll-target.css +15 -0
  150. package/src/css/layout/scroller.css +41 -0
  151. package/src/css/layout/sidebar-layout.css +31 -0
  152. package/src/css/layout/stack.css +21 -0
  153. package/src/css/layout/switcher.css +23 -0
  154. package/src/css/{optional/layout-extra.css → layout/topbar.css} +0 -20
  155. package/src/css/typography/index.css +5 -0
  156. package/src/css/typography/lead.css +7 -0
  157. package/src/css/{components → typography}/overline.css +2 -2
  158. package/src/css/{prose.css → typography/prose.css} +53 -38
  159. package/src/css/{utilities.css → utilities/base.css} +2 -0
  160. package/src/css/utilities/index.css +3 -0
  161. package/src/js/escape.js +36 -0
  162. package/src/js/flyout.js +22 -12
  163. package/src/js/full.js +26 -0
  164. package/src/js/index.js +5 -21
  165. package/src/js/surface.js +1 -31
  166. package/src/js/tooltip.js +46 -18
  167. package/src/js/validation.js +1 -1
  168. package/src/tooling/css-bundle.js +308 -0
  169. package/dist/actual-themes.min.css +0 -1
  170. package/dist/optional.css +0 -1048
  171. package/dist/optional.min.css +0 -1
  172. package/docs/pages/guides/optional-components.md +0 -33
  173. package/src/css/grid.css +0 -109
  174. package/src/css/layout.css +0 -123
  175. package/src/css/optional/index.css +0 -10
  176. package/src/css/optional/scroller.css +0 -63
  177. package/src/css/print.css +0 -47
  178. package/src/css/themes/corporate.css +0 -60
  179. package/src/css/themes/cyberpunk.css +0 -60
  180. package/src/css/themes/dim.css +0 -33
  181. package/src/css/themes/edge.css +0 -117
  182. package/src/css/themes/forest.css +0 -65
  183. package/src/css/themes/gradient.css +0 -97
  184. package/src/css/themes/index.css +0 -47
  185. package/src/css/themes/indigo.css +0 -33
  186. package/src/css/themes/lavender.css +0 -66
  187. package/src/css/themes/mono.css +0 -60
  188. package/src/css/themes/neon.css +0 -66
  189. package/src/css/themes/ocean.css +0 -60
  190. package/src/css/themes/petrol.css +0 -64
  191. package/src/css/themes/spruce.css +0 -64
  192. package/src/css/themes/square.css +0 -65
  193. package/src/css/themes/sunset.css +0 -66
  194. /package/src/css/{optional → components}/chat.css +0 -0
  195. /package/src/css/{optional → components}/fab.css +0 -0
  196. /package/src/css/{base.css → core/base.css} +0 -0
  197. /package/src/css/{focus.css → core/focus.css} +0 -0
  198. /package/src/css/{intents.css → core/intents.css} +0 -0
  199. /package/src/css/{reset.css → core/reset.css} +0 -0
  200. /package/src/css/{optional → effects}/aura.css +0 -0
  201. /package/src/css/{optional → layout}/scroll-snap.css +0 -0
  202. /package/src/css/{optional/typography-fluid.css → typography/fluid.css} +0 -0
  203. /package/src/css/{optional/utilities-extra.css → utilities/extra.css} +0 -0
@@ -22,6 +22,58 @@ block margins are reset, so vertical rhythm always comes from `--gap`. Inline
22
22
  margins stay free — for example `margin-inline: auto` on a child centers it
23
23
  without fighting the primitive.
24
24
 
25
+ ## Choosing a density
26
+
27
+ `--gap` is the primitive's channel, and the density variants set it at the point
28
+ of use. Pick the one that matches how tightly the children belong together:
29
+
30
+ | Markup | Gap | Use for |
31
+ |--------------------|------|--------------------------------------------------------|
32
+ | `.stack gap-none` | 0 | Lines that form one typographic unit — a name and a job title, a figure and its caption. |
33
+ | `.stack sm` | 8px | A homogeneous series of distinct controls — a radio list, a checkbox list, a compact vertical menu. |
34
+ | `.stack` | 12px | Normal flow between distinct elements. |
35
+ | `.stack lg` | 24px | Sections, or blocks that should read as separated. |
36
+
37
+ The distinction between the first two matters. `42` above `Open issues` is
38
+ almost a single block of text, so it takes `gap-none`. Three `.choice` labels
39
+ stay three separate controls that happen to form one group, so they take `sm` —
40
+ tighter than the default, but still spaced.
41
+
42
+ A stack that mixes kinds keeps the default: five `.field` wrappers and one lone
43
+ `.choice` is a form that contains a checkbox, not a list of options, and
44
+ tightening it would squeeze the fields.
45
+
46
+ ## Region rhythm goes on `gap`, not on `--gap`
47
+
48
+ A container that composes other primitives owns its rhythm through the `gap`
49
+ property. Setting `--gap` on it instead re-spaces everything it contains, at any
50
+ depth:
51
+
52
+ ```css
53
+ /* Leaks: --gap is inherited, so every nested stack, cluster and grid — down to
54
+ a radio list inside a field-group — is pushed to 24px too. */
55
+ .app-region {
56
+ --gap: var(--space-50);
57
+ }
58
+
59
+ /* Owns its own rhythm and nothing else. Nested primitives keep --gap. */
60
+ .app-region {
61
+ gap: var(--space-50);
62
+ }
63
+ ```
64
+
65
+ Both give the region the same spacing; only the second stops there. This is what
66
+ makes a nested `.stack sm` a real density choice — 12px down to 8px — rather
67
+ than a patch cancelling a rhythm inherited from three levels up.
68
+
69
+ Setting `--gap` is still the right move on the element that *consumes* it: a
70
+ one-off `--gap` on a card body or an actions row tunes that primitive and
71
+ nothing below it, because the setter is the consumer. The leak only appears when
72
+ a container sets the token and its children read it.
73
+
74
+ `.sm` and `.lg` are the deliberate exception: they set `--gap` precisely so a
75
+ density context reaches nested layouts.
76
+
25
77
  ## Grouping items tightly
26
78
 
27
79
  Stack spacing is a `--gap` between every direct child; the primitive cannot
@@ -52,4 +104,4 @@ additive, so a negative block margin on the child cancels the following gap:
52
104
  ```
53
105
 
54
106
  The stack resets child block margins to zero, so this re-adds a margin on that
55
- one child only; the rest of the stack keeps its rhythm.
107
+ one child only; the rest of the stack keeps its rhythm.
@@ -1,36 +1,20 @@
1
1
  # Switcher
2
2
 
3
- Row that becomes a column when space gets tight, useful for small sets of panels.
4
-
5
- > **Optional** — import `actual-css/css/optional/layout-extra` or `actual-css/css/optional/index`.
6
-
7
- Use `.switcher` for rows that should become columns when space gets tight.
3
+ Use `.switcher` for a small set of peer regions that should switch together
4
+ between one row and a vertical stack. Unlike `.grid`, it never produces a
5
+ partial row such as two items followed by one orphan.
8
6
 
9
7
  ```html demo
10
8
  <section class="switcher">
11
- <article class="card">
12
- <h3>Profile</h3>
13
- <p>Personal details and preferences.</p>
14
- </article>
15
- <article class="card">
16
- <h3>Security</h3>
17
- <p>Password and login settings.</p>
18
- </article>
19
- <article class="card">
20
- <h3>Billing</h3>
21
- <p>Invoices and payment methods.</p>
22
- </article>
9
+ <article class="card"><h3>Profile</h3><p>Personal details.</p></article>
10
+ <article class="card"><h3>Security</h3><p>Login settings.</p></article>
11
+ <article class="card"><h3>Billing</h3><p>Payment details.</p></article>
23
12
  </section>
24
13
  ```
25
14
 
26
- This is useful for small sets of panels, not large card collections. Use `.grid` for repeatable collections.
27
-
28
- ## CSS hooks
15
+ Use `.grid` instead for repeatable collections whose items can reflow
16
+ independently.
29
17
 
30
- - `--switcher-threshold` — container width at which the row becomes a column.
18
+ ### Hooks
31
19
 
32
- ```css
33
- .settings-panels {
34
- --switcher-threshold: 55rem;
35
- }
36
- ```
20
+ - `--switcher-threshold` controls the space needed before all peers share a row.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Sticky, frosted top bar shell for app/dashboard layouts with a persistent sidebar.
4
4
 
5
- > **Optional** — import `actual-css/css/optional/layout-extra` or `actual-css/css/optional/index`.
5
+ > **Module** — import `actual-css/css/layout/topbar` or `actual-css/css/layout`.
6
6
 
7
7
  Use `.topbar` for the structural shell of an app-shell header: sticky positioning, stacking, and a frosted background. Row content — search, breadcrumb, actions — stays local to the page.
8
8
 
@@ -20,4 +20,4 @@ Use `.topbar` for the structural shell of an app-shell header: sticky positionin
20
20
  </header>
21
21
  ```
22
22
 
23
- This is for the app-shell topbar specifically — a structural need that recurs unchanged across app UIs regardless of brand. It is not for marketing or editorial site headers, which are one-off visual identity per page.
23
+ This is for the app-shell topbar specifically — a structural need that recurs unchanged across app UIs regardless of brand. It is not for marketing or editorial site headers, which are one-off visual identity per page.
@@ -49,4 +49,4 @@ Prefer composition over making each component reimplement action-list layout.
49
49
  padding: 0;
50
50
  list-style: none;
51
51
  }
52
- ```
52
+ ```
@@ -33,4 +33,4 @@ enhance({
33
33
  });
34
34
  ```
35
35
 
36
- No core JS, no syntax highlighter — the recipe is the documentation.
36
+ No core JS, no syntax highlighter — the recipe is the documentation.
@@ -13,4 +13,4 @@ Browsers that support the `name` attribute on `<details>` get native exclusive a
13
13
  </details>
14
14
  ```
15
15
 
16
- Not shipping an accordion JS engine is a design decision, not a gap.
16
+ Not shipping an accordion JS engine is a design decision, not a gap.
@@ -23,4 +23,4 @@ App shell with a collapsible nav tree. Uses existing primitives only — no tree
23
23
  - Native `<details>`: exclusive accordion with `<details name>` (no JS engine)
24
24
  - `data-enhance="scrollspy"`: scroll-driven `aria-current`
25
25
  - `.scroller`: thin, theme-aware scrollbar
26
- - No `.nav-heading` / `.nav-sublist` classes — the existing primitives are enough
26
+ - No `.nav-heading` / `.nav-sublist` classes — the existing primitives are enough
@@ -22,4 +22,4 @@ The icon keeps a fixed `--input-icon-size` (1.25rem); density contexts shrink th
22
22
  </div>
23
23
  ```
24
24
 
25
- Trailing icons are supported too: an icon that follows the input is positioned at the end and the input grows its end padding. It stays decorative — `pointer-events: none` means an interactive trailing control such as a clear button is not covered by this class.
25
+ Trailing icons are supported too: an icon that follows the input is positioned at the end and the input grows its end padding. It stays decorative — `pointer-events: none` means an interactive trailing control such as a clear button is not covered by this class.
@@ -1,3 +1,3 @@
1
1
  # Intent Nesting
2
2
 
3
- Intent on an ancestor must not tint nested components, and a local intent inside an intent-carrying ancestor must win. Both directions are verified in `tests/css-audit.test.js` and the kitchen-sink demo template. Intent classes only expose `--intent` and `--intent-fg`; each consuming component opens a local intent boundary in a `:where()` block that resets exactly the tokens it consumes to initial. Parent intents do not leak into nested components, and a local intent class still wins because it has higher specificity than `:where()`.
3
+ Intent on an ancestor must not tint nested components, and a local intent inside an intent-carrying ancestor must win. Both directions are verified in `tests/css-audit.test.js` and the kitchen-sink demo template. Intent classes only expose `--intent` and `--intent-fg`; each consuming component opens a local intent boundary in a `:where()` block that resets exactly the tokens it consumes to initial. Parent intents do not leak into nested components, and a local intent class still wins because it has higher specificity than `:where()`.
@@ -232,4 +232,4 @@ A project may add `.side-nav` only when it needs specific visual behavior such a
232
232
  }
233
233
  ```
234
234
 
235
- Keep this separate from layout primitives. `.cluster` and `.stack` should not style links.
235
+ Keep this separate from layout primitives. `.cluster` and `.stack` should not style links.
@@ -55,4 +55,4 @@ If list chrome should be removed, use an explicit pattern.
55
55
  <li><a href="/docs">Docs</a></li>
56
56
  <li><a href="/components">Components</a></li>
57
57
  </ul>
58
- ```
58
+ ```
@@ -44,4 +44,4 @@ Use native lists plus layout primitives for rich content rows. Reset list chrome
44
44
 
45
45
  Use `.actions` for action controls and `.nav-list` for navigation links. For structured content items, compose `.list-reset`, `.stack`, `.cluster`, `.media`, and components directly.
46
46
 
47
- `.media` is a two-slot object: it lays out exactly two children — the leading element and one content column. Trailing metadata and actions belong inside the content column (nest a `.cluster` and put `.grow` on the flexible part), never as extra row children: additional children silently wrap onto a second grid row.
47
+ `.media` is a two-slot object: it lays out exactly two children — the leading element and one content column. Trailing metadata and actions belong inside the content column (nest a `.cluster` and put `.grow` on the flexible part), never as extra row children: additional children silently wrap onto a second grid row.
@@ -4,8 +4,8 @@ Text hidden visually but still available to assistive technology.
4
4
 
5
5
  ## Class reference
6
6
 
7
- | Class | Kind | Description |
8
- |---|---|---|
7
+ | Class | Kind | Description |
8
+ |------------|---------|-----------------------------------------------------------------|
9
9
  | `.sr-only` | Utility | Visually hides text while keeping it in the accessibility tree. |
10
10
 
11
11
  ## Screen reader only
@@ -31,4 +31,4 @@ Use `.sr-only` for text that should be available to assistive technology but vis
31
31
  white-space: nowrap;
32
32
  border: 0;
33
33
  }
34
- ```
34
+ ```
@@ -4,19 +4,19 @@ Small flex helpers for grow behavior and other one-line needs.
4
4
 
5
5
  ## Class reference
6
6
 
7
- | Class | Kind | Description |
8
- |---|---|---|
9
- | `.grow` | Utility | Makes an item take available flex space without overflowing. |
10
- | `.items-start` | Utility | Aligns children to the block-start edge; sets `--items-align`. |
11
- | `.items-center` | Utility | Centers children on the cross axis; sets `--items-align`. |
12
- | `.items-end` | Utility | Aligns children to the block-end edge; sets `--items-align`. |
13
- | `.dot` | Utility | Inline separator dot for metadata rows. |
14
- | `.justify-content-start` | Utility | `justify-content: flex-start` and `--cluster-justify`. Optional layer. |
15
- | `.justify-content-center` | Utility | `justify-content: center` and `--cluster-justify`. Optional layer. |
16
- | `.justify-content-end` | Utility | `justify-content: flex-end` and `--cluster-justify`. Optional layer. |
7
+ | Class | Kind | Description |
8
+ |----------------------------------|---------|---------------------------------------------------------------------------|
9
+ | `.grow` | Utility | Makes an item take available flex space without overflowing. |
10
+ | `.items-start` | Utility | Aligns children to the block-start edge; sets `--items-align`. |
11
+ | `.items-center` | Utility | Centers children on the cross axis; sets `--items-align`. |
12
+ | `.items-end` | Utility | Aligns children to the block-end edge; sets `--items-align`. |
13
+ | `.dot` | Utility | Inline separator dot for metadata rows. |
14
+ | `.justify-content-start` | Utility | `justify-content: flex-start` and `--cluster-justify`. Optional layer. |
15
+ | `.justify-content-center` | Utility | `justify-content: center` and `--cluster-justify`. Optional layer. |
16
+ | `.justify-content-end` | Utility | `justify-content: flex-end` and `--cluster-justify`. Optional layer. |
17
17
  | `.justify-content-space-between` | Utility | `justify-content: space-between` and `--cluster-justify`. Optional layer. |
18
- | `.flex-wrap` | Utility | `flex-wrap: wrap` on any flex container. Optional layer. |
19
- | `.flex-nowrap` | Utility | `flex-wrap: nowrap` on any flex container. Optional layer. |
18
+ | `.flex-wrap` | Utility | `flex-wrap: wrap` on any flex container. Optional layer. |
19
+ | `.flex-nowrap` | Utility | `flex-wrap: nowrap` on any flex container. Optional layer. |
20
20
 
21
21
  ## Grow
22
22
 
@@ -65,8 +65,8 @@ flex containers:
65
65
 
66
66
  - `.items-start` / `.items-center` / `.items-end` set `--items-align`, read by `.alert` and `.card`.
67
67
  - `.text-start` / `.text-center` / `.text-end` set `--text-align`, read by `.table` cells.
68
- - `.justify-content-*` (optional layer) set `--cluster-justify`, read by `.cluster`.
69
- - `.flex-wrap` / `.flex-nowrap` (optional layer) set `flex-wrap` directly on any flex container.
68
+ - `.justify-content-*` (utilities/extra) set `--cluster-justify`, read by `.cluster`.
69
+ - `.flex-wrap` / `.flex-nowrap` (utilities/extra) set `flex-wrap` directly on any flex container.
70
70
 
71
71
  Set the property directly when you need a value the helpers do not ship.
72
72
 
@@ -102,4 +102,4 @@ Always mark it `aria-hidden="true"` — it is a visual separator, not content.
102
102
 
103
103
  - `--items-align` — cross-axis alignment, set by `.items-start` / `.items-center` / `.items-end`.
104
104
  - `--text-align` — text alignment, set by `.text-start` / `.text-center` / `.text-end`.
105
- - `--cluster-justify` — main-axis distribution, set by the optional `.justify-content-*` helpers and read by `.cluster`.
105
+ - `--cluster-justify` — main-axis distribution, set by the optional `.justify-content-*` helpers and read by `.cluster`.
@@ -4,10 +4,10 @@ Link styling for chrome that is conceptually a link but should not look like pro
4
4
 
5
5
  ## Class reference
6
6
 
7
- | Class | Kind | Description |
8
- |---|---|---|
7
+ | Class | Kind | Description |
8
+ |---------------|---------|-----------------------------------------------------------|
9
9
  | `.link-plain` | Utility | Removes the underline and inherits the surrounding color. |
10
- | `.link-muted` | Utility | Muted link that shifts to the full text color on hover. |
10
+ | `.link-muted` | Utility | Muted link that shifts to the full text color on hover. |
11
11
 
12
12
  ## Plain
13
13
 
@@ -15,4 +15,4 @@ Link styling for chrome that is conceptually a link but should not look like pro
15
15
 
16
16
  ## Muted
17
17
 
18
- `.link-muted` is a `.link-plain` that starts in the muted text color and shifts to the full text color on hover. Use for navigation lists, table of contents, and other secondary navigation surfaces.
18
+ `.link-muted` is a `.link-plain` that starts in the muted text color and shifts to the full text color on hover. Use for navigation lists, table of contents, and other secondary navigation surfaces.
@@ -4,11 +4,11 @@ Utilities for list chrome reset, readable measure, and editorial kicker labels.
4
4
 
5
5
  ## Class reference
6
6
 
7
- | Class | Kind | Description |
8
- |---|---|---|
9
- | `.list-reset` | Utility | Removes native list margin, padding, and markers. |
10
- | `.measure` | Utility | Caps a block at a readable width via `--prose-measure`. |
11
- | `.overline` | Component | Small editorial kicker label: muted, uppercase, letterspaced. |
7
+ | Class | Kind | Description |
8
+ |---------------|-----------|---------------------------------------------------------------|
9
+ | `.list-reset` | Utility | Removes native list margin, padding, and markers. |
10
+ | `.measure` | Utility | Caps a block at a readable width via `--measure`. |
11
+ | `.overline` | Component | Small editorial kicker label: muted, uppercase, letterspaced. |
12
12
 
13
13
  ## List reset
14
14
 
@@ -16,7 +16,7 @@ Utilities for list chrome reset, readable measure, and editorial kicker labels.
16
16
 
17
17
  ## Measure
18
18
 
19
- `.measure` caps a block at a readable width using `--prose-measure`. It does not center — combine with `.center` for the common centered reading column, or with `margin-inline: auto` for a one-off centered block.
19
+ `.measure` caps a block at a readable width using `--measure`. It does not center — combine with `.center` for the common centered reading column, or with `margin-inline: auto` for a one-off centered block.
20
20
 
21
21
  Use it for any content that needs a comfortable measure: prose articles, TOC lists, form fields, callouts. Avoid using it for full-bleed surfaces.
22
22
 
@@ -28,5 +28,5 @@ The overline exists because categories, kicker labels, and section markers recur
28
28
 
29
29
  ## CSS hooks
30
30
 
31
- - `--prose-measure` — the readable measure `.measure` caps at; defaults to `70ch`.
32
- - `--overline-radius` — the pill chip's corner radius; defaults to `--radius-full`.
31
+ - `--measure` — the readable measure `.measure` caps at; defaults to `70ch`.
32
+ - `--overline-radius` — the pill chip's corner radius; defaults to `--radius-full`.
@@ -4,13 +4,13 @@ Explicit overflow handling for content that may exceed its container.
4
4
 
5
5
  ## Class reference
6
6
 
7
- | Class | Kind | Description |
8
- |---|---|---|
9
- | `.overflow-auto` | Utility | Enables scrolling when content exceeds the container. |
10
- | `.overflow-hidden` | Utility | Clips overflowing content. Optional layer. |
11
- | `.overflow-clip` | Utility | Clips overflowing content without a scroll container. Optional layer. |
12
- | `.overflow-x-auto` | Utility | Horizontal scrolling only. Optional layer. |
13
- | `.overflow-y-auto` | Utility | Vertical scrolling only. Optional layer. |
7
+ | Class | Kind | Description |
8
+ |--------------------|---------|-----------------------------------------------------------------------|
9
+ | `.overflow-auto` | Utility | Enables scrolling when content exceeds the container. |
10
+ | `.overflow-hidden` | Utility | Clips overflowing content. Optional layer. |
11
+ | `.overflow-clip` | Utility | Clips overflowing content without a scroll container. Optional layer. |
12
+ | `.overflow-x-auto` | Utility | Horizontal scrolling only. Optional layer. |
13
+ | `.overflow-y-auto` | Utility | Vertical scrolling only. Optional layer. |
14
14
 
15
15
  Use `.overflow-auto` when content may overflow its container, especially tables and code-like regions.
16
16
 
@@ -40,4 +40,4 @@ Use `.overflow-auto` when content may overflow its container, especially tables
40
40
  }
41
41
  ```
42
42
 
43
- The optional layer extends the same concern with axis-specific and clipping variants. For quiet, custom scrollbar chrome instead of the native OS scrollbar, pair `.overflow-auto` with `.scroller` on the Sizing And Wrapping page.
43
+ The extra utilities extend the same concern with axis-specific and clipping variants. To give the native scrollbar the theme's density and colour, pair `.overflow-auto` with `.scroller` on the Sizing And Wrapping page.
@@ -15,4 +15,4 @@ Utilities are a small escape hatch for common single-purpose needs. They should
15
15
  - No color scales such as `.text-primary` or `.bg-success` — intent colors belong to components and state.
16
16
  - No breakpoint utility variants — use container queries or layout primitives.
17
17
  - No utility variants for hover, focus, dark mode, or arbitrary selectors — use component states.
18
- - No full spacing scale with every step and direction — the 17 spacing helpers across the core and optional layers cover the most common escape hatches.
18
+ - No full spacing scale with every step and direction — the 17 spacing helpers across the core and extra utilities cover the most common escape hatches.
@@ -4,8 +4,8 @@ Rare shape utilities for cases that must be perfectly round or square.
4
4
 
5
5
  ## Class reference
6
6
 
7
- | Class | Kind | Description |
8
- |---|---|---|
7
+ | Class | Kind | Description |
8
+ |-----------|---------|-----------------------------------------------------|
9
9
  | `.circle` | Utility | Forces a perfectly round shape via `--radius-full`. |
10
10
 
11
11
  Shape utilities should be rare because shape is mostly theme-level.
@@ -22,4 +22,4 @@ Use `.circle` only when an element must be perfectly round.
22
22
  }
23
23
  ```
24
24
 
25
- Do not add `.rounded-sm`, `.rounded-lg`, `.square`, or `.pill` unless repeated real use proves they are needed.
25
+ Do not add `.rounded-sm`, `.rounded-lg`, `.square`, or `.pill` unless repeated real use proves they are needed.
@@ -4,12 +4,12 @@ Small layout corrections for controls, labels, and compact rails.
4
4
 
5
5
  ## Class reference
6
6
 
7
- | Class | Kind | Description |
8
- |---|---|---|
9
- | `.fit` | Utility | Shrinks a control or element to its content width. |
10
- | `.text-nowrap` | Utility | Keeps text on one line. |
11
- | `.truncate` | Utility | Ellipsizes overflowing single-line text. |
12
- | `.scroller` | Utility | Quiet custom scrollbar chrome for scroll containers. Optional layer. |
7
+ | Class | Kind | Description |
8
+ |---------------------------|---------|---------------------------------------------------------------------------|
9
+ | `.fit` | Utility | Shrinks a control or element to its content width. |
10
+ | `.text-nowrap` | Utility | Keeps text on one line. |
11
+ | `.truncate` | Utility | Ellipsizes overflowing single-line text. |
12
+ | `.scroller` | Utility | Theme-aware scrollbar density and colour for scroll containers. Optional layer. |
13
13
  | `.scroller.stable-gutter` | Variant | Reserves scrollbar gutter space so layout does not shift. Optional layer. |
14
14
 
15
15
  Use `.fit` when a control or element should shrink to its content instead of filling the available inline space.
@@ -66,10 +66,22 @@ Use `.truncate` on the flexible item that should ellipsize inside a constrained
66
66
 
67
67
  Use `.scroller` to apply optional framework scrollbar treatment to a scroll container. It styles the scrollbar only; pair it with `.overflow-auto` or a component that already creates overflow.
68
68
 
69
+ The utility is two standard declarations and nothing else — the engine keeps
70
+ drawing the scrollbar, `.scroller` only hands it a density and a colour that
71
+ follow the theme. There is no `::-webkit-scrollbar` chrome: rebuilding a thumb
72
+ by hand means re-implementing the hover, the corner and the light/dark
73
+ adaptation that `color-scheme` already provides, and the hand-built version
74
+ never quite matches the native one anyway.
75
+
76
+ `scrollbar-color` and `scrollbar-width` land in Chromium 121 and Safari 18.2,
77
+ above the capability floor. An engine that knows neither ignores both
78
+ declarations and draws its native scrollbar — the intended fallback, not a
79
+ broken state.
80
+
69
81
  `scroller` is not imported by `actual.css`. Import it explicitly when a project wants Actual CSS scrollbar chrome instead of the native OS default:
70
82
 
71
83
  ```css
72
- @import "actual-css/css/optional/scroller";
84
+ @import "actual-css/css/layout/scroller";
73
85
  ```
74
86
 
75
87
  ```html demo
@@ -84,11 +96,8 @@ Use `.scroller` to apply optional framework scrollbar treatment to a scroll cont
84
96
 
85
97
  ```css
86
98
  .scroller {
87
- --scroller-size: 0.625rem;
88
- --scroller-padding: 0.125rem;
89
99
  --scroller-track: transparent;
90
100
  --scroller-thumb: var(--border);
91
- --scroller-thumb-hover: var(--text-muted);
92
101
 
93
102
  scrollbar-color: var(--scroller-thumb) var(--scroller-track);
94
103
  scrollbar-width: thin;
@@ -98,18 +107,16 @@ Use `.scroller` to apply optional framework scrollbar treatment to a scroll cont
98
107
  Customize locally when a scroll surface needs more contrast:
99
108
 
100
109
  ```html
101
- <div class="overflow-auto scroller"
102
- style="--scroller-thumb: var(--text-muted); --scroller-thumb-hover: var(--text)">
110
+ <div class="overflow-auto scroller" style="--scroller-thumb: var(--text-muted)">
103
111
  ...
104
112
  </div>
105
113
  ```
106
114
 
107
- For rounded scroll containers, keep the thumb visually away from the edge by tuning `--scroller-padding` rather than adding extra wrappers or masking pseudo-elements.
115
+ Thickness is not a hook: `scrollbar-width` takes `thin` or `auto`, not a length.
116
+ Hover is left to the engine — it varies by platform, and matching it by hand was
117
+ the part of a custom scrollbar that never held up.
108
118
 
109
119
  ## CSS hooks
110
120
 
111
- - `--scroller-size` — scrollbar thickness.
112
- - `--scroller-padding` — inset between the thumb and the track edge.
113
121
  - `--scroller-track` — scrollbar track color.
114
122
  - `--scroller-thumb` — scrollbar thumb color.
115
- - `--scroller-thumb-hover` — scrollbar thumb color on hover.
@@ -4,25 +4,25 @@ Semantic step helpers for gap, padding, and margin — the most common inline-st
4
4
 
5
5
  ## Class reference
6
6
 
7
- | Class | Kind | Description |
8
- |---|---|---|
9
- | `.gap-none` | Utility | `gap: 0` on the element itself. |
10
- | `.py` | Utility | Block (vertical) padding at the current density step. |
11
- | `.px` | Utility | Inline (horizontal) padding at the current density step. |
12
- | `.mbs` | Utility | Block-start margin at the current density step. |
13
- | `.mbe` | Utility | Block-end margin at the current density step. |
14
- | `.gap-sm` | Utility | `gap: var(--space-20)` — denser row rhythm. Optional layer. |
15
- | `.gap-md` | Utility | `gap: var(--space-40)` — default row rhythm. Optional layer. |
16
- | `.gap-lg` | Utility | `gap: var(--space-50)` — roomier row rhythm. Optional layer. |
17
- | `.padding-context` | Utility | All-side padding at the current density step. Optional layer. |
18
- | `.gap-context` | Utility | `gap: var(--gap)`. Optional layer. |
19
- | `.row-gap-context` | Utility | `row-gap: var(--gap)`. Optional layer. |
20
- | `.column-gap-context` | Utility | `column-gap: var(--gap)`. Optional layer. |
21
- | `.margin-inline-auto` | Utility | Horizontally centers a block. Optional layer. |
22
- | `.margin-inline-start-auto` | Utility | Pushes a block toward the inline end. Optional layer. |
23
- | `.margin-inline-end-auto` | Utility | Pushes a block toward the inline start. Optional layer. |
24
- | `.margin-block-start-auto` | Utility | Pushes content toward the block end. Optional layer. |
25
- | `.margin-block-end-auto` | Utility | Pushes content toward the block start. Optional layer. |
7
+ | Class | Kind | Description |
8
+ |-----------------------------|---------|---------------------------------------------------------------|
9
+ | `.gap-none` | Utility | `gap: 0` on the element itself. |
10
+ | `.py` | Utility | Block (vertical) padding at the current density step. |
11
+ | `.px` | Utility | Inline (horizontal) padding at the current density step. |
12
+ | `.mbs` | Utility | Block-start margin at the current density step. |
13
+ | `.mbe` | Utility | Block-end margin at the current density step. |
14
+ | `.gap-sm` | Utility | `gap: var(--space-20)` — denser row rhythm. Optional layer. |
15
+ | `.gap-md` | Utility | `gap: var(--space-40)` — default row rhythm. Optional layer. |
16
+ | `.gap-lg` | Utility | `gap: var(--space-50)` — roomier row rhythm. Optional layer. |
17
+ | `.padding-context` | Utility | All-side padding at the current density step. Optional layer. |
18
+ | `.gap-context` | Utility | `gap: var(--gap)`. Optional layer. |
19
+ | `.row-gap-context` | Utility | `row-gap: var(--gap)`. Optional layer. |
20
+ | `.column-gap-context` | Utility | `column-gap: var(--gap)`. Optional layer. |
21
+ | `.margin-inline-auto` | Utility | Horizontally centers a block. Optional layer. |
22
+ | `.margin-inline-start-auto` | Utility | Pushes a block toward the inline end. Optional layer. |
23
+ | `.margin-inline-end-auto` | Utility | Pushes a block toward the inline start. Optional layer. |
24
+ | `.margin-block-start-auto` | Utility | Pushes content toward the block end. Optional layer. |
25
+ | `.margin-block-end-auto` | Utility | Pushes content toward the block start. Optional layer. |
26
26
 
27
27
  Spacing helpers follow the density context. The default step is
28
28
  `--space-40` (1rem); the `.sm` context tightens it to `--space-20` (0.5rem)
@@ -76,4 +76,4 @@ No `mbs-none` / `mbe-none` — use `margin: 0` via `.list-reset` for lists, or a
76
76
  ## CSS hooks
77
77
 
78
78
  - `--density-space` — the step every padding and margin helper reads; `.sm` sets it to `--space-20`, default to `--space-40`, `.lg` to `--space-50`.
79
- - `--gap` — base gap of layout primitives; read by the optional `.gap-context`, `.row-gap-context`, and `.column-gap-context` helpers.
79
+ - `--gap` — base gap of layout primitives; read by the optional `.gap-context`, `.row-gap-context`, and `.column-gap-context` helpers.
@@ -4,15 +4,15 @@ Lightweight helpers for muted or secondary text without a full color scale.
4
4
 
5
5
  ## Class reference
6
6
 
7
- | Class | Kind | Description |
8
- |---|---|---|
9
- | `.muted` | Utility | Secondary text color. |
10
- | `.text-start` | Utility | Logical start-aligned text; sets `--text-align`. |
11
- | `.text-center` | Utility | Centered text; sets `--text-align`. |
12
- | `.text-end` | Utility | Logical end-aligned text; sets `--text-align`. |
13
- | `.text-balance` | Utility | Balanced line wrapping (`text-wrap: balance`). |
14
- | `.text-pretty` | Utility | Pretty line wrapping (`text-wrap: pretty`). |
15
- | `.lead` | Utility | Slightly larger, relaxed reading-introduction paragraph. |
7
+ | Class | Kind | Description |
8
+ |-----------------|---------|----------------------------------------------------------|
9
+ | `.muted` | Utility | Secondary text color. |
10
+ | `.text-start` | Utility | Logical start-aligned text; sets `--text-align`. |
11
+ | `.text-center` | Utility | Centered text; sets `--text-align`. |
12
+ | `.text-end` | Utility | Logical end-aligned text; sets `--text-align`. |
13
+ | `.text-balance` | Utility | Balanced line wrapping (`text-wrap: balance`). |
14
+ | `.text-pretty` | Utility | Pretty line wrapping (`text-wrap: pretty`). |
15
+ | `.lead` | Utility | Slightly larger, relaxed reading-introduction paragraph. |
16
16
 
17
17
  ## Muted
18
18
 
@@ -40,4 +40,4 @@ Use `.text-start`, `.text-center`, or `.text-end` when a component or layout pri
40
40
 
41
41
  ## Lead
42
42
 
43
- `.lead` is a slightly larger, more relaxed reading-introduction paragraph (`1.125em`, `--line-height-relaxed`). Use it for introductory text in editorial surfaces. For fluid headline sizing, use `src/css/optional/typography-fluid.css`.
43
+ `.lead` is a slightly larger, more relaxed reading-introduction paragraph (`1.125em`, `--line-height-relaxed`). Use it for introductory text in editorial surfaces. For fluid headline sizing, use `src/css/typography/fluid.css`.
package/llms.txt CHANGED
@@ -10,14 +10,56 @@ Actual CSS uses a small public grammar: `.component [intent] [variant] [size] [m
10
10
 
11
11
  ## Package Entrypoints
12
12
 
13
- `package.json#exports` is the canonical package surface. Use `actual-css` for the
14
- full CSS framework and `actual-css/js` for the complete runtime. The composition
15
- guides in [README](README.md) and [Progressive Enhancements](docs/pages/enhancements/overview.md)
13
+ `package.json#exports` is the canonical package surface.
14
+
15
+ - `actual-css` — the minimal core: tokens, theme contract, reset, base elements, and universal variants. Components and layout primitives are NOT included.
16
+ - `actual-css/full` — the complete framework: core plus every component, form, layout, typography, effect, and utility family.
17
+ - `actual-css/js` — the enhancement loader only; it discovers `data-enhance` markers and loads enhancers on demand.
18
+ - `actual-css/js/full` — the complete runtime with all built-in enhancers pre-registered.
19
+ - `actual-css/reserved-classes.json` — machine-readable list of every class name the framework can generate. Use it to validate class usage in HTML (an "unknown class" checker) instead of guessing names from other frameworks.
20
+ - Individual families and modules are importable separately (`actual-css/css/components`, `actual-css/css/layout/grid`, `actual-css/js/dialog`, …); see [README](README.md) and [Modular imports](docs/pages/guides/modular-import.md).
21
+
22
+ The composition guides in [README](README.md) and [Progressive Enhancements](docs/pages/enhancements/overview.md)
16
23
  show supported CSS modules and individual enhancer imports without duplicating
17
24
  the full export list here.
18
25
 
19
- In 0.2, presentation (`class`) and behavior (`data-enhance`) are separate layers.
26
+ Presentation (`class`) and behavior (`data-enhance`) are separate layers.
20
27
  Behaviour primitives (`enhance`, `floating`, `surface`, `keys`, `menu`, `focus`,
21
28
  `events`) are independently importable for building custom widgets.
22
29
  See [enhancement contract](docs/design-notes/enhancement-contract.md) and
23
30
  [widget primitives](docs/design-notes/widget-primitives.md).
31
+
32
+ ## Choosing a layout primitive
33
+
34
+ Pick from the relationship between children, not the number of children in one mockup:
35
+
36
+ - Responsive collection of cards/items where an incomplete final row is acceptable → `.grid`
37
+ - Known structural density, at most N columns → `.grid-N`
38
+ - Peer regions that must switch together → `.switcher`
39
+ - Main content plus a secondary region (content + aside) → `.sidebar-layout`
40
+ - Fixed media followed by flexible content → `.media`
41
+ - Explicit region placement on a shared 12-column canvas → `.column-layout`
42
+ - Vertical flow → `.stack`; wrapping inline items → `.cluster`
43
+
44
+ Use `--grid-columns` on `.grid` for exact track templates that do not match a
45
+ built-in layout contract: arbitrary structural counts (seven calendar days),
46
+ asymmetric fractional tracks, or mixed intrinsic/flexible tracks. See
47
+ [Choosing a layout](docs/pages/layout/choosing.md).
48
+
49
+ `.status-bar` is transient feedback only; persistent metrics or application
50
+ state belong in normal content such as cards, badges and alerts.
51
+
52
+ ## Before generating application CSS
53
+
54
+ Read [Building with Actual CSS](docs/pages/guides/integrating-actual-css.md)
55
+ before writing application styles.
56
+
57
+ 1. Start with Actual's vocabulary: theme tokens, then layout primitives, then components, then their public hooks, then small utilities, then application CSS.
58
+ 2. Choose layout primitives by relationship, not item count.
59
+ 3. Prefer component/layout hooks over replacement rules (tune before replacing).
60
+ 4. Search the class manifest before inventing generic utilities.
61
+ 5. Keep literal palette colors inside the theme/token block; derive decorative colors from tokens.
62
+ 6. Use application CSS for genuinely product-specific styling — brand marks, unusual geometry, bespoke animation.
63
+
64
+ The goal is no duplicated framework behavior and no palette literals outside the
65
+ token layer, not zero application CSS.