@fusion.dev/helix-docs 0.237.1 → 0.237.3
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 +19 -5
- package/content/elevation-and-material.mdx +13 -3
- package/content/iconography.mdx +12 -6
- package/content/metrics.mdx +260 -260
- package/content/size-and-density.mdx +4 -1
- package/content/surfaces-and-separation.mdx +15 -10
- package/content/theming.mdx +13 -7
- package/content/tokens.mdx +3 -3
- package/content/visual-axes.mdx +1 -1
- package/dist/sources.generated.js +340 -296
- package/package.json +12 -12
|
@@ -126,13 +126,16 @@ Use a `-tight` or `-loose` step for something that is meant to differ from its
|
|
|
126
126
|
neighbors, such as a row in a floating panel or a caret inside a trigger. Use
|
|
127
127
|
`-sm`, `-md`, or `-lg` for a size that does not follow density.
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
Three sizes do not follow a region's density. Like every size, they still scale
|
|
130
130
|
with `--helix-seed-density`:
|
|
131
131
|
|
|
132
132
|
- `--helix-size-button` is 200px, a standard width for a button. Set it as a
|
|
133
133
|
button's `--button-inline-size`.
|
|
134
134
|
- `--helix-size-badge` is 16px, the size of a Badge's mark. A badge is pinned
|
|
135
135
|
to something else, such as an avatar, so it does not take a control's size.
|
|
136
|
+
- `--helix-size-control-xs` is 26px, the step under `--helix-size-control-sm`,
|
|
137
|
+
for a strip denser than a toolbar. Find and the Editor's link bar set
|
|
138
|
+
it as their own control height. It is not a density step.
|
|
136
139
|
|
|
137
140
|
## On a touch screen
|
|
138
141
|
|
|
@@ -78,14 +78,19 @@ step darker to be seen. A lit row is different: it takes `hover`, a wash measure
|
|
|
78
78
|
against whatever it sits on. `overlay` works the other way. Its edge and its shadow separate it, so on
|
|
79
79
|
a white page it is white.
|
|
80
80
|
|
|
81
|
-
**In dark mode,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
reads above a filled card: #1e1e1e against #161616 on the page.
|
|
81
|
+
**In dark mode, `overlay` is the `raised` rung**, #181818, so a menu, a popover,
|
|
82
|
+
and a dialog are as dark as a raised panel and set apart by their edge. A shadow
|
|
83
|
+
does not show on a black page, so an elevated Card fills a step above `overlay`
|
|
84
|
+
in dark and reads above a filled card: #1e1e1e against #161616 on the page.
|
|
85
|
+
Inside a Dialog,
|
|
85
86
|
a Drawer, a Popover, or an elevated Card, the rungs are washes of `foreground`
|
|
86
87
|
over the panel: `overlay` 12%, `raised` 9%, `surface` 3%, and `border` 12%.
|
|
87
|
-
Inside a default Card, `overlay` is 12% and the filled wash 6%.
|
|
88
|
-
Card
|
|
88
|
+
Inside a default Card, `overlay` is 12% and the filled wash 6%. Inside a
|
|
89
|
+
filled Card, the rungs are the same washes as in an elevated Card, laid over
|
|
90
|
+
the `raised` rung, since the filled card's own fill is a wash: on the page, a
|
|
91
|
+
default Card inside is #1e1e1e, a filled one #242424, and an elevated one
|
|
92
|
+
#353535, on the #161616 card. An elevated Card inside any of these reads above
|
|
93
|
+
a filled one. A Menu opened from an
|
|
89
94
|
elevated Card stands a step above the card, and a Dialog opened over another
|
|
90
95
|
Dialog stands 8% above it. Light mode keeps its rungs, where a shadow sets an
|
|
91
96
|
overlay apart. An elevated Card inside another card fills the `overlay` rung in
|
|
@@ -107,10 +112,10 @@ does off the page: 1.23:1 in light and 1.29:1 in dark.
|
|
|
107
112
|
**In dark mode, a surface inside a sunken region steps up a rung.** The card
|
|
108
113
|
rung, #0c0c0c, is darker than the #121212 well, so a Card there would read as a
|
|
109
114
|
hole. Inside the region, `surface` takes the `raised` rung, #181818, and the
|
|
110
|
-
rungs above it step with it: `raised` is #
|
|
111
|
-
elevated Card still stands above a default one
|
|
112
|
-
|
|
113
|
-
the well. Canvas's board is a sunken region too.
|
|
115
|
+
rungs above it step with it: `raised` is #212121 and `overlay` is #272727. An
|
|
116
|
+
elevated Card, #2d2d2d, still stands above a default one and above a filled
|
|
117
|
+
one, #202020, and a menu opened inside stands above both. Light mode keeps its
|
|
118
|
+
rungs, where a card is already lighter than the well. Canvas's board is a sunken region too.
|
|
114
119
|
|
|
115
120
|
## Using the page color inside a component
|
|
116
121
|
|
package/content/theming.mdx
CHANGED
|
@@ -69,19 +69,25 @@ for text on each surface.
|
|
|
69
69
|
|
|
70
70
|
- **Light mode.** The primary color is held at L 0.5 or less. A seed at 0.5 or
|
|
71
71
|
darker is drawn exactly. A lighter seed is darkened to 0.5, so a very light
|
|
72
|
-
brand draws a darker primary color than the one you set.
|
|
72
|
+
brand draws a darker primary color than the one you set. A color at L 0.5
|
|
73
|
+
that is outside sRGB, such as a vivid cyan or green, is drawn by the screen
|
|
74
|
+
as the nearest color it can show, which can be a little lighter: a `#06b6d4`
|
|
75
|
+
seed draws at L 0.516.
|
|
73
76
|
- **Dark mode.** The primary color is the seed lightened by 0.13, at least
|
|
74
77
|
0.68, and no lighter than 0.87 or the seed, whichever is lighter. A seed at
|
|
75
78
|
0.87 or lighter is drawn exactly: on a `#ffe600` seed, primary text is
|
|
76
79
|
`#ffe600` and measures 16.57:1 on the black page. A darker seed is drawn
|
|
77
80
|
lighter than the one you set.
|
|
78
81
|
- **A filled control in dark mode.** A seed at L 0.68 or darker fills at a
|
|
79
|
-
luminance between 0.115 and 0.135, with its hue and chroma kept
|
|
80
|
-
alone is a different luminance in each hue, so a green
|
|
81
|
-
lightness as a blue carried a white label at 4.43:1. At
|
|
82
|
-
fill clears 3:1 against a card, and a white label clears
|
|
83
|
-
under the pointer, and pressed, which step lighter. A
|
|
84
|
-
|
|
82
|
+
luminance between 0.115 and 0.135, with its hue and chroma kept, and takes a
|
|
83
|
+
white label. Lightness alone is a different luminance in each hue, so a green
|
|
84
|
+
filled at the same lightness as a blue carried a white label at 4.43:1. At
|
|
85
|
+
that luminance the fill clears 3:1 against a card, and a white label clears
|
|
86
|
+
4.5:1 on it at rest, under the pointer, and pressed, which step lighter. A
|
|
87
|
+
fill outside sRGB, such as a vivid green or cyan, is brought into sRGB before
|
|
88
|
+
its luminance is set, so the band holds for it too: across 589 seeds, a white
|
|
89
|
+
label measures 5.6:1 or more at rest and 4.6:1 or more pressed. A seed
|
|
90
|
+
lighter than L 0.68 fills 0.05 darker than itself and takes a black label.
|
|
85
91
|
|
|
86
92
|
The accent seed is held to the same limits.
|
|
87
93
|
|
package/content/tokens.mdx
CHANGED
|
@@ -54,7 +54,7 @@ nothing is lighter than white, so a raised surface is *darker* than the page.
|
|
|
54
54
|
- **`surface-overlay`**: something *over* the page, such as a menu, a popover, a
|
|
55
55
|
dialog, or the thumb of a switch or a segmented control. Its edge, its
|
|
56
56
|
shadow, and the content it covers set it apart, so on a white page it is
|
|
57
|
-
white. In dark mode it is
|
|
57
|
+
white. In dark mode it is the same rung as `surface-raised`.
|
|
58
58
|
- **`surface-sunken`**: a recessed fill, such as a progress track, a keyboard
|
|
59
59
|
key, or the groove of a segmented control.
|
|
60
60
|
|
|
@@ -63,8 +63,8 @@ the page, a card, or a raised surface. `--helix-color-well` fills a field, such
|
|
|
63
63
|
as an input. `--helix-color-hover` lights a row under the pointer, such as an
|
|
64
64
|
option or a menu item.
|
|
65
65
|
|
|
66
|
-
**Use `raised` and `overlay` for different jobs.** In dark mode they are
|
|
67
|
-
|
|
66
|
+
**Use `raised` and `overlay` for different jobs.** In dark mode they are the
|
|
67
|
+
same color, #181818, so either token can seem to do both jobs. In
|
|
68
68
|
light mode they need opposite fills. A Code Block's header must be darker than
|
|
69
69
|
a white page, and a thumb must be lighter than the groove it sits in. A menu is
|
|
70
70
|
white on a white page, set apart by its edge and its shadow. If a surface looks
|
package/content/visual-axes.mdx
CHANGED
|
@@ -232,7 +232,7 @@ smeared, and a filter behind an opaque ground cannot be seen. With no
|
|
|
232
232
|
| Value | What it draws |
|
|
233
233
|
|---|---|
|
|
234
234
|
| `glass` | A translucent ground and the backdrop filter that makes it read |
|
|
235
|
-
| `frosted` | A heavier ground under a heavier blur with no added saturation: 88% of the ground under a 32px blur, against glass's 72% in light under 16px. Every family draws `glass` at one coverage, a Dialog and a Drawer included, so `frosted` is heavier on all of them |
|
|
235
|
+
| `frosted` | A heavier ground under a heavier blur with no added saturation: 88% of the ground under a 32px blur, against glass's 72% in light under 16px. Every family but App Header draws `glass` at one coverage, a Dialog and a Drawer included, so `frosted` is heavier on all of them |
|
|
236
236
|
| `transparent` | Neither, so the page shows through structure and spacing |
|
|
237
237
|
|
|
238
238
|
Use `frosted` for a surface that has to stay readable over a busy page. A theme
|