@fusion.dev/helix-docs 0.130.0 → 0.132.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/graphs.mdx +27 -0
- package/content/intent-reference.mdx +2 -1
- package/content/metrics.mdx +222 -222
- package/content/theme-builder.mdx +45 -38
- package/dist/sources.generated.js +288 -253
- package/package.json +9 -9
|
@@ -15,53 +15,60 @@ a theme from a few inputs, and the theme builder shows you the result.
|
|
|
15
15
|
|
|
16
16
|
You enter the same inputs that `derive()` takes:
|
|
17
17
|
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
18
|
+
- **Color:** the brand, the color scheme, the contrast target, the saturation,
|
|
19
|
+
the accent angle, and the page's color in light and in dark
|
|
20
|
+
- **Shape and type:** the density, the corner radius, the three faces, the body
|
|
21
|
+
size, and the type scale
|
|
22
|
+
- **Status:** how far the status colors follow the palette, and how far their
|
|
23
|
+
hues may move
|
|
24
|
+
- **Motion, separation, and material:** the motion character, how surfaces are
|
|
25
|
+
set apart, and how floating surfaces are blurred and see-through
|
|
26
|
+
|
|
27
|
+
The theme builder runs the full derivation on every change. It shows a page
|
|
28
|
+
drawn with the theme, and the stylesheet the theme generates beside it.
|
|
29
|
+
|
|
30
|
+
The Color scheme field picks which half you see: light, dark, or the site's own
|
|
31
|
+
mode. See [Color modes](./color-modes).
|
|
32
|
+
|
|
33
|
+
## A page of your own color
|
|
34
|
+
|
|
35
|
+
The Light page and Dark page fields give the page a color, such as a warm cream
|
|
36
|
+
or a deep teal. They start at pure white and pure black, the page Helix draws
|
|
37
|
+
without one. The surfaces keep the contrast with the page they keep with white
|
|
38
|
+
or black, the grays take its tint, and every text color is solved against it. A
|
|
39
|
+
page that no text color can reach the contrast target on is left out of the
|
|
40
|
+
preview, and a caption under the fields says so.
|
|
41
|
+
|
|
42
|
+
## The audit
|
|
43
|
+
|
|
44
|
+
The audit lists every color pair Helix computed. Each pair shows its ratio,
|
|
45
|
+
measured against the background it is painted on, and either passes or fails
|
|
46
|
+
its target. Its three tabs are:
|
|
47
|
+
|
|
48
|
+
- **Contrast.** The pairs that fail, or a line saying that every pair passes.
|
|
49
|
+
- **Collisions.** Colors too close to each other to tell apart, such as the
|
|
50
|
+
primary color and a status color.
|
|
51
|
+
- **Unverifiable.** Pairs whose background is translucent, so there is no known
|
|
52
|
+
color to measure against. This is the cost of a translucent material, and
|
|
53
|
+
the theme builder reports it.
|
|
54
|
+
|
|
55
|
+
## What the theme builder gives you
|
|
56
|
+
|
|
57
|
+
The generated stylesheet is the token block as CSS, to paste into your own
|
|
51
58
|
stylesheet:
|
|
52
59
|
|
|
53
60
|
```css
|
|
54
|
-
|
|
55
|
-
--helix-color-
|
|
61
|
+
[data-theme="preview"] {
|
|
62
|
+
--helix-color-background: #f7f2eb;
|
|
56
63
|
…
|
|
57
64
|
}
|
|
58
65
|
```
|
|
59
66
|
|
|
60
|
-
|
|
61
|
-
theme
|
|
67
|
+
The page's link holds every input you changed, so a link is the theme. To derive
|
|
68
|
+
the theme in your own build, write the same inputs as an intent object:
|
|
62
69
|
|
|
63
70
|
```ts
|
|
64
|
-
export const theme = {
|
|
71
|
+
export const theme = { background: { light: '#f7f2eb' }, brand: '#ff6200' }
|
|
65
72
|
```
|
|
66
73
|
|
|
67
74
|
**Keep the intent object in your repository.** The tokens are the output of a
|