actual-css 0.11.1 → 0.12.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.
- package/CHANGELOG.md +47 -0
- package/README.md +26 -6
- package/components.json +4 -16
- package/dist/actual.full.css +296 -267
- package/dist/actual.full.min.css +1 -1
- package/docs/brand/favicon.svg +5 -0
- package/docs/brand/lockup.svg +12 -0
- package/docs/brand/logo-dark.svg +9 -0
- package/docs/brand/logo-light.svg +9 -0
- package/docs/brand/logo.svg +11 -0
- package/docs/brand/mark.svg +11 -0
- package/docs/navigation.json +3 -2
- package/docs/pages/components/alert.md +2 -10
- package/docs/pages/components/badge.md +3 -9
- package/docs/pages/components/card.md +31 -2
- package/docs/pages/components/dialog.md +121 -33
- package/docs/pages/components/drawer.md +2 -2
- package/docs/pages/components/navbar.md +8 -9
- package/docs/pages/components/table.md +3 -3
- package/docs/pages/enhancements/flyout.md +2 -2
- package/docs/pages/enhancements/scrollspy.md +1 -1
- package/docs/pages/enhancements/status-bar.md +2 -2
- package/docs/pages/examples/overview.md +2 -1
- package/docs/pages/forms/date-picker.md +90 -0
- package/docs/pages/forms/detached-actions.md +37 -30
- package/docs/pages/forms/form-actions.md +61 -28
- package/docs/pages/forms/input-policy.md +1 -1
- package/docs/pages/forms/overview.md +6 -5
- package/docs/pages/forms/sticky-actions.md +85 -83
- package/docs/pages/forms/validation.md +5 -5
- package/docs/pages/foundations/philosophy.md +5 -3
- package/docs/pages/foundations/theming.md +15 -4
- package/docs/pages/foundations/tokens.md +50 -33
- package/docs/pages/foundations/typography.md +4 -7
- package/docs/pages/guides/bootstrap.md +2 -2
- package/docs/pages/guides/design-tools.md +2 -2
- package/docs/pages/guides/integrating-actual-css.md +5 -1
- package/docs/pages/guides/introduction.md +3 -4
- package/docs/pages/guides/modular-import.md +3 -0
- package/docs/pages/guides/progressive-enhancement.md +2 -2
- package/docs/pages/guides/tailwind.md +70 -0
- package/docs/pages/guides/upgrading.md +74 -0
- package/docs/pages/layout/cluster.md +28 -2
- package/docs/pages/layout/overview.md +1 -1
- package/docs/pages/layout/stack.md +21 -16
- package/docs/pages/layout/topbar.md +1 -1
- package/docs/pages/patterns/navigation-list.md +16 -46
- package/docs/pages/patterns/overview.md +3 -4
- package/docs/pages/utilities/flex.md +30 -20
- package/docs/pages/utilities/sizing-wrapping.md +1 -1
- package/docs/pages/utilities/spacing.md +4 -3
- package/package.json +2 -2
- package/reserved-classes.json +3 -3
- package/skills/actual-css/references/enhancements.md +10 -7
- package/src/cli/actual-css.js +39 -13
- package/src/css/components/avatar.css +16 -9
- package/src/css/components/badge.css +1 -5
- package/src/css/components/button.css +3 -9
- package/src/css/components/card.css +18 -10
- package/src/css/components/chat.css +4 -5
- package/src/css/components/drawer.css +19 -3
- package/src/css/components/flyout.css +3 -0
- package/src/css/components/index.css +0 -1
- package/src/css/components/modal.css +96 -124
- package/src/css/components/navbar.css +14 -25
- package/src/css/core/base.css +1 -1
- package/src/css/core/reset.css +2 -1
- package/src/css/core/theme.css +4 -0
- package/src/css/core/tokens.css +28 -10
- package/src/css/core/variants.css +41 -14
- package/src/css/forms/form-actions.css +15 -10
- package/src/css/layout/cluster.css +11 -0
- package/src/css/layout/topbar.css +12 -6
- package/src/css/utilities/base.css +5 -0
- package/src/css/utilities/extra.css +3 -7
- package/src/tooling/color.js +65 -0
- package/src/tooling/design-tokens.js +9 -1
- package/src/tooling/theme-contrast.js +209 -0
- package/docs/pages/patterns/actions.md +0 -52
- package/src/css/components/actions.css +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,53 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.12.0] - 2026-10-02
|
|
6
|
+
### Breaking changes
|
|
7
|
+
|
|
8
|
+
- `.actions` is removed; compose a `<menu>` (or `<ul>`) with `cluster` for a row, or `stack list-reset` for a vertical list.
|
|
9
|
+
- `.navbar-nav` is removed; the horizontal link list is a `.cluster` with the framework `--gap`.
|
|
10
|
+
- `.dialog-confirmation` is removed; compose `.media` with `.dialog-icon`, then `<footer class="bleed background-subtle cluster justify-content-space-between">` (recipe in `docs/pages/components/dialog.md`).
|
|
11
|
+
- The `dialog.modal` body `<footer>` has no layout of its own; compose its row as `<footer class="cluster justify-content-end">`, as in the drawer.
|
|
12
|
+
- `--modal-header-bg` is removed; put a `.background-*` utility on the `dialog.modal > header` band.
|
|
13
|
+
- `.form-actions` no longer lays out its row; write `class="cluster form-actions"` (`--form-actions-justify` and `--form-actions-align` still apply).
|
|
14
|
+
- `.form-actions` drops its top margin and `--form-actions-margin-block-start`; space it from the fields with `.stack` on the form.
|
|
15
|
+
- `.justify-content-*` no longer sets `--cluster-justify`, so it aligns only its own element, never a nested `.cluster`.
|
|
16
|
+
- `.card` header and footer rows drop to zero specificity: `.media`, `.cluster`, `.form-actions` and `.justify-content-*` on a slot now take over its layout.
|
|
17
|
+
- `--font-width-dense` is removed; set `font-stretch` on an element that should render condensed.
|
|
18
|
+
- A theme sets `--control-pad-x-sm` / `-md` / `-lg` instead of `--control-pad-x`, which `.sm`/`.lg` and `.compact`/`.spacious` now select from.
|
|
19
|
+
- A theme that sets its own control steps re-selects them in its block to work as a nested island (recipe in `docs/pages/foundations/tokens.md`).
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- `actual-css contrast [--theme FILE]` (Bun) measures a theme's soft, focus, invalid-focus and inverse pairs in each declared scheme, and exits 1 on a miss.
|
|
24
|
+
- `.tight` and `.loose` set the inherited `--gap` to `--space-20` / `--space-50` alone, without the padding or control size of `.compact` / `.spacious`.
|
|
25
|
+
- `docs/pages/guides/upgrading.md` lists the edits a 0.11 project needs for 0.12.
|
|
26
|
+
- `.items-baseline` aligns children on their first text baseline and sets `--items-align`, completing the `.items-*` series.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- An action row composed from `.cluster` inherits the framework `--gap` (0.75rem); the removed `.actions` set 0.5rem. Use `.tight` for the tighter rhythm.
|
|
31
|
+
- `.cluster` removes the native list chrome (`margin`, `padding`, `list-style`) from a `ul`, `ol` or `menu` it is applied to; the element stays a list in the DOM.
|
|
32
|
+
- A heading that is the first child beside a leading `.dialog-icon` in a `.media` row centers on the icon anywhere, not only in a dialog.
|
|
33
|
+
- A `dialog.modal` or `.drawer` header gives back its corner-close room when the dialog contains no `.close`; without `:has()` the room stays.
|
|
34
|
+
- `.compact` and `.spacious` no longer set `font-stretch`: density changes rhythm and geometry, never typography.
|
|
35
|
+
- `.compact` and `.spacious` select `--control-pad-x-sm` / `-lg`, so density controls get narrower or wider, not only shorter or taller.
|
|
36
|
+
- `.sm` controls use the shared `--control-pad-x-sm` step: 13px of inline padding instead of 14px.
|
|
37
|
+
- `.card.compact` lowers `--card-gap` to `--space-20` along with `--card-pad`.
|
|
38
|
+
- `.nav-list` rows sit `--space-10` apart instead of `--space-20`, so a vertical nav reads as one list.
|
|
39
|
+
- `.topbar` lays out its default row at zero specificity, so `topbar cluster` hands the row to `.cluster`.
|
|
40
|
+
- The WCAG and OKLCH color math moves from `scripts/utils/color.js` to `src/tooling/color.js`.
|
|
41
|
+
- `report:theme-contrast` labels a dark-only preset (`dim`, `glass`, `indigo`, `neon`) as dark instead of light.
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
- `actual-css contrast` counts a resting soft pair under 4.5:1 as a miss; it only gated the hovered pair.
|
|
46
|
+
- The `design` and `contrast` examples run `bunx --bun actual-css`: plain `bunx` honors the CLI's Node shebang and stops on "needs Bun".
|
|
47
|
+
- `dialog.modal.scrollable` lays the body wrapper out as a flex column: a structural header or footer keeps its size and every other region scrolls, so a modal with an external `dialog > header` no longer collapses its footer to zero.
|
|
48
|
+
- `--dialog-icon-size` and `--dialog-icon-glyph-size` are read, not declared, on `.dialog-icon`, so an override on the icon's media row or the dialog moves the circle and the heading beside it together.
|
|
49
|
+
- An `.avatar-stack` avatar layers its fill over `--surface-opaque`, so a translucent fill no longer shows the neighbour it overlaps.
|
|
50
|
+
- `prefers-reduced-motion` also resets `::backdrop`, so a modal or drawer scrim no longer fades when the user reduces motion.
|
|
51
|
+
|
|
5
52
|
## [0.11.1] - 2026-09-30
|
|
6
53
|
|
|
7
54
|
### Added
|
package/README.md
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
<picture>
|
|
2
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/brand/logo-dark.svg">
|
|
3
|
+
<img src="docs/brand/logo-light.svg" alt="Actual CSS" width="380">
|
|
4
|
+
</picture>
|
|
5
|
+
|
|
1
6
|
# Actual CSS
|
|
2
7
|
|
|
3
8
|
Plain CSS component framework for new projects. Semantic classes, shared variants, small tokens, theme hooks, and progressive enhancement.
|
|
4
9
|
|
|
10
|
+
Documentation: <https://lekoala.github.io/actual-css/>
|
|
11
|
+
|
|
5
12
|
Actual CSS claims a documented set of global class names; the package publishes
|
|
6
13
|
it as [`actual-css/reserved-classes.json`](reserved-classes.json).
|
|
7
14
|
|
|
@@ -42,7 +49,7 @@ Flatten the composition for production with
|
|
|
42
49
|
resolves package subpaths and relative files, then inlines them without
|
|
43
50
|
transpiling modern CSS.
|
|
44
51
|
|
|
45
|
-
Hand your theme to designers with `bunx actual-css design --theme theme.css --out design/`:
|
|
52
|
+
Hand your theme to designers with `bunx --bun actual-css design --theme theme.css --out design/`:
|
|
46
53
|
Figma and Penpot tokens, plus a Penpot plugin that builds the core components.
|
|
47
54
|
See [Design tools](docs/pages/guides/design-tools.md).
|
|
48
55
|
|
|
@@ -57,7 +64,7 @@ size is not worth optimizing:
|
|
|
57
64
|
```
|
|
58
65
|
|
|
59
66
|
```html
|
|
60
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/actual-css@0.
|
|
67
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/actual-css@0.12/dist/actual.full.min.css">
|
|
61
68
|
```
|
|
62
69
|
|
|
63
70
|
## Usage
|
|
@@ -77,8 +84,7 @@ Variants such as `.solid`, `.soft`, `.outline`, and `.surface` are shared by com
|
|
|
77
84
|
|
|
78
85
|
Size variants `.sm` and `.lg` scale typography and participating component
|
|
79
86
|
geometry consistently. Density contexts `.compact` and `.spacious` change
|
|
80
|
-
spacing and geometry without changing font size or icons
|
|
81
|
-
slightly narrow typefaces that support a width axis.
|
|
87
|
+
spacing and geometry without changing font size, font width or icons.
|
|
82
88
|
|
|
83
89
|
## Public Class Grammar
|
|
84
90
|
|
|
@@ -98,7 +104,7 @@ Undocumented `is-*` classes are runtime internals.
|
|
|
98
104
|
|
|
99
105
|
**UI components** — dialog, drawer, flyout, tooltip, tabs, scrollspy, context menus, and other components that rely on JavaScript or modern platform behavior.
|
|
100
106
|
|
|
101
|
-
**Patterns** —
|
|
107
|
+
**Patterns** — navbar and overline. These are regular source files and can be imported only when needed.
|
|
102
108
|
|
|
103
109
|
**Layout primitives** — `.stack`, `.cluster`, `.grid`, `.switcher`, `.center`, `.media`, `.frame`, `.app-shell`, `.sidebar-layout`, and `.container-query`.
|
|
104
110
|
|
|
@@ -131,7 +137,7 @@ registries:
|
|
|
131
137
|
* **Full runtime, zero-config** — every built-in enhancer, compiled:
|
|
132
138
|
|
|
133
139
|
```html
|
|
134
|
-
<script src="https://cdn.jsdelivr.net/npm/actual-css@0.
|
|
140
|
+
<script src="https://cdn.jsdelivr.net/npm/actual-css@0.12/dist/actual.full.js" type="module"></script>
|
|
135
141
|
```
|
|
136
142
|
|
|
137
143
|
* **Your own build** — copy the package's `src/js/full.js` as your entry,
|
|
@@ -164,6 +170,20 @@ Actual CSS does not currently ship a separate compatibility build. It is designe
|
|
|
164
170
|
|
|
165
171
|
For more conservative fallbacks, import and compose the source entrypoints directly.
|
|
166
172
|
|
|
173
|
+
## Versioning
|
|
174
|
+
|
|
175
|
+
Actual CSS is before 1.0:
|
|
176
|
+
|
|
177
|
+
* A minor release (`0.11` → `0.12`) may remove or rename classes and hooks. Each
|
|
178
|
+
one ships an upgrade guide; the current one is
|
|
179
|
+
[Upgrading to 0.12](docs/pages/guides/upgrading.md).
|
|
180
|
+
* A patch release (`0.11.0` → `0.11.1`) keeps every class and hook. It fixes
|
|
181
|
+
bugs and may add hooks, so a fix can still move a rendering by a few pixels.
|
|
182
|
+
|
|
183
|
+
The floating `@0.11` CDN path takes patches automatically. Pin the exact
|
|
184
|
+
version (`actual-css@0.12.1`) when the rendering must not change without a
|
|
185
|
+
review.
|
|
186
|
+
|
|
167
187
|
## Browser support
|
|
168
188
|
|
|
169
189
|
Actual CSS is built around progressive enhancement.
|
package/components.json
CHANGED
|
@@ -18,17 +18,6 @@
|
|
|
18
18
|
"open"
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
|
-
{
|
|
22
|
-
"name": "actions",
|
|
23
|
-
"source": "src/css/components/actions.css",
|
|
24
|
-
"cssImport": "actual-css/css/components/actions",
|
|
25
|
-
"classes": [
|
|
26
|
-
"actions"
|
|
27
|
-
],
|
|
28
|
-
"internalHooks": [
|
|
29
|
-
"--gap"
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
21
|
{
|
|
33
22
|
"name": "alert",
|
|
34
23
|
"source": "src/css/components/alert.css",
|
|
@@ -196,7 +185,6 @@
|
|
|
196
185
|
"--btn-bg",
|
|
197
186
|
"--btn-fg",
|
|
198
187
|
"--btn-border",
|
|
199
|
-
"--btn-default-hover-bg",
|
|
200
188
|
"--btn-border-block-end-color",
|
|
201
189
|
"--btn-border-block-end-width",
|
|
202
190
|
"--btn-border-block",
|
|
@@ -295,6 +283,7 @@
|
|
|
295
283
|
"internalHooks": [
|
|
296
284
|
"--drawer-closed-translate",
|
|
297
285
|
"--drawer-focus-bleed",
|
|
286
|
+
"--drawer-close-reserve",
|
|
298
287
|
"--drawer-motion-duration"
|
|
299
288
|
],
|
|
300
289
|
"states": [
|
|
@@ -460,24 +449,24 @@
|
|
|
460
449
|
"source": "src/css/components/modal.css",
|
|
461
450
|
"cssImport": "actual-css/css/components/modal",
|
|
462
451
|
"classes": [
|
|
463
|
-
"dialog-confirmation",
|
|
464
452
|
"dialog-icon",
|
|
465
453
|
"had-scrollbar",
|
|
466
454
|
"has-modal-open",
|
|
467
455
|
"is-static",
|
|
456
|
+
"media",
|
|
468
457
|
"modal",
|
|
469
458
|
"scrollable"
|
|
470
459
|
],
|
|
471
460
|
"publicHooks": [
|
|
472
461
|
"--modal-size",
|
|
473
462
|
"--modal-pad",
|
|
474
|
-
"--modal-header-bg",
|
|
475
463
|
"--dialog-viewport-gap",
|
|
476
464
|
"--dialog-icon-size",
|
|
477
465
|
"--dialog-icon-glyph-size"
|
|
478
466
|
],
|
|
479
467
|
"internalHooks": [
|
|
480
468
|
"--dialog-inner-radius",
|
|
469
|
+
"--dialog-close-reserve",
|
|
481
470
|
"--dialog-focus-bleed",
|
|
482
471
|
"--dialog-viewport-block",
|
|
483
472
|
"--dialog-viewport-gap-default",
|
|
@@ -495,8 +484,7 @@
|
|
|
495
484
|
"nav-link",
|
|
496
485
|
"nav-list",
|
|
497
486
|
"navbar",
|
|
498
|
-
"navbar-brand"
|
|
499
|
-
"navbar-nav"
|
|
487
|
+
"navbar-brand"
|
|
500
488
|
],
|
|
501
489
|
"internalHooks": [
|
|
502
490
|
"--gap"
|