@fusion.dev/helix-docs 0.236.0 → 0.237.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.
@@ -43,10 +43,12 @@ not yet checked whether VoiceOver still reads the name.
43
43
  | Popover API | Every overlay: menu, tooltip, select, combobox, dialog |
44
44
  | `light-dark()` | Every color token, and each component color that differs between the modes |
45
45
  | `oklch()` | Every color in the system |
46
+ | Relative colors, `oklch(from ...)` | The brand and accent ramps, the strong and subtle tones, and a few chart marks |
46
47
  | `:has()` | Relational styling, mostly of slotted content |
47
48
  | `@starting-style` | Entry transitions on overlays |
48
49
  | `:state()` | Every boolean state the library publishes: `open`, `checked`, `selected`, `invalid`, `read`, `has-label`, `settled`, `empty`, `controls` |
49
50
  | `CSS.highlights` | Filter-match highlighting, in `Command` and `Combobox` |
51
+ | Scroll-driven animations | The edge fade on a strip or table with more to scroll |
50
52
 
51
53
  Positioning uses `@floating-ui/dom`. We chose this on purpose, and it is the one
52
54
  place Helix takes a dependency for something the browser could do. CSS anchor
@@ -55,20 +57,24 @@ features.
55
57
 
56
58
  ## Which features set the minimum browser
57
59
 
58
- **Check for `light-dark()` and the Popover API.** They are the newest features
59
- Helix requires, and everything else in the table has been available longer.
60
- Helix depends on both. Every token uses `light-dark()` to set both color modes
61
- in one declaration. Every overlay uses the Popover API to draw in the top layer.
60
+ **Check for `light-dark()`, relative colors, and the Popover API.** They are
61
+ the newest features Helix requires. Every token uses `light-dark()` to set both
62
+ color modes in one declaration. The brand and accent ramps are computed from
63
+ your seed colors with `oklch(from ...)`. Every overlay uses the Popover API to
64
+ draw in the top layer.
62
65
 
63
- Neither one has a useful fallback:
66
+ None of them has a useful fallback:
64
67
 
65
68
  - A browser without `light-dark()` shows no color at all.
69
+ - A browser without relative colors draws no primary or accent color.
66
70
  - A browser without the Popover API renders overlays in the page flow.
67
71
 
72
+ The first versions with all three are Chromium 123, Safari 18, and Firefox 128.
73
+
68
74
  For that reason, this page has no support table with a fallback column. Helix
69
75
  has no partial mode.
70
76
 
71
- Chromium 132 has both features. We measured on September 15, 2026 that it
77
+ Chromium 132 has all three. We measured on September 15, 2026 that it
72
78
  does not support two things your stylesheet can do through `::part()`:
73
79
 
74
80
  - It ignores a range input's `::-webkit-slider-thumb` and
@@ -78,21 +84,65 @@ does not support two things your stylesheet can do through `::part()`:
78
84
 
79
85
  The headless examples use neither.
80
86
 
81
- `:state()` is the third newest feature. It does not set the minimum browser,
87
+ `:state()` is the next newest feature. It does not set the minimum browser,
82
88
  because components still work without it. A component that cannot record a
83
89
  state keeps the look of its resting rule, so a checkbox is drawn unchecked.
84
90
  Helix tests for `:state()` support in the one place that records states.
85
91
 
92
+ ## Bundlers that rewrite `light-dark()`
93
+
94
+ **Set your bundler's CSS targets to browsers that have `light-dark()`.** Some
95
+ bundlers minify CSS for older browsers by default, and rewrite each
96
+ `light-dark()` into a fallback that resolves on the root element. The page
97
+ still switches between modes. A Toast, which takes the mode opposite the page,
98
+ and an element with its own `data-color-mode` both draw in the page's mode. A
99
+ development server does not minify CSS, so only a production build shows this.
100
+
101
+ We measured on November 3, 2026:
102
+
103
+ - Vite 8 targets Safari 16.4 by default and minifies with Lightning CSS, which
104
+ rewrites every `light-dark()` call in `helix.css`. A Toast on a white page
105
+ drew white.
106
+ - Next.js 16 targets Safari 16.4 by default, and Turbopack processes CSS with
107
+ Lightning CSS.
108
+ - Bun 1.4 rewrites `light-dark()` when it bundles CSS, and has no setting for
109
+ the browsers it targets. Serve the Helix stylesheets as files, as
110
+ [Without a bundler](./without-a-bundler) shows.
111
+ - Angular builds CSS with esbuild, which leaves `light-dark()` as written.
112
+
113
+ The Helix templates set these targets. In Vite, set `build.cssTarget`:
114
+
115
+ ```ts
116
+ import { defineConfig } from 'vite'
117
+
118
+ export default defineConfig({
119
+ build: { cssTarget: ['chrome123', 'edge123', 'firefox128', 'safari18', 'ios18'] },
120
+ })
121
+ ```
122
+
123
+ In Next.js, add `browserslist` to `package.json`:
124
+
125
+ ```json
126
+ {
127
+ "browserslist": ["chrome >= 123", "edge >= 123", "firefox >= 128", "safari >= 18", "ios_saf >= 18"]
128
+ }
129
+ ```
130
+
86
131
  ## Browsers without `CSS.highlights`
87
132
 
88
133
  `Command` and `Combobox` use the CSS Custom Highlight API to highlight the
89
- matched text in their filtered results. It is the least widely available
90
- feature Helix uses, and it is the only one that degrades gracefully. Without it,
91
- the results still filter, sort, and select correctly, and the match is not
92
- highlighted.
134
+ matched text in their filtered results. Without it, the results still filter,
135
+ sort, and select correctly, and the match is not highlighted.
93
136
 
94
137
  Nothing else in Helix uses it.
95
138
 
139
+ ## Browsers without scroll-driven animations
140
+
141
+ Tabs, Navigation, Table, Data Table, and Log fade the edge that has more to
142
+ scroll past it. A scroll timeline drives the fade, and Safari added scroll
143
+ timelines in version 26. Firefox does not have them yet. In those browsers the
144
+ strip or table still scrolls, and its edges are cut flat with no fade.
145
+
96
146
  ## Older browsers
97
147
 
98
148
  Helix does not support Internet Explorer and uses no polyfills. It has no
@@ -156,6 +156,21 @@ reading a chart is usually read for:
156
156
 
157
157
  `Heatmap` and `Spatial Heatmap` are each an image with that name. `Sparkline` takes a `label` of its own.
158
158
 
159
+ ## The scale beside the plot
160
+
161
+ `Line Chart`, `Area Chart`, and `Bar Chart` draw the numbers of their scale
162
+ beside the plot, with a rule across the plot at each number. The top of the
163
+ scale is a round number above the highest reading, so the peak stands clear of
164
+ the top edge.
165
+
166
+ - `gridlines="both"` also rules each reading whose name is drawn, and
167
+ `gridlines="category"` rules those readings alone.
168
+ - `value-axis="none"` and `gridlines="none"` take the numbers and the rules
169
+ away, for a chart read for its shape, such as one in a card beside the figure
170
+ it explains.
171
+
172
+ `Sparkline` draws no scale, and `Scatter Chart` draws both of its axes.
173
+
159
174
  ## Tables that change
160
175
 
161
176
  A chart follows its table. It redraws when you edit a cell, add a row, or
@@ -15,7 +15,7 @@ class, or a second copy of any value.
15
15
  ```css
16
16
  :root {
17
17
  color-scheme: light dark;
18
- --helix-color-background: light-dark(#fff, #0b0b0d);
18
+ --helix-color-background: light-dark(#fff, #000);
19
19
  }
20
20
  ```
21
21
 
package/content/color.mdx CHANGED
@@ -35,10 +35,46 @@ choice people most often get wrong. See [Surfaces and
35
35
  separation](./surfaces-and-separation).
36
36
 
37
37
  A field is filled with `well`: 5% of `foreground` laid over whatever the field
38
- sits on, so its color depends on the surface under the field. A row under the
38
+ sits on, so its color depends on the surface under the field. `surface-filled`
39
+ is a wash of `foreground` too, for a surface with `separation="filled"`, such as
40
+ a filled Card or the ground of a spatial chart: 5% in light and 8.5% in dark.
41
+ Inside a Dialog, a Drawer, a Popover, an elevated Card, or a sunken region, the
42
+ dark wash is 6%, so a filled Card there stays under an elevated one. A row under the
39
43
  pointer or the keyboard, such as an option, is lit with `hover` the same way:
40
44
  8% of `foreground` in light and 12% in dark.
41
45
 
46
+ A Button washes with its own tone and leaves `hover` alone. Each emphasis takes
47
+ its own steps:
48
+
49
+ | Emphasis | At rest | Under the pointer | Under a press |
50
+ | --- | --- | --- | --- |
51
+ | `ghost` | None | 8% in light, 12% in dark | 16% in light, 20% in dark |
52
+ | `outlined` | None | 12% | 16% in light, 20% in dark |
53
+ | `subtle` | 14% | 22% | 30% |
54
+
55
+ An Icon Button takes the same washes.
56
+
57
+ Three more washes are laid over a ground the same way:
58
+
59
+ - `press` lights a control under a press, a step past `hover`: 16% of
60
+ `foreground` in light and 19% in dark. A Button's own press is 20% in dark,
61
+ as the table above gives.
62
+ - `selected` marks a chosen thing that stays chosen and has no fill of its own,
63
+ such as a range of days or a pressed toggle in a find bar. It is 13% of
64
+ `foreground` in light and 16% in dark.
65
+ - `primary-wash` is the bubble of your own message in Chat. It is 20% of
66
+ `primary` with a brand color, and 16% of `foreground` with none.
67
+
68
+ Three more grounds sit outside the ladder:
69
+
70
+ - `surface-inverse` is the mode's opposite, for a surface that has to read as
71
+ separate from the page, such as a tooltip. `foreground-inverse` is the text on
72
+ it.
73
+ - `surface-media` and `foreground-media` are black and white in both modes. They
74
+ are the well behind a video and the controls drawn over it.
75
+ - `overlay` is the scrim behind a modal Dialog, a Drawer, or a Lightbox: a
76
+ near-black at 40% in light mode, and black at 64% in dark.
77
+
42
78
  ### Inks
43
79
 
44
80
  Inks are the colors that go on grounds. The base ink is `foreground`.
@@ -47,26 +83,70 @@ Inks are the colors that go on grounds. The base ink is `foreground`.
47
83
  placeholder, a hint, or a caption. The engine solves it to the contrast
48
84
  target.
49
85
  - `foreground-subtle` recedes further. It is for marks that are not text, such
50
- as a separator, a chevron, or a grip. A disabled control fades whole, through
51
- `--helix-opacity-disabled`.
52
- It is a fixed step of the gray ramp, and the engine does not solve it, so its
53
- contrast is not guaranteed. Use `foreground-muted` for text that is read.
86
+ as a separator, a chevron, or a grip. It is a fixed step of the gray ramp,
87
+ and the engine does not solve it, so its contrast is not guaranteed. Use
88
+ `foreground-muted` for text that is read. A disabled control fades whole,
89
+ through `--helix-opacity-disabled`.
90
+ - Three opacities fade ink by a fixed amount:
91
+ - `--helix-opacity-disabled` is 0.5, for a disabled control.
92
+ - `--helix-opacity-busy` is 0.5, for rows that stay on screen while a new set
93
+ loads.
94
+ - `--helix-opacity-quiet` is 0.72, for quiet text on a ground the text does
95
+ not know, where `foreground-muted` would be the page's gray. A chart
96
+ tooltip's names on the inverse bubble and a message still sending take it.
54
97
  - Text on a filled color takes the ink named for that fill:
55
98
  - `foreground-on-primary` on `primary-surface`
56
99
  - `foreground-on-accent` on `accent-surface`
57
100
  - `foreground-on-status` on the four status fills
58
101
 
102
+ ### Lines and focus
103
+
104
+ - `border` is the hairline edge of a card, a field, a divider, or a segmented
105
+ control's groove.
106
+ - `border-floating` is the edge of a surface that floats over content, such as a
107
+ menu or a popover. It is `border` in light mode and 10% of white in dark mode,
108
+ so the edge still shows where a shadow cannot.
109
+ - `border-hover` is the edge of a field under the pointer. It is the brand color
110
+ when one is set, and a gray at about 3:1 on the white page when none is.
111
+ - `focus-ring` is the color of the focus ring. It is `primary`, held at a
112
+ lightness of 0.6 or less in light mode and 0.65 or more in dark mode, so the
113
+ ring stays visible on the page.
114
+
59
115
  ### Intent
60
116
 
61
117
  Intent colors show what something means.
62
118
 
63
119
  - `primary` and `accent` are for emphasis. Each has `-hover`, `-active`, and
64
120
  `-subtle` variants. With no brand color set, both are ink: near-black in
65
- light mode and near-white in dark mode.
121
+ light mode and near-white in dark mode. `primary-surface` and
122
+ `accent-surface` are their fills, each with a `-surface-hover` variant for
123
+ the fill under the pointer and a `-surface-active` variant for the fill under
124
+ a press.
66
125
  - `info`, `success`, `warning`, and `danger` are for status. Each has a
67
126
  `-surface` variant, the filled ground that carries `foreground-on-status`,
68
- such as a danger button or a badge in a status tone, and a `-surface-hover`
69
- variant for that fill under the pointer.
127
+ such as a danger button or a badge in a status tone, with the same
128
+ `-surface-hover` and `-surface-active` variants.
129
+ - `primary-strong` is the far end of a ramp drawn in the brand color, such as
130
+ the busiest cell of a heatmap. It is `primary-active` held at a lightness of
131
+ 0.33 or more, so the top of the ramp never reads as black.
132
+ - `neutral-subtle` is a quiet gray for a mark that stands on the page, such as
133
+ an Avatar with no picture or a neutral Badge. It is 11% of `foreground` over
134
+ the page, mixed in sRGB, and opaque, so one avatar can overlap the next.
135
+ - `neutral-surface-hover` and `neutral-surface-active` are a neutral fill under
136
+ the pointer and under a press. The neutral fill is `foreground`, which has
137
+ nothing past it, so both move toward the page, and the press moves further.
138
+ - Each of the six tones has a `-muted` variant, such as `danger-muted`: the
139
+ tone's quiet ink, for text with that tone and `emphasis="muted"`. It is the
140
+ tone's color at half the chroma. With no brand color set, `primary-muted` and
141
+ `accent-muted` are `foreground-muted`.
142
+ - `warning-mark` is the warning color for a mark, such as a star, a Meter's
143
+ fill, or a Callout's icon. `warning` is solved for text and reads brown as a
144
+ shape, so in light mode a mark takes a lighter, more saturated step that
145
+ measures at least 3:1 on the page. In dark mode it is `warning`.
146
+ - `brand-mark` is the brand color for a graphic. The engine solves `primary` to
147
+ the theme's contrast target for text, and solves `brand-mark` to the 3:1 a
148
+ graphic needs, so `brand-mark` stays closer to the color you chose. With no
149
+ brand color set, it matches `primary`.
70
150
 
71
151
  ### Rise and fall
72
152
 
@@ -75,6 +155,11 @@ are `success` and `danger` unless you set them. Mainland China, Taiwan, and
75
155
  Japan draw a rise in red, so a page for one of those markets swaps the two. See
76
156
  [Rise and fall colors](./localization#rise-and-fall-colors).
77
157
 
158
+ ### Maps
159
+
160
+ `contour` colors the contour lines of a map, a brown taken 45% of the way toward
161
+ `foreground`, so the lines read on a light map and on a dark one.
162
+
78
163
  ### Series
79
164
 
80
165
  Helix has twenty-four series colors for charts. They are ordered, so a chart
@@ -93,9 +178,11 @@ roles. Helix has fewer because code in documentation only needs to be read.
93
178
  tokens:
94
179
 
95
180
  - `--helix-scrollbar-thumb-color` is the thumb at rest. It is a mid gray that
96
- measures at least 3:1 against the page and every surface, in both modes.
181
+ measures at least 3:1 against the page and every surface, in both modes. It
182
+ also clears 3:1 on the rungs inside a Dialog, a Drawer, or a Popover.
97
183
  - `--helix-scrollbar-thumb-hover-color` is the thumb while the pointer is over
98
- its scroller. It is `foreground-subtle`.
184
+ its scroller. It is `foreground-muted`, a step closer to the text than the
185
+ thumb at rest: darker in light mode and lighter in dark mode.
99
186
  - `--helix-scrollbar-track-color` is the track behind the thumb. It is
100
187
  `transparent`, so the scroller's own ground shows through.
101
188
 
@@ -127,11 +214,12 @@ solves them against the well over the page, a card, a raised surface, a dialog,
127
214
  and a sunken surface. The report names each of these grounds as the well over
128
215
  its surface, such as `color-well over color-surface`.
129
216
 
130
- Both inks are also written on a lit row and on a selected row. The engine solves
131
- them against these grounds as well:
217
+ Both inks are also written on a row under the pointer, a chosen row, a pressed
218
+ row, and a row tinted as selected. The engine solves them against these grounds
219
+ as well:
132
220
 
133
- - `hover` over each of the same five surfaces, such as `color-hover over
134
- color-surface`
221
+ - `hover`, `selected`, and `press` over each of the same five surfaces, such as
222
+ `color-hover over color-surface` and `color-press over color-surface`
135
223
  - `primary-subtle` and `accent-subtle`, the tints a selected row takes
136
224
  - the well over each tint, for a field on a selected row
137
225
 
@@ -48,22 +48,22 @@ for the cases the top layer does not cover:
48
48
  | Token | Value |
49
49
  | --- | --- |
50
50
  | `--helix-shadow-none` | `none` |
51
- | `--helix-shadow-sm` | `0 1px 2px var(--_helix-shadow-ink-sm)` |
52
- | `--helix-shadow-md` | `0 4px 12px var(--_helix-shadow-ink-md)` |
53
- | `--helix-shadow-lg` | `0 12px 32px var(--_helix-shadow-ink-lg)` |
51
+ | `--helix-shadow-sm` | `0 1px 2px light-dark(color-mix(in oklab, oklch(0.15 var(--helix-seed-neutral-chroma, 0) var(--helix-seed-neutral-hue, 258)) 5%, transparent), color-mix(in oklab, oklch(0.15 var(--helix-seed-neutral-chroma, 0) var(--helix-seed-neutral-hue, 258)) 8%, transparent))` |
52
+ | `--helix-shadow-md` | `0 4px 12px light-dark(color-mix(in oklab, oklch(0.15 var(--helix-seed-neutral-chroma, 0) var(--helix-seed-neutral-hue, 258)) 6%, transparent), color-mix(in oklab, oklch(0.15 var(--helix-seed-neutral-chroma, 0) var(--helix-seed-neutral-hue, 258)) 10%, transparent))` |
53
+ | `--helix-shadow-lg` | `0 12px 32px light-dark(color-mix(in oklab, oklch(0.15 var(--helix-seed-neutral-chroma, 0) var(--helix-seed-neutral-hue, 258)) 9%, transparent), color-mix(in oklab, oklch(0.15 var(--helix-seed-neutral-chroma, 0) var(--helix-seed-neutral-hue, 258)) 14%, transparent))` |
54
54
  | `--helix-shadow-surface` | `var(--helix-shadow-none)` |
55
- | `--helix-shadow-floating` | `var(--helix-shadow-lg)` |
56
- | `--helix-shadow-raised` | `var(--helix-shadow-floating)` |
55
+ | `--helix-shadow-floating` | `var(--helix-shadow-sm), var(--helix-shadow-lg)` |
56
+ | `--helix-shadow-raised` | `var(--helix-shadow-sm), var(--helix-shadow-md)` |
57
57
 
58
58
  [//]: # (/tokens)
59
59
 
60
- The first four are the values. The last two are policy tokens. A theme sets
60
+ The first four are the values. The last three are policy tokens. A theme sets
61
61
  them to make your interface shadow-first or border-first. See [Surfaces and
62
62
  separation](./surfaces-and-separation).
63
63
 
64
64
  ## Material
65
65
 
66
- Ten tokens describe translucency:
66
+ These tokens describe translucency:
67
67
 
68
68
  [//]: # (tokens:material)
69
69
 
@@ -71,13 +71,14 @@ Ten tokens describe translucency:
71
71
  | --- | --- | --- |
72
72
  | `--helix-material-backdrop` | `blur(var(--helix-material-blur-md)) saturate(1.5)` | The blur and saturation behind a translucent surface. |
73
73
  | `--helix-material-opacity` | `1` | How opaque a translucent surface is. |
74
+ | `--helix-material-glass-opacity` | `calc(0.72 * var(--helix-material-opacity))` | How much of a mark a glass material covers. |
75
+ | `--helix-material-frosted-opacity` | `calc(0.88 * var(--helix-material-opacity))` | How much of a mark a frosted material covers. |
74
76
  | `--helix-material-blur-sm` | `8px` | The lightest backdrop blur. |
75
77
  | `--helix-material-blur-md` | `16px` | The backdrop blur behind a modal. |
76
78
  | `--helix-material-blur-lg` | `32px` | The heaviest backdrop blur. |
77
- | `--helix-material-translucent` | `light-dark(color-mix(in oklab, oklch(1 0 0) 30%, transparent), color-mix(in oklab, oklch(0.182 var(--helix-seed-neutral-chroma, 0) var(--helix-seed-neutral-hue, 258)) 60%, transparent))` | The translucent background, for a surface that shows what is behind it. |
78
- | `--helix-material-translucent-strong` | `color-mix(in oklab, light-dark(oklch(1 0 0), oklch(0.182 var(--helix-seed-neutral-chroma, 0) var(--helix-seed-neutral-hue, 258))) 88%, transparent)` | The stronger translucent background, for a surface that shows less of what is behind it. |
79
- | `--helix-material-modal` | `light-dark(var(--helix-material-translucent-strong), var(--helix-material-translucent))` | The glass of a Dialog or Drawer, which sits over its own scrim. |
80
- | `--helix-material-panel` | `light-dark(color-mix(in oklab, oklch(1 0 0) 72%, transparent), var(--helix-material-translucent))` | The glass of a panel over the page, such as a Menu, Popover, or Tooltip. |
79
+ | `--helix-material-translucent` | `light-dark(color-mix(in oklab, oklch(1 0 0) min(100%, 30% * var(--helix-material-opacity)), transparent), color-mix(in oklab, oklch(0.182 var(--helix-seed-neutral-chroma, 0) var(--helix-seed-neutral-hue, 258)) min(100%, 72% * var(--helix-material-opacity)), transparent))` | The translucent background, for a surface that shows what is behind it. |
80
+ | `--helix-material-translucent-strong` | `color-mix(in oklab, light-dark(oklch(1 0 0), oklch(0.182 var(--helix-seed-neutral-chroma, 0) var(--helix-seed-neutral-hue, 258))) min(100%, 88% * var(--helix-material-opacity)), transparent)` | The stronger translucent background, for a surface that shows less of what is behind it. |
81
+ | `--helix-material-panel` | `light-dark(color-mix(in oklab, oklch(1 0 0) min(100%, 72% * var(--helix-material-opacity)), transparent), var(--helix-material-translucent))` | The glass of every panel, from a Menu, Popover, or Tooltip to a Dialog or Drawer over its scrim. |
81
82
  | `--helix-material-border` | `light-dark(color-mix(in oklab, oklch(0.15 var(--helix-seed-neutral-chroma, 0) var(--helix-seed-neutral-hue, 258)) 14%, transparent), color-mix(in oklab, oklch(1 0 0) 12%, transparent))` | The border a translucent surface needs to keep a visible edge. |
82
83
 
83
84
  [//]: # (/tokens)
@@ -88,12 +89,27 @@ The `material` axis draws its three values, `frosted`, `glass`, and
88
89
  properties that can apply at once belong on two axes. See [Visual
89
90
  axes](./visual-axes).
90
91
 
92
+ | Value | Ground | Backdrop filter |
93
+ | --- | --- | --- |
94
+ | `glass` | `material-panel`: 72% white in light mode, and 72% of the dark ground in dark mode | `material-backdrop`: a 16px blur and 1.5 times the saturation |
95
+ | `frosted` | `material-translucent-strong`: 88% of the ground in both modes | A 32px blur, `material-blur-lg`, with no change to saturation |
96
+ | `transparent` | None | None |
97
+
98
+ Every family that takes `material` draws `glass` at the same coverage, a Dialog
99
+ and a Drawer included. `--helix-material-opacity` scales every coverage
100
+ together.
101
+
91
102
  **Use blur with care, because it is expensive.** A `backdrop-filter` makes the
92
103
  compositor read what is behind the element again on every frame the element
93
104
  moves. A frosted header that is always on screen pays that cost all the time.
94
- When you want depth without the frosted texture, use `translucent` without the
95
- blur.
105
+ To show depth without that cost, use `separation="elevated"` on a Card, or
106
+ `data-separation="elevated"` on an element of your own. Each lifts the surface
107
+ with a shadow and needs no backdrop filter.
96
108
 
97
109
  A translucent surface takes its color from what is behind it, so on a busy
98
- background it has no visible edge. `material-border` gives it one, so it keeps
99
- its shape.
110
+ background it has no visible edge. **Every glass or frosted surface draws
111
+ `material-border` as its edge**: 14% of near-black in light mode and 12% of
112
+ white in dark mode, a wash that takes the color of what shows through. Inside a
113
+ glass or frosted surface, `border` and `border-floating` are `material-border`
114
+ too, so the panel's edge and the lines inside it match. The quiet inks are
115
+ raised inside it as well, so muted text stays readable over a busy page.
@@ -27,10 +27,10 @@ The Icon entry registers every glyph in the set by name, so `name` draws any
27
27
  glyph. `@fusion.dev/helix/icon/all` is the same entry and registers the same
28
28
  set.
29
29
 
30
- ## Size and color come from the surrounding text
30
+ ## Size comes from the region and color from the text
31
31
 
32
- An icon has no `size` and no `color` property. It is `1em` square and
33
- `currentColor`, so it takes the size and color of the text it sits in:
32
+ An icon has no `size` and no `color` property. It draws in `currentColor`, so it
33
+ takes the color of the text it sits in:
34
34
 
35
35
  ```html
36
36
  <span data-tone="danger">
@@ -38,8 +38,17 @@ An icon has no `size` and no `color` property. It is `1em` square and
38
38
  </span>
39
39
  ```
40
40
 
41
- Inside a control, `--helix-size-icon` sets the size, and it follows the region's
42
- density. So an icon in a small button is smaller without any extra setting.
41
+ An icon is `--helix-size-icon` square, and that size follows the region's
42
+ density: 16px at `sm`, 20px at `md`, and 24px at `lg`. It does not follow the
43
+ size of the text around it. Inside a Button, an icon is 1.15 times the label's
44
+ size, rounded down to an even pixel: 12px beside the 12px label of a small
45
+ button, 14px beside a 13px label, and 16px beside a 14px label. A small button's
46
+ icon is a step smaller without any extra setting. Set `--icon-size` on an icon
47
+ to give it a size of its own.
48
+
49
+ An Icon Button draws the glyph a field draws, a step under the region's icon,
50
+ and never under 16px: 16px at `sm` and `md`, and 20px at `lg`. A Toolbar and an
51
+ App Header sit at `sm`, so their Icon Buttons draw 16px glyphs.
43
52
 
44
53
  ## Decorative and named icons
45
54
 
@@ -50,16 +59,16 @@ density. So an icon in a small button is smaller without any extra setting.
50
59
  Delete
51
60
  </helix-button>
52
61
 
53
- <!-- Named: there is no text, so the icon has to carry the name. -->
54
- <helix-icon-button
55
- label="Delete"
56
- name="trash"
57
- ></helix-icon-button>
62
+ <!-- Named: there is no text, so the button has to carry the name. -->
63
+ <helix-icon-button label="Delete">
64
+ <helix-icon name="trash"></helix-icon>
65
+ </helix-icon-button>
58
66
  ```
59
67
 
60
68
  An icon with no `label` is hidden from assistive technology. Leave out `label`
61
69
  when text beside the icon says what it is. Add a `label` when there is no text.
62
- `Icon.Button` takes a `label` because it never has text beside it.
70
+ Icon Button takes a `label` because it never has text beside it, and the icon
71
+ inside it takes none.
63
72
 
64
73
  ## Mirror an icon on right-to-left pages
65
74
 
@@ -150,7 +159,7 @@ import { peak } from './icons'
150
159
 
151
160
  The command reads a directory of SVG files and writes the module that
152
161
  `helix-icon` draws from. It works the same way for your own drawings, another
153
- library's, or the 1,404 Phosphor glyphs this set does not include:
162
+ library's, or the 1,351 Phosphor glyphs this set does not include:
154
163
 
155
164
  ```sh
156
165
  npx helix-icons build \
@@ -83,7 +83,7 @@ left out.
83
83
  | Field | What it controls |
84
84
  |---|---|
85
85
  | `contrastTarget` | Target contrast for body text. 4.5 is WCAG AA, and 7 is AAA |
86
- | `pairings` | The foreground and background pairs to measure, by token name. A background of `color-well over color-surface` is a field's well over that surface, and `color-hover over color-surface` is a lit row over it. The list replaces the pairs from the engine's surface model. The engine measures each pair and solves none of them, and a pair that names a token the engine does not emit is reported as `unverifiable` |
86
+ | `pairings` | The foreground and background pairs to measure, by token name. A background of `color-well over color-surface` is a field's well over that surface, `color-hover over color-surface` is a lit row over it, and `color-selected over color-surface` and `color-press over color-surface` are a chosen row and a pressed one. The list replaces the pairs from the engine's surface model. The engine measures each pair and solves none of them, and a pair that names a token the engine does not emit is reported as `unverifiable` |
87
87
 
88
88
  The default is 4.5, the WCAG 2.1 AA figure. The European Accessibility Act
89
89
  refers to WCAG 2.1 AA, so 4.5 is the figure with legal weight.
@@ -167,7 +167,7 @@ import { registerWords } from '@fusion.dev/helix/words'
167
167
 
168
168
  registerWords('pl', {
169
169
  'helix-combobox': {
170
- emptyText: 'Brak wyników',
170
+ noResultsText: 'Brak wyników',
171
171
  resultsLabel:
172
172
  '{count, plural, one {# wynik} few {# wyniki} many {# wyników} other {# wyniku}}',
173
173
  },
@@ -204,7 +204,7 @@ in every family, such as `{ 'helix-table': { fallbackLabel: 'Tabelle' } }`.
204
204
  ### Which words an element uses
205
205
 
206
206
  1. **A value you set on the element**, as an attribute or a property. The
207
- English counts as a value, so `empty-text="No matches"` keeps the English
207
+ English counts as a value, so `no-results-text="No matches"` keeps the English
208
208
  on every page.
209
209
  2. The words registered for the element's locale.
210
210
  3. The English.