@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
package/content/color.mdx
CHANGED
|
@@ -54,7 +54,7 @@ its own steps:
|
|
|
54
54
|
|
|
55
55
|
An Icon Button takes the same washes.
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Four more washes are laid over a ground the same way:
|
|
58
58
|
|
|
59
59
|
- `press` lights a control under a press, a step past `hover`: 16% of
|
|
60
60
|
`foreground` in light and 19% in dark. A Button's own press is 20% in dark,
|
|
@@ -64,6 +64,9 @@ Three more washes are laid over a ground the same way:
|
|
|
64
64
|
`foreground` in light and 16% in dark.
|
|
65
65
|
- `primary-wash` is the bubble of your own message in Chat. It is 20% of
|
|
66
66
|
`primary` with a brand color, and 16% of `foreground` with none.
|
|
67
|
+
- `track` is the unfilled length of a bar, such as a Progress or Meter track.
|
|
68
|
+
It is 8% of `foreground` in light and 7% in dark, which on the page is the
|
|
69
|
+
`surface-sunken` rung, and it steps the same distance off a card or a panel.
|
|
67
70
|
|
|
68
71
|
Three more grounds sit outside the ladder:
|
|
69
72
|
|
|
@@ -97,7 +100,8 @@ Inks are the colors that go on grounds. The base ink is `foreground`.
|
|
|
97
100
|
- Text on a filled color takes the ink named for that fill:
|
|
98
101
|
- `foreground-on-primary` on `primary-surface`
|
|
99
102
|
- `foreground-on-accent` on `accent-surface`
|
|
100
|
-
- `foreground-on-status` on the four status fills
|
|
103
|
+
- `foreground-on-status` on the four status `-surface` fills
|
|
104
|
+
- `background` on `warning-solid`
|
|
101
105
|
|
|
102
106
|
### Lines and focus
|
|
103
107
|
|
|
@@ -106,6 +110,11 @@ Inks are the colors that go on grounds. The base ink is `foreground`.
|
|
|
106
110
|
- `border-floating` is the edge of a surface that floats over content, such as a
|
|
107
111
|
menu or a popover. It is `border` in light mode and 10% of white in dark mode,
|
|
108
112
|
so the edge still shows where a shadow cannot.
|
|
113
|
+
- `border-readonly` is the edge of a read-only mark that carries a value, such
|
|
114
|
+
as a read-only Checkbox's box, a Radio's circle, a Switch's track, a Slider's
|
|
115
|
+
thumb, or a Rating's empty stars. It is 44% of `foreground` in light and 36%
|
|
116
|
+
in dark, from 3.1:1 to 3.4:1 on every ground, so the value still reads where
|
|
117
|
+
the field edge is 1.23:1.
|
|
109
118
|
- `border-hover` is the edge of a field under the pointer. It is the brand color
|
|
110
119
|
when one is set, and a gray at about 3:1 on the white page when none is.
|
|
111
120
|
- `focus-ring` is the color of the focus ring. It is `primary`, held at a
|
|
@@ -123,9 +132,10 @@ Intent colors show what something means.
|
|
|
123
132
|
the fill under the pointer and a `-surface-active` variant for the fill under
|
|
124
133
|
a press.
|
|
125
134
|
- `info`, `success`, `warning`, and `danger` are for status. Each has a
|
|
126
|
-
`-surface` variant,
|
|
127
|
-
|
|
128
|
-
|
|
135
|
+
`-surface` variant, a filled ground that carries `foreground-on-status`, with
|
|
136
|
+
the same `-surface-hover` and `-surface-active` variants. A solid info,
|
|
137
|
+
success, or danger Button, Tag, Badge, or Icon Button fills its `-surface`
|
|
138
|
+
variant. A solid warning one fills `warning-solid`.
|
|
129
139
|
- `primary-strong` is the far end of a ramp drawn in the brand color, such as
|
|
130
140
|
the busiest cell of a heatmap. It is `primary-active` held at a lightness of
|
|
131
141
|
0.33 or more, so the top of the ramp never reads as black.
|
|
@@ -143,6 +153,10 @@ Intent colors show what something means.
|
|
|
143
153
|
fill, or a Callout's icon. `warning` is solved for text and reads brown as a
|
|
144
154
|
shape, so in light mode a mark takes a lighter, more saturated step that
|
|
145
155
|
measures at least 3:1 on the page. In dark mode it is `warning`.
|
|
156
|
+
- `warning-solid` is the warning fill under a label: a solid warning Button,
|
|
157
|
+
Tag, Badge, or Icon Button, and a warning Map Marker or Map Points. Its label
|
|
158
|
+
is `background`. In light mode it is a deep amber, #985f00, under white at
|
|
159
|
+
5.29:1. In dark mode it is `warning-mark`, #ffaf00, under black at 11.38:1.
|
|
146
160
|
- `brand-mark` is the brand color for a graphic. The engine solves `primary` to
|
|
147
161
|
the theme's contrast target for text, and solves `brand-mark` to the 3:1 a
|
|
148
162
|
graphic needs, so `brand-mark` stays closer to the color you chose. With no
|
|
@@ -71,6 +71,7 @@ These 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-scrim-lift` | `var(--_helix-material-scrim-lift)` | How much a glass Dialog or Drawer brightens the page behind its scrim. |
|
|
74
75
|
| `--helix-material-glass-opacity` | `calc(0.72 * var(--helix-material-opacity))` | How much of a mark a glass material covers. |
|
|
75
76
|
| `--helix-material-frosted-opacity` | `calc(0.88 * var(--helix-material-opacity))` | How much of a mark a frosted material covers. |
|
|
76
77
|
| `--helix-material-blur-sm` | `8px` | The lightest backdrop blur. |
|
|
@@ -91,13 +92,22 @@ axes](./visual-axes).
|
|
|
91
92
|
|
|
92
93
|
| Value | Ground | Backdrop filter |
|
|
93
94
|
| --- | --- | --- |
|
|
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
|
+
| `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. A glass Dialog or Drawer adds a brightness of `material-scrim-lift` |
|
|
95
96
|
| `frosted` | `material-translucent-strong`: 88% of the ground in both modes | A 32px blur, `material-blur-lg`, with no change to saturation |
|
|
96
97
|
| `transparent` | None | None |
|
|
97
98
|
|
|
98
99
|
Every family that takes `material` draws `glass` at the same coverage, a Dialog
|
|
99
|
-
and a Drawer included.
|
|
100
|
-
|
|
100
|
+
and a Drawer included, except App Header. Its glass is `material-translucent`,
|
|
101
|
+
30% white in light mode and 72% of the dark ground in dark mode, so a bar across
|
|
102
|
+
the page lets more of what scrolls under it show. `--helix-material-opacity`
|
|
103
|
+
scales every coverage together.
|
|
104
|
+
|
|
105
|
+
A modal Dialog or Drawer paints its scrim behind the panel, so a glass panel's
|
|
106
|
+
filter samples the page with the scrim already over it. In light mode the white
|
|
107
|
+
page came through as a gray. `--helix-material-scrim-lift` is the brightness the
|
|
108
|
+
filter adds to undo the scrim: 1 / 0.6 in light mode, where the scrim is 40% of
|
|
109
|
+
the ink, and 1 in dark mode, where the glass is drawn over the dimmed page. The
|
|
110
|
+
color mode sets it, and a Dialog and a Drawer read it in their own filters.
|
|
101
111
|
|
|
102
112
|
**Use blur with care, because it is expensive.** A `backdrop-filter` makes the
|
|
103
113
|
compositor read what is behind the element again on every frame the element
|
package/content/iconography.mdx
CHANGED
|
@@ -17,6 +17,10 @@ matching Phosphor. We use the bold weight because Phosphor's regular weight is a
|
|
|
17
17
|
hairline beside the medium weight of Helix text. An icon that looks lighter than
|
|
18
18
|
the words next to it does not work as a mark.
|
|
19
19
|
|
|
20
|
+
**One mark is drawn at the regular weight by design.** Option, Time Picker, and
|
|
21
|
+
Menu Item mark a chosen row with Phosphor's regular-weight check, a lighter
|
|
22
|
+
line than Checkbox's tick, so a chosen row reads apart from a checked box.
|
|
23
|
+
|
|
20
24
|
## Register the set
|
|
21
25
|
|
|
22
26
|
```ts
|
|
@@ -46,9 +50,9 @@ button, 14px beside a 13px label, and 16px beside a 14px label. A small button's
|
|
|
46
50
|
icon is a step smaller without any extra setting. Set `--icon-size` on an icon
|
|
47
51
|
to give it a size of its own.
|
|
48
52
|
|
|
49
|
-
An Icon Button draws the glyph a field draws, a step under the region's icon
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
An Icon Button draws the glyph a field draws, a step under the region's icon:
|
|
54
|
+
12px at `sm`, 16px at `md`, and 20px at `lg`. A Toolbar and an App Header sit at
|
|
55
|
+
`sm` and raise that step to 16px, so their Icon Buttons draw 16px glyphs.
|
|
52
56
|
|
|
53
57
|
## Decorative and named icons
|
|
54
58
|
|
|
@@ -109,7 +113,7 @@ both are set, `icon` wins.
|
|
|
109
113
|
|
|
110
114
|
`icon` also keeps your bundle small. `name` looks up glyphs in an index of the
|
|
111
115
|
whole set, and no bundler can tree-shake that index. If you render one icon by
|
|
112
|
-
`name`, you ship the whole set: 25 kB gzipped, measured November
|
|
116
|
+
`name`, you ship the whole set: 25.5 kB gzipped, measured November 11, 2026. With
|
|
113
117
|
`icon`, you ship only the glyph you import.
|
|
114
118
|
|
|
115
119
|
`icon` also draws glyphs from outside this set. Anything that exports the same
|
|
@@ -136,8 +140,10 @@ The default is bold. `/bold` is the same set, with the weight in its path.
|
|
|
136
140
|
Phosphor's weights are outlined, filled paths. `caret-down` is `a12,12` at bold
|
|
137
141
|
and `a8,8` at regular, so CSS cannot turn one weight into another, and every
|
|
138
142
|
weight offered adds bytes. Bundlers tree-shake a subpath at each import site. A
|
|
139
|
-
`weight` attribute would put every weight into the index that `name` reads
|
|
140
|
-
|
|
143
|
+
`weight` attribute would put every weight into the index that `name` reads. The
|
|
144
|
+
regular set is 23.5 kB gzipped on its own, so the two weights together would
|
|
145
|
+
raise the bundle from 25.5 kB to about 48, and each further Phosphor weight
|
|
146
|
+
would add about as much again.
|
|
141
147
|
|
|
142
148
|
Only the default weight has that index, so `name` always draws bold. To use the
|
|
143
149
|
set in another weight, import the glyphs and pass them to `icon`.
|