actual-css 0.17.0 → 0.17.1

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 (73) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/actual.full.css +82 -22
  3. package/dist/actual.full.min.css +1 -1
  4. package/docs/navigation.json +3 -2
  5. package/docs/pages/components/accordion.md +8 -0
  6. package/docs/pages/components/alert.md +7 -5
  7. package/docs/pages/components/app-navigation.md +2 -2
  8. package/docs/pages/components/aura.md +2 -2
  9. package/docs/pages/components/badge.md +4 -3
  10. package/docs/pages/components/card.md +1 -1
  11. package/docs/pages/components/chat.md +2 -2
  12. package/docs/pages/components/fab.md +2 -1
  13. package/docs/pages/components/list.md +1 -1
  14. package/docs/pages/components/meter.md +1 -1
  15. package/docs/pages/components/navbar.md +1 -1
  16. package/docs/pages/components/overview.md +17 -0
  17. package/docs/pages/components/shimmer.md +2 -2
  18. package/docs/pages/enhancements/overview.md +2 -2
  19. package/docs/pages/enhancements/status-bar.md +1 -1
  20. package/docs/pages/forms/ajax.md +1 -1
  21. package/docs/pages/forms/choice-cards.md +1 -1
  22. package/docs/pages/forms/detached-actions.md +1 -1
  23. package/docs/pages/forms/floating-field.md +5 -3
  24. package/docs/pages/forms/form-actions.md +1 -1
  25. package/docs/pages/forms/input-policy.md +1 -1
  26. package/docs/pages/forms/joined-controls.md +1 -1
  27. package/docs/pages/forms/otp.md +2 -2
  28. package/docs/pages/forms/password.md +1 -1
  29. package/docs/pages/forms/states-and-sizes.md +1 -1
  30. package/docs/pages/forms/sticky-actions.md +1 -1
  31. package/docs/pages/forms/unsaved-changes.md +1 -1
  32. package/docs/pages/foundations/theming.md +2 -2
  33. package/docs/pages/foundations/tokens.md +29 -4
  34. package/docs/pages/foundations/typography.md +1 -1
  35. package/docs/pages/guides/progressive-enhancement.md +1 -1
  36. package/docs/pages/layout/app-layout.md +1 -1
  37. package/docs/pages/layout/app-shell.md +1 -1
  38. package/docs/pages/layout/column-layout.md +1 -1
  39. package/docs/pages/layout/media.md +1 -1
  40. package/docs/pages/layout/overview.md +1 -1
  41. package/docs/pages/layout/scroll-snap.md +1 -1
  42. package/docs/pages/layout/scroll-target.md +1 -1
  43. package/docs/pages/layout/sidebar-layout.md +1 -1
  44. package/docs/pages/layout/sidebar-shell.md +1 -1
  45. package/docs/pages/patterns/code-block.md +1 -1
  46. package/docs/pages/patterns/exclusive-accordion.md +1 -1
  47. package/docs/pages/patterns/hierarchical-nav.md +1 -1
  48. package/docs/pages/patterns/icon-input.md +1 -1
  49. package/docs/pages/patterns/intent-nesting.md +1 -1
  50. package/docs/pages/patterns/navigation-list.md +2 -2
  51. package/docs/pages/patterns/overview.md +1 -1
  52. package/docs/pages/patterns/structured-lists.md +1 -1
  53. package/docs/pages/utilities/flex.md +1 -1
  54. package/docs/pages/utilities/links.md +1 -1
  55. package/docs/pages/utilities/list.md +1 -1
  56. package/docs/pages/utilities/shape.md +1 -1
  57. package/docs/pages/utilities/sizing-wrapping.md +1 -1
  58. package/docs/pages/utilities/spacing.md +1 -1
  59. package/docs/pages/utilities/text.md +1 -1
  60. package/package.json +1 -1
  61. package/src/cli/actual-css.js +4 -4
  62. package/src/css/components/accordion.css +10 -6
  63. package/src/css/components/alert.css +4 -0
  64. package/src/css/components/join.css +14 -0
  65. package/src/css/components/navbar.css +9 -6
  66. package/src/css/core/theme.css +20 -1
  67. package/src/css/core/tokens.css +4 -1
  68. package/src/css/forms/custom-select.css +10 -5
  69. package/src/css/forms/input-icon.css +5 -3
  70. package/src/css/typography/prose.css +6 -0
  71. package/src/tooling/design-tokens.js +1 -0
  72. package/src/tooling/theme-contrast.js +41 -2
  73. package/tokens.json +1 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,43 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.17.1] - 2026-11-08
6
+ ### Added
7
+ - Docs: a "Skip to content" link is the first tab stop on every page.
8
+ - Docs: search results link to the matching section, show their group, and say when nothing matched; a result on the current page closes the search.
9
+ - Docs: the homepage links to the Actual Blocks gallery under "Start building".
10
+ - Docs: collapsed sidebar groups stay collapsed for the session; the current page's group always opens.
11
+ - Docs: search matches `--hooks` and `.classes` as whole names.
12
+ - Docs: live color swatches on the Tokens page follow the selected scheme and theme.
13
+ - `actual-css contrast` and `report:theme-contrast` measure the resting edge of a field, checkbox and radio (3:1).
14
+ - Docs: a Components overview lists every component and pattern as a card; the Components destination opens on it.
15
+ - Docs: `<!--docs-index:<group>-->` in a page expands to a card per page of that group.
16
+ - `--border-control-mix` sets the ink share of `--border-control` (45%).
17
+ - `check:templates` rejects `@latest` and bare-major CDN URLs in demo and docs templates.
18
+
19
+ ### Changed
20
+ - `--border-control` derives from `--text` and `--surface`, reaching 3:1 on the default palette; it equals `--border` only without `color-mix()`.
21
+ - `.nav-link`: the current and hover fills are paler, 8% and 5% of the link's ink (were 18% and 10%), so a current row no longer reads as a pressed button.
22
+ - `.input-icon`: the text sits half a `--control-pad-x` from the icon instead of a full one, on both sides.
23
+ - `.join`: adjacent filled buttons (default, `.solid`, `.soft`) draw a hairline seam, so the group no longer reads as one button.
24
+ - `.alert.callout`: the leading corners take `--radius-sm`, so the flag stays a straight bar.
25
+ - `--line-height-relaxed` is 1.6 (was 1.75); `.lead` and `.text-lead` read tighter.
26
+ - `.prose`: `pre` and tables use `--line-height` instead of the prose reading leading.
27
+ - Docs: page titles use sentence case, and the Components navigation is alphabetical.
28
+ - Docs: tables span the content column; class reference tables reflow on phones.
29
+ - Docs: the homepage presents the named themes as demos of the theme contract and counts components instead of themes.
30
+ - `forest`, `sunset`, `ocean` themes: `--border-control-mix: 49%`, clearing 3.2:1 in light.
31
+ - `glass` theme: `--border-control-mix: 75%`, a light rim clearing 3:1 over the whole backdrop.
32
+ - Demo and docs templates load Tabler Icons `3.46.0` instead of `@latest` or `@3`.
33
+ - Docs: Badge recommends a photo or a single initial in default and `.sm` person chips; two-letter initials need `.lg`.
34
+ - Docs: the Aura, Chat, Floating action button, Shimmer, Floating labels and OTP pages open on their description, not their module note.
35
+
36
+ ### Fixed
37
+ - `.floating-field`: a `.select` keeps its label headroom under the `appearance: base-select` enhancement instead of drawing the label over the value.
38
+ - `.accordion.flush`: a `<ul>` or `<ol>` panel directly after `<summary>` keeps its marker gutter instead of hanging its bullets outside the panel.
39
+ - Docs: the homepage alerts use `danger` and `primary` (`error` and `info` do not exist) and drop `role="alert"`.
40
+ - Docs: `check:doc-classes` also checks the docs page templates.
41
+
5
42
  ## [0.17.0] - 2026-11-06
6
43
  ### Added
7
44
  - `demo/templates/changelog.html`: a release changelog composed from `.timeline`, with a meta column and a scroll-driven light on the rail.
@@ -86,7 +86,7 @@ select {
86
86
  --font-width: 100%;
87
87
  --line-height: 1.5;
88
88
  --line-height-tight: 1.25;
89
- --line-height-relaxed: 1.75;
89
+ --line-height-relaxed: 1.6;
90
90
  --font-weight-normal: 400;
91
91
  --font-weight-medium: 500;
92
92
  --font-weight-semibold: 600;
@@ -264,6 +264,9 @@ select {
264
264
  the hovered soft fill instead (theme.css); this mix is the fallback a
265
265
  theme without hooks falls back to. */
266
266
  --soft-fg-mix: 100%;
267
+ /* Control edge: the share of ink in --border-control (theme.css). Raise it
268
+ when a tinted or translucent surface pulls the edge under 3:1. */
269
+ --border-control-mix: 45%;
267
270
 
268
271
  /* Shared icon assets. Override these URLs when a strict CSP disallows data:. */
269
272
  --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238a8594' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
@@ -454,13 +457,32 @@ select {
454
457
  --surface-opaque: var(--surface);
455
458
  --surface-solid-fg: var(--surface);
456
459
  /* The edge that tells a control apart from the surface, where --border only
457
- separates surfaces: fields, choices, switch, OTP cells, choice cards. */
460
+ separates surfaces: fields, choices, switch, OTP cells, choice cards.
461
+ Derived from the ink: the default palette clears 3:1 against the surface
462
+ in both schemes (WCAG 1.4.11: an unchecked radio is identified by its edge
463
+ alone), where --border sat at ~1.3:1. The mix is not a guarantee for every
464
+ palette: a low-contrast ink lands under 3:1, which the contrast report
465
+ (control edge) shows. Mixed into the opaque surface so a translucent theme
466
+ still draws a solid edge. The plain fallback matters: without color-mix
467
+ the var() is invalid at computed time and takes the whole border
468
+ shorthand with it, erasing every field and choice outline. */
458
469
  --border-control: var(--border);
459
470
  /* Inherited resting field fill, shared with external control bridges.
460
471
  Component state rules still own readonly, disabled and invalid fills. */
461
472
  --control-default-bg: var(--surface);
462
473
  }
463
474
 
475
+ @supports (color: color-mix(in oklab, red, white)) {
476
+ :root,
477
+ [data-theme] {
478
+ --border-control: color-mix(
479
+ in oklab,
480
+ var(--text) var(--border-control-mix),
481
+ var(--surface-opaque)
482
+ );
483
+ }
484
+ }
485
+
464
486
  /* Soft foreground hooks — the soft ink is the intent rebated toward the local
465
487
  text so it keeps 4.5:1 against the soft hover fill (the resting fill carries
466
488
  the extra margin; variants.css soft recipe). Deliberately scoped to the
@@ -1145,6 +1167,9 @@ small {
1145
1167
 
1146
1168
  /* Overflow containment is global on `pre` (base.css); only the box is prose's. */
1147
1169
  .prose :where(pre) {
1170
+ /* why: code is scanned line by line, not read as running text; the prose
1171
+ reading leading spread a block to ~1.7 lines per line of code. */
1172
+ line-height: var(--line-height);
1148
1173
  padding: 1em;
1149
1174
  border: var(--border-width) solid var(--border);
1150
1175
  border-radius: var(--radius);
@@ -1174,6 +1199,9 @@ small {
1174
1199
  }
1175
1200
 
1176
1201
  .prose :where(table) {
1202
+ /* why: tables are scanned cell by cell, like code; the reading leading made
1203
+ every wrapped cell tall and loose. */
1204
+ line-height: var(--line-height);
1177
1205
  inline-size: 100%;
1178
1206
  border-collapse: collapse;
1179
1207
  }
@@ -3090,16 +3118,18 @@ small {
3090
3118
  block-size: 1em;
3091
3119
  }
3092
3120
 
3093
- /* Leading: input gets start padding to clear the icon */
3121
+ /* Leading: input gets start padding to clear the icon. The text sits half a
3122
+ pad from the icon: a full pad, the same as the icon's inset from the edge,
3123
+ read as two separate items rather than an icon labelling its field. */
3094
3124
  .input-icon > :first-child:where(:not(.input)) ~ .input {
3095
- padding-inline-start: calc(var(--control-pad-x) * 2 + var(--input-icon-size));
3125
+ padding-inline-start: calc(var(--control-pad-x) * 1.5 + var(--input-icon-size));
3096
3126
  }
3097
3127
 
3098
3128
  /* Trailing: the input has a following sibling → end padding. Not tied to the
3099
3129
  input being first child, so a leading icon does not disable the trailing
3100
3130
  icon's reserved space. */
3101
3131
  .input-icon > .input:where(:not(:last-child)) {
3102
- padding-inline-end: calc(var(--control-pad-x) * 2 + var(--input-icon-size));
3132
+ padding-inline-end: calc(var(--control-pad-x) * 1.5 + var(--input-icon-size));
3103
3133
  }
3104
3134
 
3105
3135
  /*
@@ -3922,14 +3952,19 @@ small {
3922
3952
  pointer: fine
3923
3953
  ) {
3924
3954
  @supports (appearance: base-select) {
3955
+ /* why: base-select brings a UA padding-block (0.25em) that the native
3956
+ select lacks; with a 24px line it pushed a .compact select to 34px
3957
+ against --control-size 32px. min-block-size and align-items already
3958
+ center the value. Zero specificity: the reset only has to beat the UA
3959
+ sheet, and at (0,3,0) it erased the headroom .floating-field reserves,
3960
+ so the floated label sat on the value. */
3961
+ :where(.select:not([multiple], .native, [size]:not([size="1"]))) {
3962
+ padding-block: 0;
3963
+ }
3964
+
3925
3965
  .select:not([multiple], .native, [size]:not([size="1"])) {
3926
3966
  appearance: base-select;
3927
3967
  align-items: center;
3928
- /* why: base-select brings a UA padding-block (0.25em) that the native
3929
- select lacks; with a 24px line it pushed a .compact select to 34px
3930
- against --control-size 32px. min-block-size and align-items already
3931
- center the value. */
3932
- padding-block: 0;
3933
3968
 
3934
3969
  &::picker(select) {
3935
3970
  appearance: base-select;
@@ -5146,6 +5181,10 @@ a.badge[aria-disabled="true"] {
5146
5181
  border: 0;
5147
5182
  border-inline-start: var(--alert-border-inline-start-width, 4px) solid
5148
5183
  var(--alert-border-inline-start-color, var(--intent, var(--neutral)));
5184
+ /* why: a thick flag under the large radius curves into a crescent. The
5185
+ leading corners take the small radius so the flag stays a straight bar. */
5186
+ border-start-start-radius: var(--radius-sm);
5187
+ border-end-start-radius: var(--radius-sm);
5149
5188
  }
5150
5189
 
5151
5190
  /* Admonition — structured static box with a tinted title bar and a body
@@ -6728,12 +6767,6 @@ picture.bleed > img {
6728
6767
  margin-block-start: 0;
6729
6768
  }
6730
6769
 
6731
- .accordion details > summary + ul,
6732
- .accordion details > summary + ol {
6733
- margin: 0;
6734
- padding-inline-start: 2rem;
6735
- }
6736
-
6737
6770
  /* Flush — the shell is dropped and only the shared item separators remain.
6738
6771
  Zero inline padding puts the group edge to edge inside the surface that
6739
6772
  already frames it, so no override is repeated per embedding. */
@@ -6754,6 +6787,16 @@ picture.bleed > img {
6754
6787
  --surface-pad: 0px;
6755
6788
  }
6756
6789
 
6790
+ /* A list panel keeps its marker gutter in every treatment. The .flush
6791
+ selector is required, not redundant: .flush zeroes the panel's inline
6792
+ padding at higher specificity, which would push the bullets out of the
6793
+ panel. */
6794
+ .accordion details > summary + :is(ul, ol),
6795
+ .accordion.flush details > summary + :is(ul, ol) {
6796
+ margin: 0;
6797
+ padding-inline-start: 2rem;
6798
+ }
6799
+
6757
6800
  /* Separated — each item owns a full card. The item's own border beats the
6758
6801
  shared details + details separator on specificity alone, so nothing needs
6759
6802
  undoing for the second item onwards. */
@@ -8816,20 +8859,23 @@ a.avatar[aria-disabled="true"] {
8816
8859
  color: var(--nav-current-fg, var(--text));
8817
8860
  }
8818
8861
 
8819
- /* Fills are a tint of the link's own ink, the .btn.ghost hover recipe, so they
8862
+ /* Fills are a tint of the link's own ink, like the .btn.ghost hover, so they
8820
8863
  read on light and dark bars alike, including a bar with its own
8821
8864
  --ui-bg/--ui-fg. Not --ui-hover-bg: that is the bar's own hover and can
8822
- equal its fill. Current is a step above hover (18% vs 10%), so the current
8823
- link stays apart while another is hovered. The baseline above keeps a
8824
- light chip where color-mix is missing. */
8865
+ equal its fill. Current is a step above hover (8% vs 5%), so the current
8866
+ link stays apart while another is hovered. Both stay paler than the ghost
8867
+ button: a nav row is wide, and at 18% a full-width current row read as a
8868
+ pressed button. The fill only seconds the ink step, so it needs no 3:1 of
8869
+ its own. The baseline above keeps a light chip where color-mix is
8870
+ missing. */
8825
8871
  @supports (color: color-mix(in oklch, red, white)) {
8826
8872
  .nav-link:hover {
8827
- background: color-mix(in oklch, currentColor 10%, transparent);
8873
+ background: color-mix(in oklch, currentColor 5%, transparent);
8828
8874
  color: var(--ui-fg, var(--text));
8829
8875
  }
8830
8876
 
8831
8877
  .nav-link:is([aria-current="page"], [aria-current="location"], [aria-current="true"]) {
8832
- background: var(--nav-current-bg, color-mix(in oklch, currentColor 18%, transparent));
8878
+ background: var(--nav-current-bg, color-mix(in oklch, currentColor 8%, transparent));
8833
8879
  color: var(--nav-current-fg, var(--ui-fg, var(--text)));
8834
8880
  }
8835
8881
  }
@@ -10149,6 +10195,20 @@ a.list-item:is([aria-current="page"], [aria-current="true"])::before {
10149
10195
  margin-inline-start: calc(var(--border-width) * -1);
10150
10196
  }
10151
10197
 
10198
+ /* Seam between adjacent filled buttons (default, .solid, .soft): their border
10199
+ is transparent, so "Left Middle Right" read as one button. A quarter of the
10200
+ ink turns that edge into a hairline; the mix keeps a soft rim set by
10201
+ --soft-border-mix. Variants that already draw an edge, or have no fill, keep
10202
+ their border untouched. Chained :not(): a list inside :not() is above
10203
+ the Firefox 78 floor. */
10204
+ .join > .btn + .btn:not(.outline):not(.surface):not(.ghost):not(.link) {
10205
+ border-inline-start-color: color-mix(
10206
+ in oklab,
10207
+ var(--btn-border-color, var(--btn-border)),
10208
+ var(--btn-fg) 25%
10209
+ );
10210
+ }
10211
+
10152
10212
  .join > :is(:hover, :focus, :focus-within) {
10153
10213
  z-index: 1;
10154
10214
  }