actual-css 0.19.4 → 0.20.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 +67 -0
- package/README.md +6 -6
- package/components.json +6 -3
- package/dist/actual.full.css +249 -50
- package/dist/actual.full.js +2 -2
- package/dist/actual.full.min.css +1 -1
- package/dist/types/menu.d.ts +2 -5
- package/docs/pages/components/accordion.md +11 -6
- package/docs/pages/components/alert.md +64 -62
- package/docs/pages/components/avatar.md +12 -12
- package/docs/pages/components/badge.md +15 -15
- package/docs/pages/components/breadcrumb.md +10 -8
- package/docs/pages/components/button.md +56 -7
- package/docs/pages/components/card.md +21 -21
- package/docs/pages/components/dialog.md +97 -69
- package/docs/pages/components/drawer.md +33 -33
- package/docs/pages/components/indicator.md +12 -12
- package/docs/pages/components/navbar.md +41 -9
- package/docs/pages/components/pagination.md +7 -7
- package/docs/pages/components/progress.md +18 -13
- package/docs/pages/components/rating.md +19 -19
- package/docs/pages/components/reveal.md +2 -0
- package/docs/pages/components/segmented.md +35 -31
- package/docs/pages/components/skeleton.md +10 -8
- package/docs/pages/components/spinner.md +21 -15
- package/docs/pages/components/table.md +26 -28
- package/docs/pages/enhancements/flyout.md +94 -43
- package/docs/pages/enhancements/in-view.md +3 -1
- package/docs/pages/enhancements/scrollspy.md +51 -18
- package/docs/pages/enhancements/tabs.md +43 -37
- package/docs/pages/enhancements/tooltip.md +4 -2
- package/docs/pages/forms/ajax.md +66 -0
- package/docs/pages/forms/choice-cards.md +8 -8
- package/docs/pages/forms/color-swatches.md +12 -12
- package/docs/pages/forms/form-actions.md +23 -0
- package/docs/pages/forms/joined-controls.md +8 -8
- package/docs/pages/forms/labels.md +11 -11
- package/docs/pages/forms/overview.md +35 -29
- package/docs/pages/forms/states-and-sizes.md +9 -9
- package/docs/pages/forms/switch.md +35 -2
- package/docs/pages/forms/validation.md +16 -16
- package/docs/pages/foundations/theming.md +32 -2
- package/docs/pages/foundations/tokens.md +18 -16
- package/docs/pages/guides/coding-agents.md +18 -0
- package/docs/pages/guides/introduction.md +1 -1
- package/llms.txt +3 -3
- package/package.json +5 -5
- package/reserved-classes.json +1 -0
- package/skills/actual-css/SKILL.md +7 -0
- package/src/cli/actual-css.js +3 -3
- package/src/css/components/badge.css +10 -6
- package/src/css/components/button.css +20 -7
- package/src/css/components/join.css +14 -4
- package/src/css/components/navbar.css +83 -1
- package/src/css/components/pagination.css +3 -1
- package/src/css/components/segmented.css +27 -7
- package/src/css/core/theme.css +11 -9
- package/src/css/core/tokens.css +7 -1
- package/src/css/core/variants.css +2 -0
- package/src/css/effects/reveal.css +15 -6
- package/src/css/forms/control.css +11 -1
- package/src/css/forms/form.css +14 -4
- package/src/css/forms/switch.css +32 -3
- package/src/js/ajax.js +18 -1
- package/src/js/context-menu.js +1 -3
- package/src/js/flyout.js +14 -5
- package/src/js/in-view.js +41 -30
- package/src/js/menu.js +9 -21
- package/src/js/surface.js +38 -0
- package/src/tooling/design-tokens.js +1 -0
- package/src/tooling/theme-contrast.js +24 -9
- package/tokens.json +1 -0
- package/docs/design-notes/accessibility-decisions.md +0 -63
- package/docs/design-notes/app-ui.md +0 -67
- package/docs/design-notes/architecture.md +0 -70
- package/docs/design-notes/browser-support.md +0 -239
- package/docs/design-notes/cascade-layer.md +0 -74
- package/docs/design-notes/column-layout.md +0 -260
- package/docs/design-notes/css-anchor.md +0 -87
- package/docs/design-notes/enhancement-contract.md +0 -193
- package/docs/design-notes/forced-colors.md +0 -123
- package/docs/design-notes/grid.md +0 -785
- package/docs/design-notes/motion-cost.md +0 -62
- package/docs/design-notes/naming.md +0 -71
- package/docs/design-notes/platform-alignment.md +0 -602
- package/docs/design-notes/popover-manual-poc.md +0 -328
- package/docs/design-notes/references.md +0 -336
- package/docs/design-notes/rich-text.md +0 -61
- package/docs/design-notes/spacing-units.md +0 -286
- package/docs/design-notes/steps.md +0 -776
- package/docs/design-notes/surface-reparenting.md +0 -130
- package/docs/design-notes/tokens.md +0 -166
- package/docs/design-notes/tooltip-coordinate-space.md +0 -130
- package/docs/design-notes/widget-primitives.md +0 -144
- package/docs/navigation.json +0 -176
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,73 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.20.0] - 2026-11-21
|
|
6
|
+
### Added
|
|
7
|
+
- `.nav-list.rail`: table-of-contents list on one rail; the current link is a band and the focus outline lands on it.
|
|
8
|
+
- Docs: Navbar · "Rail / table of contents" and a Scrollspy demo on a rail.
|
|
9
|
+
- `--control-default-border`: inherited resting edge of `.input`, `.textarea`, `.select` and `.join-addon`.
|
|
10
|
+
- Docs: Theming · "Lighter field borders" recipes (quiet sides or underline only, 3:1 lower edge).
|
|
11
|
+
- Dev: `scripts/playground/compare.html` renders the same cards in Actual CSS (from `src/`) beside Oat, daisyUI, Bootstrap, UIkit, Carbon and GOV.UK Frontend.
|
|
12
|
+
- Dev: the component bench renders the working tree under any demo theme (`&preset=`).
|
|
13
|
+
- Dev: the component bench adds field states (help, error, select), alerts and a button hierarchy, and links each card to its guide.
|
|
14
|
+
- Dev: `bun run report:composition` prints what a composed page pays in CSS and JS, optionally beside another library (`--ref`).
|
|
15
|
+
- Docs: Dialog · "Without JavaScript" lists what the native path covers and gives up.
|
|
16
|
+
- Design note: `composition-weight.md` records the weight audit and the reductions declined.
|
|
17
|
+
- Design note: `button-labels.md` records the button label settings compared and why 13/14/16px medium won.
|
|
18
|
+
- `corporate` and `minimal` demo themes keep button labels at the field text size, in medium and regular.
|
|
19
|
+
- `minimal` demo theme: one ink, hairlines, square corners, no elevation, built from tokens and inherited hooks.
|
|
20
|
+
- `--reveal-delay`: pause before a `.reveal` entrance or a `.reveal-group`'s first child; the stagger counts from it.
|
|
21
|
+
- Docs: Ajax · "Confirm, show errors, recover" composes the busy button, a confirmation, server errors and a failure message.
|
|
22
|
+
- Docs: Flyout · "Contextual help": a help button beside a label opens a panel with an explanation and a link.
|
|
23
|
+
- Docs: Button · usage for action labels, groups of two or three, icons after the label, and an equal-width decision pair on `.switcher`.
|
|
24
|
+
- Docs: Form actions · "Full-width submit" keeps a stretched button's label on the field text line.
|
|
25
|
+
- Dev: the component bench adds icons and long labels, a field beside an outline button, and an Actual-only size card.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- Docs: "Coding agents and DESIGN.md" gains "Components are tools, not design decisions".
|
|
29
|
+
- Starter skill: start from content and purpose before components; no invented content or purposeless decoration.
|
|
30
|
+
- `.badge` labels drop one step (`--font-size-xs`, `.lg` to `--font-size-sm`) and `--badge-pad-x` grows to half of `--badge-size`.
|
|
31
|
+
- `.field-label` is set in `--font-weight-medium`; a `.field-group` legend keeps semibold.
|
|
32
|
+
- An unchecked `.switch` is a filled `--border-control` pill instead of a ring around a `--border` track; still 3:1.
|
|
33
|
+
- `actual-css contrast` measures an unchecked switch on its stronger cue, track edge or knob.
|
|
34
|
+
- Docs: Switch · "A lighter resting switch" recipe moves the 3:1 cue to a dark knob.
|
|
35
|
+
- A disabled `.switch` keeps a quiet `--border` edge like a disabled `.check`, instead of a borderless track.
|
|
36
|
+
- `.field-label` and the `.field-group.flush` legend drop to 0.875 × `--control-font-size` (14px by default), still following `.sm`/`.lg`.
|
|
37
|
+
- A neutral `.btn.outline` draws `--border`; beside a field in a `.join` it keeps the field edge.
|
|
38
|
+
- Readonly and disabled text controls drop an inherited `--control-border-block-end-color`.
|
|
39
|
+
- Docs site table of contents and the Blog demo use `.nav-list.rail` instead of their own rail and scrollspy CSS.
|
|
40
|
+
- The selected `.segment` has no edge by default; `--segmented-selected-border` inherits from a theme root.
|
|
41
|
+
- `edge` demo theme redrawn after IBM Carbon: square, flat layers, filled fields with a 3:1 bottom line; its lower-edge buttons are gone.
|
|
42
|
+
- Docs: component, enhancement and form pages lead with their first demo; `check:docs` fails a section placed before it.
|
|
43
|
+
- `--soft-bg-mix` defaults to 92% (was 88%): soft alerts, badges, buttons and `.soft` surfaces take a lighter fill.
|
|
44
|
+
- The default palette's `--*-soft-fg` hooks keep the raw intent, rebated toward `--text` only as far as 4.5:1 on the hovered fill needs (0–12%, was 10–25%): soft ink reads livelier.
|
|
45
|
+
- `.btn` labels drop one type step below the field text (`--btn-font-size`: 14px; 13px in `.sm`, 16px in `.lg`), still medium.
|
|
46
|
+
- `--btn-font-size` is inherited and selected by `.sm`/`.lg`, so a button in `.join.sm` or `.field.sm` follows that size.
|
|
47
|
+
- `.btn.link` takes the surrounding text size; `.btn.icon-only` keeps its glyph at `--control-font-size`.
|
|
48
|
+
- `.pagination` sets its truncation ellipsis at `--btn-font-size`, the page numbers' size.
|
|
49
|
+
- `.btn` takes `line-height: 1.25` (was 1): a wrapped label no longer cramps its lines; a single-line button keeps its height.
|
|
50
|
+
- Docs: Dialog · the alert dialog's buttons name both outcomes, "Keep project" and "Delete project".
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
- An unchecked `.switch` knob takes `--surface-opaque` in a dark scheme: it no longer sinks into the track (1.47:1 → 3.6:1 on the default palette) and stays dark like the checked knob.
|
|
54
|
+
- The selected `.segment` rises above the `.segmented` track in a dark scheme instead of reading as a recess.
|
|
55
|
+
- An avatar status dot (`.avatar > .badge:empty`) keeps its ink edge in print, like every other `.badge`, instead of vanishing without background graphics.
|
|
56
|
+
- `in-view`: focus finishes a Reveal entrance still running or delayed after its release, not only a pending one.
|
|
57
|
+
- `ajax`: focus lost with a replaced target lands on the answer's first `aria-invalid="true"` field, else its `autofocus` element, instead of the body.
|
|
58
|
+
- Flyouts and context menus close when focus moves outside them and their triggers, without moving focus; `data-flyout-auto-close="false"` keeps them open.
|
|
59
|
+
- Tab out of an action menu goes to the next stop instead of bouncing through the trigger, so Shift+Tab no longer skips it.
|
|
60
|
+
- Tab on a second trigger of an open flyout moves on instead of re-entering the panel, which looped between them.
|
|
61
|
+
- Docs: Validation · "Server and AJAX validation" pointed to a `form[data-ajax]` flow that does not exist.
|
|
62
|
+
- Docs: Reveal · a reveal that holds controls takes `data-enhance="in-view"`; `.reveal` alone does not guard focus.
|
|
63
|
+
|
|
64
|
+
## [0.19.5] - 2026-11-20
|
|
65
|
+
### Fixed
|
|
66
|
+
- An unchecked `.switch` takes `--border-control` as its resting edge again, so it reaches 3:1 against the surface (1.35:1 since 0.19.0 on the default light palette). Checked and disabled tracks keep their uniform fill; validation still overrides the edge.
|
|
67
|
+
- `actual-css contrast` measures the resting edge of an unchecked switch with the field, checkbox and radio.
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
70
|
+
- The npm package no longer ships `docs/design-notes/`; README and `llms.txt` link to them on GitHub.
|
|
71
|
+
|
|
5
72
|
## [0.19.4] - 2026-11-20
|
|
6
73
|
### Fixed
|
|
7
74
|
- Dialogs opened from a flyout return focus to its opener when the command is no longer focusable.
|
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ size is not worth optimizing:
|
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
```html
|
|
70
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/actual-css@0.
|
|
70
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/actual-css@0.20/dist/actual.full.min.css">
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
## Usage
|
|
@@ -138,7 +138,7 @@ for the full map of module names to import paths.
|
|
|
138
138
|
|
|
139
139
|
Some components can be enhanced with JavaScript: dialog/drawer, flyout, tooltip, tabs, scrollspy, context menu, floating UI, opt-in `data-filter` input filtering, input masks, and the one-shot `in-view` trigger behind `.reveal` and `.mark-sweep`.
|
|
140
140
|
|
|
141
|
-
Presentation (`class`) and behaviour (`data-enhance`) are separate layers — import any primitive independently to build custom widgets. See [enhancement contract](docs/design-notes/enhancement-contract.md) and [widget primitives](docs/design-notes/widget-primitives.md).
|
|
141
|
+
Presentation (`class`) and behaviour (`data-enhance`) are separate layers — import any primitive independently to build custom widgets. See [enhancement contract](https://github.com/lekoala/actual-css/blob/master/docs/design-notes/enhancement-contract.md) and [widget primitives](https://github.com/lekoala/actual-css/blob/master/docs/design-notes/widget-primitives.md).
|
|
142
142
|
|
|
143
143
|
Two ways to load it — pick one, never both, since each copy owns its own
|
|
144
144
|
registries:
|
|
@@ -146,7 +146,7 @@ registries:
|
|
|
146
146
|
* **Full runtime, zero-config** — every built-in enhancer, compiled:
|
|
147
147
|
|
|
148
148
|
```html
|
|
149
|
-
<script src="https://cdn.jsdelivr.net/npm/actual-css@0.
|
|
149
|
+
<script src="https://cdn.jsdelivr.net/npm/actual-css@0.20/dist/actual.full.js" type="module"></script>
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
* **Your own build** — copy the package's `src/js/full.js` as your entry,
|
|
@@ -188,8 +188,8 @@ Actual CSS is before 1.0:
|
|
|
188
188
|
* A patch release (`0.12.0` → `0.12.1`) keeps every class and hook. It fixes
|
|
189
189
|
bugs and may add hooks, so a fix can still move a rendering by a few pixels.
|
|
190
190
|
|
|
191
|
-
The floating `actual-css@0.
|
|
192
|
-
version (`actual-css@0.
|
|
191
|
+
The floating `actual-css@0.20` CDN path takes patches automatically. Pin the exact
|
|
192
|
+
version (`actual-css@0.20.0`) when the rendering must not change without a
|
|
193
193
|
review.
|
|
194
194
|
|
|
195
195
|
## Browser support
|
|
@@ -215,7 +215,7 @@ behavior is not tested or preserved.
|
|
|
215
215
|
|
|
216
216
|
## Cascade layers
|
|
217
217
|
|
|
218
|
-
Actual CSS is layer-compatible, not layer-dependent. The default `actual.css` file is unlayered. See [
|
|
218
|
+
Actual CSS is layer-compatible, not layer-dependent. The default `actual.css` file is unlayered. See [Cascade layer strategy](https://github.com/lekoala/actual-css/blob/master/docs/design-notes/cascade-layer.md) for details.
|
|
219
219
|
|
|
220
220
|
## AI Disclosure
|
|
221
221
|
|
package/components.json
CHANGED
|
@@ -575,7 +575,8 @@
|
|
|
575
575
|
"nav-link",
|
|
576
576
|
"nav-list",
|
|
577
577
|
"navbar",
|
|
578
|
-
"navbar-brand"
|
|
578
|
+
"navbar-brand",
|
|
579
|
+
"rail"
|
|
579
580
|
],
|
|
580
581
|
"publicHooks": [
|
|
581
582
|
"--nav-current-bg",
|
|
@@ -585,11 +586,13 @@
|
|
|
585
586
|
],
|
|
586
587
|
"internalHooks": [
|
|
587
588
|
"--gap",
|
|
588
|
-
"--nav-list-rail-inset"
|
|
589
|
+
"--nav-list-rail-inset",
|
|
590
|
+
"--nav-list-rail-width"
|
|
589
591
|
],
|
|
590
592
|
"states": [
|
|
591
593
|
"aria-current",
|
|
592
|
-
"open"
|
|
594
|
+
"open",
|
|
595
|
+
"target"
|
|
593
596
|
],
|
|
594
597
|
"pseudoElements": {
|
|
595
598
|
".nav-link": [
|