@fusion.dev/helix-docs 0.228.0 → 0.229.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/content/color.mdx +5 -4
- package/content/elevation-and-material.mdx +6 -3
- package/content/metrics.mdx +263 -263
- package/content/shape-and-borders.mdx +3 -4
- package/content/size-and-density.mdx +1 -2
- package/content/space-and-size.mdx +3 -2
- package/content/surfaces-and-separation.mdx +11 -11
- package/content/theming.mdx +3 -1
- package/content/visual-axes.mdx +21 -17
- package/dist/sources.generated.js +316 -307
- package/package.json +12 -12
|
@@ -38,7 +38,7 @@ This makes every card, dialog, input, and button squarer at once, because `sm`,
|
|
|
38
38
|
See [Deriving a theme](./theming).
|
|
39
39
|
|
|
40
40
|
Setting `--helix-radii-md` changes only what uses `md`. Buttons, inputs, and
|
|
41
|
-
dialogs use `sm`, and cards use `
|
|
41
|
+
dialogs use `sm`, and cards use `md`, so none of them change. Each step is
|
|
42
42
|
computed from the seed on its own, so overriding one step changes only that
|
|
43
43
|
step. To change the rounding everywhere, set the seed.
|
|
44
44
|
|
|
@@ -55,9 +55,8 @@ step. To change the rounding everywhere, set the seed.
|
|
|
55
55
|
They all have the same corner, whatever their size. You compare a radius with
|
|
56
56
|
the corners next to it, so the size of the panel does not matter.
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
does not change them.
|
|
58
|
+
An avatar and a radio are circles by design, so they read `--helix-radii-full`.
|
|
59
|
+
A theme that squares off everything else does not change them.
|
|
61
60
|
|
|
62
61
|
## Border widths
|
|
63
62
|
|
|
@@ -26,8 +26,7 @@ Size does three jobs:
|
|
|
26
26
|
- Emphasis shows which control matters most. The `emphasis` axis sets it. A
|
|
27
27
|
filled primary button marks the important action much more clearly than eight
|
|
28
28
|
more pixels of height.
|
|
29
|
-
- Fit depends on the region. A toolbar is tight
|
|
30
|
-
row is tighter still. The region sets the fit for every control in it.
|
|
29
|
+
- Fit depends on the region. A toolbar is tight and a hero is spacious. The region sets the fit for every control in it.
|
|
31
30
|
- Optical role applies only to things that are not controls. An avatar at 24 in
|
|
32
31
|
a list and at 96 on a profile are two different pictures. That is why
|
|
33
32
|
`Avatar`, `Loader`, and `Orb` keep a `size`.
|
|
@@ -25,6 +25,7 @@ up one step of padding taller than the input beside it.
|
|
|
25
25
|
| `--helix-space-xl` | `calc(2rem * var(--helix-seed-density, 1))` |
|
|
26
26
|
| `--helix-space-2xl` | `calc(3rem * var(--helix-seed-density, 1))` |
|
|
27
27
|
| `--helix-space-3xl` | `calc(4rem * var(--helix-seed-density, 1))` |
|
|
28
|
+
| `--helix-space-field` | `var(--helix-space-sm)` |
|
|
28
29
|
| `--helix-space-control` | `var(--helix-space-md)` |
|
|
29
30
|
|
|
30
31
|
[//]: # (/tokens)
|
|
@@ -34,7 +35,7 @@ arithmetic, such as `space-4` being twice `space-2`. That stops being true as
|
|
|
34
35
|
soon as the scale is tuned, and it leads to a `space-4.5` the first time
|
|
35
36
|
something does not fit.
|
|
36
37
|
|
|
37
|
-
`--helix-space-control`
|
|
38
|
+
`--helix-space-control` and `--helix-space-field` are two more of a different kind. It is the inset a
|
|
38
39
|
control uses, and it follows the region's density. It is not a step on the
|
|
39
40
|
scale. See [Size and density](./size-and-density).
|
|
40
41
|
|
|
@@ -50,7 +51,7 @@ Use the space tokens for gap, padding, and margin:
|
|
|
50
51
|
|
|
51
52
|
## Size
|
|
52
53
|
|
|
53
|
-
|
|
54
|
+
Almost all of the size tokens name a specific
|
|
54
55
|
thing:
|
|
55
56
|
|
|
56
57
|
- `--helix-size-control`
|
|
@@ -6,11 +6,11 @@ title: Surfaces and separation
|
|
|
6
6
|
|
|
7
7
|
# Surfaces and separation
|
|
8
8
|
|
|
9
|
-
**Separate each surface from what is behind it with
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
shadow
|
|
9
|
+
**Separate each surface from what is behind it with four things: a fill, an
|
|
10
|
+
edge, a lift, and space.** A design language leads with one of them. Helix leads
|
|
11
|
+
with an edge for surfaces on the page and a lift for surfaces above it. A card
|
|
12
|
+
has a hairline border and no shadow. A menu has a shadow and a hairline border,
|
|
13
|
+
because a shadow cannot show on a near-black page. The surface ladder below sets the ground color
|
|
14
14
|
for each place a surface can sit.
|
|
15
15
|
|
|
16
16
|
## The four ways to separate a surface
|
|
@@ -59,16 +59,16 @@ A surface's ground color token names where the surface sits:
|
|
|
59
59
|
| --- | --- | --- |
|
|
60
60
|
| `--helix-color-background` | <span data-token-swatch style={{ background: 'var(--helix-color-background)' }} /> | The page background. Every other surface sits on it. |
|
|
61
61
|
| `--helix-color-surface` | <span data-token-swatch style={{ background: 'var(--helix-color-surface)' }} /> | A surface on the page, such as a card or a panel. The separation policy sets it apart with a fill, a border, or a shadow. |
|
|
62
|
-
| `--helix-color-surface-raised` | <span data-token-swatch style={{ background: 'var(--helix-color-surface-raised)' }} /> | A raised
|
|
62
|
+
| `--helix-color-surface-raised` | <span data-token-swatch style={{ background: 'var(--helix-color-surface-raised)' }} /> | A panel raised inside a surface, such as a card inside a card. Its fill is one step down the ramp. |
|
|
63
63
|
| `--helix-color-surface-overlay` | <span data-token-swatch style={{ background: 'var(--helix-color-surface-overlay)' }} /> | A surface over the page, such as a menu, a popover, or a dialog. Its edge and its shadow set it apart. |
|
|
64
|
-
| `--helix-color-surface-sunken` | <span data-token-swatch style={{ background: 'var(--helix-color-surface-sunken)' }} /> | A recessed surface
|
|
64
|
+
| `--helix-color-surface-sunken` | <span data-token-swatch style={{ background: 'var(--helix-color-surface-sunken)' }} /> | A recessed surface, such as a track or a groove. Its fill sets it apart. A field reads `well`. |
|
|
65
65
|
|
|
66
66
|
[//]: # (/tokens)
|
|
67
67
|
|
|
68
|
-
**`raised` goes one step down the ramp.** A
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
**`raised` goes one step down the ramp.** A panel inside a surface has a surface
|
|
69
|
+
on every side. Only its fill separates it, and on a white page a fill has to be a
|
|
70
|
+
step darker to be seen. A lit row is different: it takes `hover`, a wash measured
|
|
71
|
+
against whatever it sits on. `overlay` works the other way. Its edge and its shadow separate it, so on
|
|
72
72
|
a white page it is white.
|
|
73
73
|
|
|
74
74
|
## Using the page color inside a component
|
package/content/theming.mdx
CHANGED
|
@@ -60,7 +60,9 @@ Tuned does not guarantee contrast. CSS has no contrast function.
|
|
|
60
60
|
`oklch(from …)` can step and rotate a color, but it cannot search for the
|
|
61
61
|
lightness that meets a target. The contrast figures built into the ramp were
|
|
62
62
|
measured on one blue seed, so they are exact for that seed and approximate for
|
|
63
|
-
any other.
|
|
63
|
+
any other. The label on a solid button turns black on a seed lighter than L 0.68.
|
|
64
|
+
The focus ring still follows the seed, so use the verified engine for a very
|
|
65
|
+
light brand, where the ring measures 1.23:1 on white.
|
|
64
66
|
|
|
65
67
|
**Verified** uses the theme engine. It searches for each color that meets its
|
|
66
68
|
target, measures every pair, and returns the theme with any violations:
|
package/content/visual-axes.mdx
CHANGED
|
@@ -114,8 +114,9 @@ reached the same rule in their own declarations, so the rule is stated here.
|
|
|
114
114
|
|
|
115
115
|
**A family that reports a status accepts only the status values.** `Callout` and
|
|
116
116
|
`Toast` both state this. A callout reports a status and never a brand role, so
|
|
117
|
-
it accepts
|
|
118
|
-
value the family cannot draw is worse
|
|
117
|
+
it accepts five of the seven tones, the four statuses and `neutral`, which is a
|
|
118
|
+
note that reports no status. Accepting a value the family cannot draw is worse
|
|
119
|
+
than leaving the value out.
|
|
119
120
|
|
|
120
121
|
**A family whose resting state has no tone does not need `neutral`.** `Text`
|
|
121
122
|
gives this reason for having no `default` value. A value that matches no rule
|
|
@@ -159,13 +160,13 @@ and this section explains why.
|
|
|
159
160
|
| Value | What it draws |
|
|
160
161
|
|---|---|
|
|
161
162
|
| `elevated` | A surface lifted off the page, with a shadow under it |
|
|
162
|
-
| `filled` | A ground of its own, and no edge |
|
|
163
|
-
| `outlined` | An edge
|
|
164
|
-
| `plain` |
|
|
163
|
+
| `filled` | A ground of its own, and no edge. What the ground is belongs to the family |
|
|
164
|
+
| `outlined` | An edge and no fill. A family whose text or thumb needs its ground to read, such as Log or Toggle Group, does not offer it. On Card, this differs from unset, which has a fill and an edge |
|
|
165
|
+
| `plain` | No frame of its own. A family keeps what its content needs to stay readable, and its reference says what stays |
|
|
165
166
|
|
|
166
167
|
**Most families leave out `elevated` because of what the value means.** A shadow
|
|
167
168
|
shows that the box floats above the page. That is true of a card picked up off a
|
|
168
|
-
grid and of
|
|
169
|
+
grid and of a node on a board. It is false of:
|
|
169
170
|
|
|
170
171
|
- a row in a feed
|
|
171
172
|
- a groove a thumb sits in
|
|
@@ -173,7 +174,7 @@ grid and of an announcement laid over the content. It is false of:
|
|
|
173
174
|
- a bar across a video
|
|
174
175
|
|
|
175
176
|
A family that accepts only the other three values needs no reason for it. A
|
|
176
|
-
family that accepts `elevated` has made a choice, and `Card` and `
|
|
177
|
+
family that accepts `elevated` has made a choice, and `Card` and `Canvas Node`
|
|
177
178
|
both accept it.
|
|
178
179
|
|
|
179
180
|
## What each nesting value does
|
|
@@ -203,7 +204,7 @@ value changes meaning partway along.
|
|
|
203
204
|
| Value | What it draws |
|
|
204
205
|
|---|---|
|
|
205
206
|
| `solid` | The tone as a full ground, with the ink flipped to read on it |
|
|
206
|
-
| `subtle` | A wash of the tone and no edge, the quietest thing that still has a surface |
|
|
207
|
+
| `subtle` | A wash of the tone and no edge, the quietest thing that still has a surface. A chart mark keeps its edge |
|
|
207
208
|
| `outlined` | An edge in the tone |
|
|
208
209
|
| `ghost` | Nothing at rest, the tone carried by the ink alone |
|
|
209
210
|
| `muted` | Quieter ink, where there is no surface to quiet |
|
|
@@ -214,8 +215,9 @@ fill stays under the edge, because the area shows a value and removing the fill
|
|
|
214
215
|
would hide that value. In both cases, `outlined` sets how much ink the element
|
|
215
216
|
uses, based on what the element needs the ink for.
|
|
216
217
|
|
|
217
|
-
**`muted` is for something whose only ink is its letterforms.**
|
|
218
|
-
|
|
218
|
+
**`muted` is for something whose only ink is its letterforms.** Text takes it,
|
|
219
|
+
because everything else has a surface to make quieter first. Spatial Bar Chart
|
|
220
|
+
also takes it, to draw neutral bars with one lit in its tone. Leaving it off
|
|
219
221
|
other families is intentional.
|
|
220
222
|
|
|
221
223
|
## What each material draws
|
|
@@ -229,7 +231,7 @@ smeared, and a filter behind an opaque ground cannot be seen. With no
|
|
|
229
231
|
| Value | What it draws |
|
|
230
232
|
|---|---|
|
|
231
233
|
| `glass` | A translucent ground and the backdrop filter that makes it read |
|
|
232
|
-
| `frosted` | The same pair turned up, a heavier ground under a heavier blur |
|
|
234
|
+
| `frosted` | The same pair turned up, a heavier ground under a heavier blur. A Dialog or Drawer's `glass` is already as heavy in light, so there the two differ by blur alone |
|
|
233
235
|
| `transparent` | Neither, so the page shows through structure and spacing |
|
|
234
236
|
|
|
235
237
|
Use `frosted` for a surface that has to stay readable over a busy page. A theme
|
|
@@ -260,15 +262,17 @@ the width the splitter actually has.
|
|
|
260
262
|
|
|
261
263
|
## What each size draws
|
|
262
264
|
|
|
263
|
-
`size` applies to pictures and regions, and never to
|
|
264
|
-
|
|
265
|
+
`size` applies to pictures and regions, and never to one control. Toolbar and
|
|
266
|
+
Button Group take it because they are regions: it sets every control inside
|
|
267
|
+
them at once, as `data-density` does for a block. That rule sets the scope of
|
|
268
|
+
the axis. One of the four values is a different kind of step.
|
|
265
269
|
|
|
266
270
|
| Value | What it draws |
|
|
267
271
|
|---|---|
|
|
268
272
|
| `sm` | The small step |
|
|
269
|
-
| `md` | The middle step, and the resting state for
|
|
273
|
+
| `md` | The middle step, and the resting state for most families. Toolbar rests at `sm`, being dense by nature |
|
|
270
274
|
| `lg` | The large step |
|
|
271
|
-
| `full` | The whole region, less the same inset every other step already leaves |
|
|
275
|
+
| `full` | The whole width of the region, less the same inset every other step already leaves |
|
|
272
276
|
|
|
273
277
|
**`full` is one more step on the `size` axis.** A takeover dialog is the same
|
|
274
278
|
setting taken further, so it belongs on this axis. A separate `fullscreen`
|
|
@@ -291,7 +295,7 @@ The table at the top describes `tone` in words and names four of its values.
|
|
|
291
295
|
| `danger` | Destructive, or already wrong |
|
|
292
296
|
|
|
293
297
|
The first three are intents, and the last four are statuses. A family that
|
|
294
|
-
accepts a subset
|
|
298
|
+
accepts a subset usually chooses between these two groups. The section on `neutral`
|
|
295
299
|
above says when to accept it.
|
|
296
300
|
|
|
297
301
|
## What each width value does
|
|
@@ -302,7 +306,7 @@ component, separate from `size`.
|
|
|
302
306
|
|
|
303
307
|
| Value | What it draws |
|
|
304
308
|
|---|---|
|
|
305
|
-
| `auto` | As wide as its content. This is the resting behavior, written out |
|
|
309
|
+
| `auto` | As wide as its content. This is the resting behavior on most families, written out. On Description List, which fills the row at rest, it is the departure |
|
|
306
310
|
| `full` | All the inline space its parent gives it |
|
|
307
311
|
|
|
308
312
|
**A `width` that takes a number is a different property with the same name.** A
|