actual-css 0.13.0 → 0.14.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 +53 -0
- package/README.md +4 -4
- package/components.json +116 -10
- package/dist/actual.full.css +648 -77
- package/dist/actual.full.js +1 -1
- package/dist/actual.full.min.css +1 -1
- package/docs/navigation.json +2 -0
- package/docs/pages/components/alert.md +12 -2
- package/docs/pages/components/button.md +3 -2
- package/docs/pages/components/list.md +6 -3
- package/docs/pages/components/segmented.md +83 -0
- package/docs/pages/components/steps.md +4 -2
- package/docs/pages/enhancements/flyout.md +5 -0
- package/docs/pages/enhancements/tabs.md +7 -2
- package/docs/pages/examples/overview.md +3 -1
- package/docs/pages/forms/color-swatches.md +131 -0
- package/docs/pages/forms/combobox.md +2 -2
- package/docs/pages/forms/controls.md +6 -3
- package/docs/pages/forms/joined-controls.md +6 -2
- package/docs/pages/forms/overview.md +1 -0
- package/docs/pages/forms/switch.md +4 -2
- package/docs/pages/foundations/theming.md +1 -1
- package/docs/pages/foundations/tokens.md +54 -23
- package/docs/pages/guides/design-tools.md +13 -7
- package/docs/pages/guides/introduction.md +1 -1
- package/docs/pages/layout/scroll-snap.md +4 -2
- package/package.json +2 -2
- package/reserved-classes.json +3 -0
- package/src/cli/actual-css.js +3 -3
- package/src/css/components/alert.css +65 -14
- package/src/css/components/app-nav.css +17 -9
- package/src/css/components/badge.css +23 -9
- package/src/css/components/button.css +17 -2
- package/src/css/components/close.css +6 -3
- package/src/css/components/index.css +1 -0
- package/src/css/components/list.css +18 -3
- package/src/css/components/navbar.css +5 -2
- package/src/css/components/segmented.css +186 -0
- package/src/css/components/steps.css +6 -3
- package/src/css/components/tab.css +1 -1
- package/src/css/core/focus.css +3 -0
- package/src/css/core/tokens.css +20 -4
- package/src/css/core/variants.css +16 -5
- package/src/css/forms/color-swatch.css +159 -0
- package/src/css/forms/form-actions.css +9 -0
- package/src/css/forms/index.css +1 -0
- package/src/css/forms/native.css +50 -20
- package/src/css/forms/switch.css +5 -2
- package/src/css/layout/scroll-snap.css +30 -0
- package/src/css/layout/topbar.css +10 -0
- package/src/js/focus.js +16 -1
- package/src/js/surface.js +10 -0
- package/src/tooling/color.js +14 -1
- package/src/tooling/css-bundle.js +0 -5
- package/src/tooling/design-components.js +9 -5
- package/src/tooling/design-export.js +8 -0
- package/src/tooling/design-tokens.js +163 -43
- package/src/tooling/theme-contrast.js +151 -22
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,59 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.14.0] - 2026-10-13
|
|
6
|
+
### Breaking changes
|
|
7
|
+
|
|
8
|
+
- `--soft-border-mix` has no default: read it as `var(--soft-border-mix, 100%)` for the soft tint or `var(--soft-border-mix, 65%)` for the opaque `.soft` mix.
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `.color-swatch`: palette color on a native radio or checkbox, or a `<button>` opening a palette flyout, with `--color-swatch-value`, `--color-swatch-size` and `--color-swatch-radius`.
|
|
13
|
+
- `.segmented` / `.segment`: segmented control for radios, a `role="tablist"` or navigation links, with `--segmented-bg`, `--segmented-pad`, `--segmented-radius`, `--segmented-fg`, `--segmented-selected-bg` and `--segmented-selected-border`.
|
|
14
|
+
- `demo/templates/order-management.html`: one state at three levels — a badge in a selectable list, a contextual alert, and a notification with its own action — plus a critical alert, with no new framework API.
|
|
15
|
+
- `prefers-reduced-transparency: reduce` paints `.topbar` and `.form-actions.sticky` opaque without backdrop blur.
|
|
16
|
+
- The glass demo theme switches to opaque surfaces and drops its blur under `prefers-reduced-transparency: reduce`.
|
|
17
|
+
- `shot:states` accepts a `transparency` state.
|
|
18
|
+
- `--switch-knob-inline-size` sets the switch knob width for a capsule knob; the travel follows it.
|
|
19
|
+
- `demo/templates/settings-ios.html`: iOS-like controls and grouped settings from unchanged markup, with the local CSS each gap needs.
|
|
20
|
+
- `admin-neutral` demo theme: light-only business interface with a grey page, white cards, neutral actions and flat semantic tints.
|
|
21
|
+
- `--state-selected-text`: selected ink on a regular surface (current `.nav-link`, selected `.tab`, current step number and ring), falling back to `--state-selected`.
|
|
22
|
+
- `actual-css contrast` measures selected ink on each surface and the solid `-fg` pairs; a gradient fill reads n/a.
|
|
23
|
+
- `components.json`: `pseudoElements` lists the `::before`/`::after` each component generates, keyed by the element that owns them (`.nav-link`, `.accordion summary`).
|
|
24
|
+
- `actual-css design` writes a portable `dtcg/` token profile beside `figma/` and `penpot/`, with spec `$types` (`fontWeight`, `fontFamily`, `duration`, `cubicBezier`, `number`) and the font stacks, line heights and motion `figma/` drops.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- `.color` shows a round swatch the height of a `.switch` on a control-sized hit area, with the focus ring on the swatch; `--color-size` sets it.
|
|
29
|
+
- A flyout no longer closes when the arrow keys or Space move through a radio group inside it.
|
|
30
|
+
- Opening a flyout from the keyboard focuses a radio group at its checked radio, not its first one.
|
|
31
|
+
- `.list-item` moves its trailing region to a new line when it no longer fits beside the longest word, instead of breaking `.list-item-title` mid-word.
|
|
32
|
+
- `.truncate` inside `.list-item-content` keeps the trailing region on its line.
|
|
33
|
+
- `actual-css design` writes DTCG colors with a 6-digit `hex` and `alpha` separate; Penpot still receives the alpha in its hex.
|
|
34
|
+
- `.scroll-snap` keeps a focused item's ring inside its own clip on all four sides.
|
|
35
|
+
- `.alert.compact` and `.alert.spacious` step `--alert-pad-block`.
|
|
36
|
+
- `.close` stays visible in forced colors on a light-on-dark ink such as a `.solid` admonition title.
|
|
37
|
+
- `.app-nav` frames the current tile in forced colors with a transparent border on a `::before` overlay, so selecting a tile never shifts its icon or label and no `Highlight` repaint is needed.
|
|
38
|
+
- `--state-selected-text` resets on every theme boundary, so a nested theme island reads its own `--state-selected` instead of inheriting the parent's selected ink.
|
|
39
|
+
- Demo themes clear 4.5:1 on their solid pairs: bootstrap-v6 primary, success and danger; spruce and petrol warning; petrol secondary; edge warning; brutalist secondary and danger.
|
|
40
|
+
- Demo themes set `--state-selected-text` where the primary cannot be both fill and page text: bootstrap-v6, brutalist, cyberpunk, gradient, ocean, square, sunset.
|
|
41
|
+
- bootstrap-v6 filled badges keep their fill on hover.
|
|
42
|
+
- The edge demo theme's default button reads its intent through `--soft-fg-mix`.
|
|
43
|
+
- The glass demo theme keeps the default `--soft-bg-mix` and sets `--soft-border-mix: 70%`, so soft tints show their intent.
|
|
44
|
+
- `.alert.admonition` title bar follows `.solid`, `.surface` and `.outline`; `.solid` previously left white ink on the soft tint.
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- `admin-neutral` uses emerald success fills with white solid ink, amber warning fills with dark ink, lighter neutral badges and white admonition bodies with neutral frames.
|
|
49
|
+
- `demo/templates/order-management.html` softens the address notice, makes New order secondary and tightens the Orders header.
|
|
50
|
+
- `demo/templates/order-management.html` pins `admin-neutral` and adds an Orders-list composition beside the existing three-level narrative.
|
|
51
|
+
- `.alert.admonition` `.alert-title` is semibold.
|
|
52
|
+
- `.alert.admonition.solid` frames its body with the neutral `--border` instead of the intent.
|
|
53
|
+
- `.badge`, `.alert` and `.btn.soft` paint a translucent intent tint with no rim; the shared `.soft` on `.card`, `.navbar`, `.app-nav` and `.chat-bubble` stays an opaque mix.
|
|
54
|
+
- `--soft-hover-alpha` defaults to `6%`.
|
|
55
|
+
- `actual-css contrast` measures soft pairs composited on `--surface`, `--surface-raised` and `--surface-subtle`.
|
|
56
|
+
- Demo themes retune `--soft-fg-mix` (bootstrap-v6, corporate, cyberpunk, dim, edge, gradient, indigo, lavender, material, square) and `--soft-hover-alpha` (lavender, neon) for the soft tint.
|
|
57
|
+
|
|
5
58
|
## [0.13.0] - 2026-10-06
|
|
6
59
|
### Breaking changes
|
|
7
60
|
|
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ size is not worth optimizing:
|
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
```html
|
|
67
|
-
<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.14/dist/actual.full.min.css">
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
## Usage
|
|
@@ -137,7 +137,7 @@ registries:
|
|
|
137
137
|
* **Full runtime, zero-config** — every built-in enhancer, compiled:
|
|
138
138
|
|
|
139
139
|
```html
|
|
140
|
-
<script src="https://cdn.jsdelivr.net/npm/actual-css@0.
|
|
140
|
+
<script src="https://cdn.jsdelivr.net/npm/actual-css@0.14/dist/actual.full.js" type="module"></script>
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
* **Your own build** — copy the package's `src/js/full.js` as your entry,
|
|
@@ -179,8 +179,8 @@ Actual CSS is before 1.0:
|
|
|
179
179
|
* A patch release (`0.12.0` → `0.12.1`) keeps every class and hook. It fixes
|
|
180
180
|
bugs and may add hooks, so a fix can still move a rendering by a few pixels.
|
|
181
181
|
|
|
182
|
-
The floating `actual-css@0.
|
|
183
|
-
version (`actual-css@0.
|
|
182
|
+
The floating `actual-css@0.14` CDN path takes patches automatically. Pin the exact
|
|
183
|
+
version (`actual-css@0.14.0`) when the rendering must not change without a
|
|
184
184
|
review.
|
|
185
185
|
|
|
186
186
|
## Browser support
|
package/components.json
CHANGED
|
@@ -16,7 +16,12 @@
|
|
|
16
16
|
],
|
|
17
17
|
"states": [
|
|
18
18
|
"open"
|
|
19
|
-
]
|
|
19
|
+
],
|
|
20
|
+
"pseudoElements": {
|
|
21
|
+
".accordion summary": [
|
|
22
|
+
"::after"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
20
25
|
},
|
|
21
26
|
{
|
|
22
27
|
"name": "alert",
|
|
@@ -60,7 +65,12 @@
|
|
|
60
65
|
"states": [
|
|
61
66
|
"aria-current",
|
|
62
67
|
"aria-hidden"
|
|
63
|
-
]
|
|
68
|
+
],
|
|
69
|
+
"pseudoElements": {
|
|
70
|
+
".app-nav a": [
|
|
71
|
+
"::before"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
64
74
|
},
|
|
65
75
|
{
|
|
66
76
|
"name": "avatar",
|
|
@@ -87,7 +97,12 @@
|
|
|
87
97
|
"states": [
|
|
88
98
|
"aria-disabled",
|
|
89
99
|
"disabled"
|
|
90
|
-
]
|
|
100
|
+
],
|
|
101
|
+
"pseudoElements": {
|
|
102
|
+
".avatar": [
|
|
103
|
+
"::after"
|
|
104
|
+
]
|
|
105
|
+
}
|
|
91
106
|
},
|
|
92
107
|
{
|
|
93
108
|
"name": "badge",
|
|
@@ -143,7 +158,12 @@
|
|
|
143
158
|
],
|
|
144
159
|
"states": [
|
|
145
160
|
"aria-current"
|
|
146
|
-
]
|
|
161
|
+
],
|
|
162
|
+
"pseudoElements": {
|
|
163
|
+
".breadcrumb li": [
|
|
164
|
+
"::before"
|
|
165
|
+
]
|
|
166
|
+
}
|
|
147
167
|
},
|
|
148
168
|
{
|
|
149
169
|
"name": "busy",
|
|
@@ -157,7 +177,12 @@
|
|
|
157
177
|
],
|
|
158
178
|
"states": [
|
|
159
179
|
"aria-busy"
|
|
160
|
-
]
|
|
180
|
+
],
|
|
181
|
+
"pseudoElements": {
|
|
182
|
+
"[aria-busy]": [
|
|
183
|
+
"::before"
|
|
184
|
+
]
|
|
185
|
+
}
|
|
161
186
|
},
|
|
162
187
|
{
|
|
163
188
|
"name": "button",
|
|
@@ -257,7 +282,12 @@
|
|
|
257
282
|
"--close-color",
|
|
258
283
|
"--close-hover-color",
|
|
259
284
|
"--close-hover-overlay"
|
|
260
|
-
]
|
|
285
|
+
],
|
|
286
|
+
"pseudoElements": {
|
|
287
|
+
".close": [
|
|
288
|
+
"::before"
|
|
289
|
+
]
|
|
290
|
+
}
|
|
261
291
|
},
|
|
262
292
|
{
|
|
263
293
|
"name": "data-list",
|
|
@@ -308,7 +338,13 @@
|
|
|
308
338
|
],
|
|
309
339
|
"states": [
|
|
310
340
|
"open"
|
|
311
|
-
]
|
|
341
|
+
],
|
|
342
|
+
"pseudoElements": {
|
|
343
|
+
".fab summary": [
|
|
344
|
+
"::after",
|
|
345
|
+
"::before"
|
|
346
|
+
]
|
|
347
|
+
}
|
|
312
348
|
},
|
|
313
349
|
{
|
|
314
350
|
"name": "flyout",
|
|
@@ -406,7 +442,12 @@
|
|
|
406
442
|
],
|
|
407
443
|
"states": [
|
|
408
444
|
"aria-current"
|
|
409
|
-
]
|
|
445
|
+
],
|
|
446
|
+
"pseudoElements": {
|
|
447
|
+
".list-item": [
|
|
448
|
+
"::before"
|
|
449
|
+
]
|
|
450
|
+
}
|
|
410
451
|
},
|
|
411
452
|
{
|
|
412
453
|
"name": "menu",
|
|
@@ -430,6 +471,11 @@
|
|
|
430
471
|
"aria-disabled",
|
|
431
472
|
"disabled"
|
|
432
473
|
],
|
|
474
|
+
"pseudoElements": {
|
|
475
|
+
".menu-item": [
|
|
476
|
+
"::before"
|
|
477
|
+
]
|
|
478
|
+
},
|
|
433
479
|
"jsImport": "actual-css/js/menu"
|
|
434
480
|
},
|
|
435
481
|
{
|
|
@@ -487,12 +533,20 @@
|
|
|
487
533
|
"navbar",
|
|
488
534
|
"navbar-brand"
|
|
489
535
|
],
|
|
536
|
+
"publicHooks": [
|
|
537
|
+
"--state-selected-text"
|
|
538
|
+
],
|
|
490
539
|
"internalHooks": [
|
|
491
540
|
"--gap"
|
|
492
541
|
],
|
|
493
542
|
"states": [
|
|
494
543
|
"aria-current"
|
|
495
|
-
]
|
|
544
|
+
],
|
|
545
|
+
"pseudoElements": {
|
|
546
|
+
".nav-link": [
|
|
547
|
+
"::before"
|
|
548
|
+
]
|
|
549
|
+
}
|
|
496
550
|
},
|
|
497
551
|
{
|
|
498
552
|
"name": "pagination",
|
|
@@ -555,6 +609,30 @@
|
|
|
555
609
|
"scrollspy"
|
|
556
610
|
]
|
|
557
611
|
},
|
|
612
|
+
{
|
|
613
|
+
"name": "segmented",
|
|
614
|
+
"source": "src/css/components/segmented.css",
|
|
615
|
+
"cssImport": "actual-css/css/components/segmented",
|
|
616
|
+
"classes": [
|
|
617
|
+
"segment",
|
|
618
|
+
"segmented"
|
|
619
|
+
],
|
|
620
|
+
"publicHooks": [
|
|
621
|
+
"--segmented-bg",
|
|
622
|
+
"--segmented-pad",
|
|
623
|
+
"--segmented-radius",
|
|
624
|
+
"--segmented-fg",
|
|
625
|
+
"--segmented-selected-bg",
|
|
626
|
+
"--segmented-selected-border"
|
|
627
|
+
],
|
|
628
|
+
"states": [
|
|
629
|
+
"aria-current",
|
|
630
|
+
"aria-disabled",
|
|
631
|
+
"aria-selected",
|
|
632
|
+
"checked",
|
|
633
|
+
"disabled"
|
|
634
|
+
]
|
|
635
|
+
},
|
|
558
636
|
{
|
|
559
637
|
"name": "skeleton",
|
|
560
638
|
"source": "src/css/components/skeleton.css",
|
|
@@ -627,7 +705,25 @@
|
|
|
627
705
|
],
|
|
628
706
|
"states": [
|
|
629
707
|
"aria-current"
|
|
630
|
-
]
|
|
708
|
+
],
|
|
709
|
+
"pseudoElements": {
|
|
710
|
+
".step-complete": [
|
|
711
|
+
"::before"
|
|
712
|
+
],
|
|
713
|
+
".steps [aria-current]": [
|
|
714
|
+
"::before"
|
|
715
|
+
],
|
|
716
|
+
".steps li": [
|
|
717
|
+
"::after",
|
|
718
|
+
"::before"
|
|
719
|
+
],
|
|
720
|
+
".steps-horizontal li": [
|
|
721
|
+
"::after"
|
|
722
|
+
],
|
|
723
|
+
".steps-vertical li": [
|
|
724
|
+
"::after"
|
|
725
|
+
]
|
|
726
|
+
}
|
|
631
727
|
},
|
|
632
728
|
{
|
|
633
729
|
"name": "tab",
|
|
@@ -652,6 +748,11 @@
|
|
|
652
748
|
"aria-selected",
|
|
653
749
|
"disabled"
|
|
654
750
|
],
|
|
751
|
+
"pseudoElements": {
|
|
752
|
+
".tab": [
|
|
753
|
+
"::after"
|
|
754
|
+
]
|
|
755
|
+
},
|
|
655
756
|
"jsImport": "actual-css/js/tab",
|
|
656
757
|
"enhancements": [
|
|
657
758
|
"tabs"
|
|
@@ -690,6 +791,11 @@
|
|
|
690
791
|
"hidden",
|
|
691
792
|
"popover-open"
|
|
692
793
|
],
|
|
794
|
+
"pseudoElements": {
|
|
795
|
+
".tooltip": [
|
|
796
|
+
"::before"
|
|
797
|
+
]
|
|
798
|
+
},
|
|
693
799
|
"jsImport": "actual-css/js/tooltip"
|
|
694
800
|
}
|
|
695
801
|
]
|