@whatsaaaa/design-system 0.3.1 → 0.5.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/README.md +2 -2
- package/assets/manifest.json +12 -0
- package/assets/whatsaaaa/ghost-on-dark.svg +1 -0
- package/assets/whatsaaaa/ghost-on-light.svg +1 -0
- package/dist/css/base.css +14 -0
- package/dist/css/code.css +18 -0
- package/dist/css/ghost.css +27 -0
- package/dist/css/icons.css +1 -0
- package/dist/css/pairs.css +57 -0
- package/dist/css/segmented.css +71 -0
- package/dist/css/terminal.css +3 -7
- package/dist/css/theme.css +3 -7
- package/dist/ghost/bubble.d.ts +2 -2
- package/dist/ghost/bubble.js +18 -10
- package/dist/ghost/index.d.ts +8 -2
- package/dist/ghost/index.js +50 -10
- package/dist/ghost/svg.d.ts +4 -0
- package/dist/ghost/svg.js +9 -0
- package/dist/index.css +217 -10
- package/dist/shiki/index.d.ts +19 -0
- package/dist/shiki/index.js +25 -0
- package/dist/theme/color.d.ts +3 -3
- package/dist/theme/color.js +4 -4
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.js +17 -5
- package/dist/theme/init.js +1 -1
- package/dist/theme-rules.css +21 -0
- package/dist/tokens.css +48 -3
- package/dist/tokens.d.ts +7 -0
- package/dist/tokens.js +14 -0
- package/dist/vitepress-config/index.js +2 -1
- package/docs/usage.md +118 -36
- package/package.json +2 -1
- package/src/vitepress/Layout.vue +2 -1
- package/src/vitepress/styles/vars.css +2 -2
- package/tokens/contrast.json +18 -0
- package/tokens/core.tokens.json +53 -0
- package/tokens/theme-dark.tokens.json +16 -0
- package/tokens/theme-light.tokens.json +16 -0
package/dist/tokens.js
CHANGED
|
@@ -25,6 +25,8 @@ export const PERMUTATIONS = {
|
|
|
25
25
|
"color.danger-tint":{"$type":"color","$description":"Status danger: block background.","$value":{"colorSpace":"srgb","components":[0.9216,0.4353,0.5725],"alpha":0.09,"hex":"#eb6f92"}},
|
|
26
26
|
"color.field-border":{"$type":"color","$description":"Input and button outlines. At least 3:1 on surface.","$value":{"colorSpace":"srgb","components":[0.4314,0.4157,0.5255],"hex":"#6e6a86","alpha":1}},
|
|
27
27
|
"color.interactive":{"$type":"color","$description":"Links, the focus ring, checked controls and the primary button fill.","$value":{"colorSpace":"srgb","components":[0.6118,0.8118,0.8471],"hex":"#9ccfd8","alpha":1}},
|
|
28
|
+
"color.interactive-active":{"$type":"color","$description":"The interactive fill while it is pressed: 0.1 further from the page in OKLab lightness.","$value":{"colorSpace":"srgb","components":[0.7373,0.9412,0.9765],"hex":"#bcf0f9","alpha":1}},
|
|
29
|
+
"color.interactive-hover":{"$type":"color","$description":"The interactive fill under the pointer, such as a hovered primary button: the interactive color 0.05 further from the page in OKLab lightness.","$value":{"colorSpace":"srgb","components":[0.6745,0.8745,0.9098],"hex":"#acdfe8","alpha":1}},
|
|
28
30
|
"color.note":{"$type":"color","$description":"Status note: bar and icon.","$value":{"colorSpace":"srgb","components":[0.7686,0.6549,0.9059],"hex":"#c4a7e7","alpha":1}},
|
|
29
31
|
"color.note-text":{"$type":"color","$description":"Status note: label text.","$value":{"colorSpace":"srgb","components":[0.7686,0.6549,0.9059],"hex":"#c4a7e7","alpha":1}},
|
|
30
32
|
"color.note-tint":{"$type":"color","$description":"Status note: block background.","$value":{"colorSpace":"srgb","components":[0.7686,0.6549,0.9059],"alpha":0.09,"hex":"#c4a7e7"}},
|
|
@@ -115,11 +117,14 @@ export const PERMUTATIONS = {
|
|
|
115
117
|
"radius.sm":{"$type":"dimension","$description":"Inline code, tags and the focus ring.","$value":{"value":4,"unit":"px"}},
|
|
116
118
|
"radius.xl":{"$type":"dimension","$description":"The terminal frame.","$value":{"value":12,"unit":"px"}},
|
|
117
119
|
"radius.xs":{"$type":"dimension","$description":"Key caps.","$value":{"value":3,"unit":"px"}},
|
|
120
|
+
"size.check":{"$type":"dimension","$description":"A checkbox or a radio button.","$value":{"value":1.25,"unit":"rem"}},
|
|
118
121
|
"size.content":{"$type":"dimension","$description":"Widest a column of long-form text gets, padding included.","$value":{"value":50,"unit":"rem"}},
|
|
122
|
+
"size.control":{"$type":"dimension","$description":"Height of a one-line field, a button and a segmented control.","$value":{"value":2.5,"unit":"rem"}},
|
|
119
123
|
"size.frame":{"$type":"dimension","$description":"Widest a page frame gets.","$value":{"value":90,"unit":"rem"}},
|
|
120
124
|
"size.outline":{"$type":"dimension","$description":"Page outline.","$value":{"value":15,"unit":"rem"}},
|
|
121
125
|
"size.sidebar":{"$type":"dimension","$description":"Side navigation.","$value":{"value":17,"unit":"rem"}},
|
|
122
126
|
"size.status-line":{"$type":"dimension","$description":"Height of the status line.","$value":{"value":2,"unit":"rem"}},
|
|
127
|
+
"size.step":{"$type":"dimension","$description":"The number of a step in its circle.","$value":{"value":1.5,"unit":"rem"}},
|
|
123
128
|
"size.tab-bar":{"$type":"dimension","$description":"Height of the tab bar.","$value":{"value":3,"unit":"rem"}},
|
|
124
129
|
"space.2":{"$type":"dimension","$value":{"value":0.125,"unit":"rem"}},
|
|
125
130
|
"space.4":{"$type":"dimension","$value":{"value":0.25,"unit":"rem"}},
|
|
@@ -159,6 +164,8 @@ export const PERMUTATIONS = {
|
|
|
159
164
|
"text.label-sm":{"$type":"typography","$description":"Side navigation and tags.","$value":{"fontFamily":["JetBrains Mono","ui-monospace","SFMono-Regular","Menlo","Consolas","monospace"],"fontSize":{"value":0.8125,"unit":"rem"},"fontWeight":400,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"rem"}}},
|
|
160
165
|
"text.lead":{"$type":"typography","$description":"The first paragraph of a page.","$value":{"fontFamily":["Inter","system-ui","-apple-system","Segoe UI","sans-serif"],"fontSize":{"value":1.0625,"unit":"rem"},"fontWeight":400,"lineHeight":1.75,"letterSpacing":{"value":0,"unit":"rem"}}},
|
|
161
166
|
"text.overline":{"$type":"typography","$description":"Group headings and table heads. Set in uppercase.","$value":{"fontFamily":["JetBrains Mono","ui-monospace","SFMono-Regular","Menlo","Consolas","monospace"],"fontSize":{"value":0.6875,"unit":"rem"},"fontWeight":700,"lineHeight":1.5,"letterSpacing":{"value":0.06875,"unit":"rem"}}},
|
|
167
|
+
"text.tagline":{"$type":"typography","$description":"The line under the display name on a home page.","$value":{"fontFamily":["Inter","system-ui","-apple-system","Segoe UI","sans-serif"],"fontSize":{"value":1.25,"unit":"rem"},"fontWeight":500,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"rem"}}},
|
|
168
|
+
"text.tagline-compact":{"$type":"typography","$description":"The tagline on phones.","$value":{"fontFamily":["Inter","system-ui","-apple-system","Segoe UI","sans-serif"],"fontSize":{"value":1.125,"unit":"rem"},"fontWeight":500,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"rem"}}},
|
|
162
169
|
},
|
|
163
170
|
"{\"theme\":\"light\"}": {
|
|
164
171
|
"border-width.medium":{"$type":"dimension","$description":"Active markers and the focus ring.","$value":{"value":2,"unit":"px"}},
|
|
@@ -183,6 +190,8 @@ export const PERMUTATIONS = {
|
|
|
183
190
|
"color.danger-tint":{"$type":"color","$description":"Status danger: block background.","$value":{"colorSpace":"srgb","components":[0.7059,0.3882,0.4784],"alpha":0.09,"hex":"#b4637a"}},
|
|
184
191
|
"color.field-border":{"$type":"color","$description":"Input and button outlines. At least 3:1 on surface.","$value":{"colorSpace":"srgb","components":[0.4745,0.4588,0.5765],"hex":"#797593","alpha":1}},
|
|
185
192
|
"color.interactive":{"$type":"color","$description":"Links, the focus ring, checked controls and the primary button fill.","$value":{"colorSpace":"srgb","components":[0.1569,0.4118,0.5137],"hex":"#286983","alpha":1}},
|
|
193
|
+
"color.interactive-active":{"$type":"color","$description":"The interactive fill while it is pressed: 0.1 further from the page in OKLab lightness.","$value":{"colorSpace":"srgb","components":[0,0.302,0.3961],"hex":"#004d65","alpha":1}},
|
|
194
|
+
"color.interactive-hover":{"$type":"color","$description":"The interactive fill under the pointer, such as a hovered primary button: the interactive color 0.05 further from the page in OKLab lightness.","$value":{"colorSpace":"srgb","components":[0.0863,0.3569,0.4549],"hex":"#165b74","alpha":1}},
|
|
186
195
|
"color.note":{"$type":"color","$description":"Status note: bar and icon.","$value":{"colorSpace":"srgb","components":[0.5647,0.4784,0.6627],"hex":"#907aa9","alpha":1}},
|
|
187
196
|
"color.note-text":{"$type":"color","$description":"Status note: label text.","$value":{"colorSpace":"srgb","components":[0.3412,0.3216,0.4745],"hex":"#575279","alpha":1}},
|
|
188
197
|
"color.note-tint":{"$type":"color","$description":"Status note: block background.","$value":{"colorSpace":"srgb","components":[0.5647,0.4784,0.6627],"alpha":0.09,"hex":"#907aa9"}},
|
|
@@ -273,11 +282,14 @@ export const PERMUTATIONS = {
|
|
|
273
282
|
"radius.sm":{"$type":"dimension","$description":"Inline code, tags and the focus ring.","$value":{"value":4,"unit":"px"}},
|
|
274
283
|
"radius.xl":{"$type":"dimension","$description":"The terminal frame.","$value":{"value":12,"unit":"px"}},
|
|
275
284
|
"radius.xs":{"$type":"dimension","$description":"Key caps.","$value":{"value":3,"unit":"px"}},
|
|
285
|
+
"size.check":{"$type":"dimension","$description":"A checkbox or a radio button.","$value":{"value":1.25,"unit":"rem"}},
|
|
276
286
|
"size.content":{"$type":"dimension","$description":"Widest a column of long-form text gets, padding included.","$value":{"value":50,"unit":"rem"}},
|
|
287
|
+
"size.control":{"$type":"dimension","$description":"Height of a one-line field, a button and a segmented control.","$value":{"value":2.5,"unit":"rem"}},
|
|
277
288
|
"size.frame":{"$type":"dimension","$description":"Widest a page frame gets.","$value":{"value":90,"unit":"rem"}},
|
|
278
289
|
"size.outline":{"$type":"dimension","$description":"Page outline.","$value":{"value":15,"unit":"rem"}},
|
|
279
290
|
"size.sidebar":{"$type":"dimension","$description":"Side navigation.","$value":{"value":17,"unit":"rem"}},
|
|
280
291
|
"size.status-line":{"$type":"dimension","$description":"Height of the status line.","$value":{"value":2,"unit":"rem"}},
|
|
292
|
+
"size.step":{"$type":"dimension","$description":"The number of a step in its circle.","$value":{"value":1.5,"unit":"rem"}},
|
|
281
293
|
"size.tab-bar":{"$type":"dimension","$description":"Height of the tab bar.","$value":{"value":3,"unit":"rem"}},
|
|
282
294
|
"space.2":{"$type":"dimension","$value":{"value":0.125,"unit":"rem"}},
|
|
283
295
|
"space.4":{"$type":"dimension","$value":{"value":0.25,"unit":"rem"}},
|
|
@@ -317,6 +329,8 @@ export const PERMUTATIONS = {
|
|
|
317
329
|
"text.label-sm":{"$type":"typography","$description":"Side navigation and tags.","$value":{"fontFamily":["JetBrains Mono","ui-monospace","SFMono-Regular","Menlo","Consolas","monospace"],"fontSize":{"value":0.8125,"unit":"rem"},"fontWeight":400,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"rem"}}},
|
|
318
330
|
"text.lead":{"$type":"typography","$description":"The first paragraph of a page.","$value":{"fontFamily":["Inter","system-ui","-apple-system","Segoe UI","sans-serif"],"fontSize":{"value":1.0625,"unit":"rem"},"fontWeight":400,"lineHeight":1.75,"letterSpacing":{"value":0,"unit":"rem"}}},
|
|
319
331
|
"text.overline":{"$type":"typography","$description":"Group headings and table heads. Set in uppercase.","$value":{"fontFamily":["JetBrains Mono","ui-monospace","SFMono-Regular","Menlo","Consolas","monospace"],"fontSize":{"value":0.6875,"unit":"rem"},"fontWeight":700,"lineHeight":1.5,"letterSpacing":{"value":0.06875,"unit":"rem"}}},
|
|
332
|
+
"text.tagline":{"$type":"typography","$description":"The line under the display name on a home page.","$value":{"fontFamily":["Inter","system-ui","-apple-system","Segoe UI","sans-serif"],"fontSize":{"value":1.25,"unit":"rem"},"fontWeight":500,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"rem"}}},
|
|
333
|
+
"text.tagline-compact":{"$type":"typography","$description":"The tagline on phones.","$value":{"fontFamily":["Inter","system-ui","-apple-system","Segoe UI","sans-serif"],"fontSize":{"value":1.125,"unit":"rem"},"fontWeight":500,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"rem"}}},
|
|
320
334
|
},
|
|
321
335
|
};
|
|
322
336
|
const INPUT_DEFAULTS = {"theme":"dark"};
|
|
@@ -5,7 +5,8 @@ import { whatsaaaaMarkdown } from "./markdown.js";
|
|
|
5
5
|
export { whatsaaaaMarkdown } from "./markdown.js";
|
|
6
6
|
/**
|
|
7
7
|
* Sets data-theme before the first paint, from the choice VitePress remembers.
|
|
8
|
-
* VitePress itself only sets its `dark` class, which the tokens
|
|
8
|
+
* VitePress itself only sets its `dark` class, and no class for light, which the tokens would
|
|
9
|
+
* read as the system's theme.
|
|
9
10
|
* Where storage is blocked nothing is remembered, and the page follows the system.
|
|
10
11
|
*/
|
|
11
12
|
const themeScript = `;(() => {
|
package/docs/usage.md
CHANGED
|
@@ -18,18 +18,20 @@ One import has everything: fonts, tokens, page defaults and every class.
|
|
|
18
18
|
|
|
19
19
|
Or take pieces. `tokens.css` and `fonts.css` first, then what you use:
|
|
20
20
|
|
|
21
|
-
| Import
|
|
22
|
-
|
|
|
23
|
-
| `@whatsaaaa/design-system/tokens.css`
|
|
24
|
-
| `@whatsaaaa/design-system/fonts.css`
|
|
25
|
-
| `@whatsaaaa/design-system/css/base.css`
|
|
26
|
-
| `@whatsaaaa/design-system/css/prose.css`
|
|
27
|
-
| `@whatsaaaa/design-system/css/code.css`
|
|
28
|
-
| `@whatsaaaa/design-system/css/callout.css`
|
|
29
|
-
| `@whatsaaaa/design-system/css/
|
|
30
|
-
| `@whatsaaaa/design-system/css/
|
|
31
|
-
| `@whatsaaaa/design-system/css/
|
|
32
|
-
| `@whatsaaaa/design-system/css/
|
|
21
|
+
| Import | What it has |
|
|
22
|
+
| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
23
|
+
| `@whatsaaaa/design-system/tokens.css` | Every token as a CSS variable, for both themes |
|
|
24
|
+
| `@whatsaaaa/design-system/fonts.css` | JetBrains Mono and Inter, self-hosted, with Serbian Latin |
|
|
25
|
+
| `@whatsaaaa/design-system/css/base.css` | Page defaults. It resets margins and list markers |
|
|
26
|
+
| `@whatsaaaa/design-system/css/prose.css` | Long-form text, in a `.ws-prose` container |
|
|
27
|
+
| `@whatsaaaa/design-system/css/code.css` | `.ws-code`, a code block with a caption |
|
|
28
|
+
| `@whatsaaaa/design-system/css/callout.css` | `.ws-callout` |
|
|
29
|
+
| `@whatsaaaa/design-system/css/segmented.css` | `.ws-segmented`, buttons in a row with one pressed |
|
|
30
|
+
| `@whatsaaaa/design-system/css/pairs.css` | `.ws-pairs`, terms and their values, such as an order summary |
|
|
31
|
+
| `@whatsaaaa/design-system/css/terminal.css` | Tab bar, prompts, status line, key caps, tags. It brings `theme.css` along |
|
|
32
|
+
| `@whatsaaaa/design-system/css/theme.css` | `ws-theme-dark` and `ws-theme-light`, for an element of one theme only |
|
|
33
|
+
| `@whatsaaaa/design-system/css/ghost.css` | Styles of `<ws-ghost>` |
|
|
34
|
+
| `@whatsaaaa/design-system/css/icons.css` | The icons the callouts and prompts draw, and `--ws-icon-check`, the tick of a form. Needed with `callout.css` and `terminal.css`, and for the tick |
|
|
33
35
|
|
|
34
36
|
Everything is prefixed: classes with `ws-`, variables with `--ws-`.
|
|
35
37
|
|
|
@@ -37,20 +39,21 @@ Everything is prefixed: classes with `ws-`, variables with `--ws-`.
|
|
|
37
39
|
|
|
38
40
|
Use the role tokens. Never write a hex value, and never use a `--ws-palette-*` color for interface: a role changes with the theme and carries the contrast rules, the palette does not.
|
|
39
41
|
|
|
40
|
-
| For
|
|
41
|
-
|
|
|
42
|
-
| Page background
|
|
43
|
-
| Panels and cards
|
|
44
|
-
| Inline code, hover, current item
|
|
45
|
-
| Dividers
|
|
46
|
-
| Outlines of inputs and buttons
|
|
47
|
-
| Text
|
|
48
|
-
| Secondary text
|
|
49
|
-
| Disabled text, idle marks
|
|
50
|
-
| Brand accent
|
|
51
|
-
| Links, focus ring, primary button
|
|
52
|
-
|
|
|
53
|
-
|
|
|
42
|
+
| For | Token |
|
|
43
|
+
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
44
|
+
| Page background | `--ws-color-bg` |
|
|
45
|
+
| Panels and cards | `--ws-color-surface` |
|
|
46
|
+
| Inline code, hover, current item | `--ws-color-raised` |
|
|
47
|
+
| Dividers | `--ws-color-border` |
|
|
48
|
+
| Outlines of inputs and buttons | `--ws-color-field-border` |
|
|
49
|
+
| Text | `--ws-color-text` |
|
|
50
|
+
| Secondary text | `--ws-color-text-secondary` |
|
|
51
|
+
| Disabled text, idle marks | `--ws-color-text-faint` |
|
|
52
|
+
| Brand accent | `--ws-color-brand` |
|
|
53
|
+
| Links, focus ring, primary button | `--ws-color-interactive`, with `--ws-color-on-interactive` for text on it |
|
|
54
|
+
| Primary button, hovered or pressed | `--ws-color-interactive-hover`, `--ws-color-interactive-active` |
|
|
55
|
+
| Tags | `--ws-color-tag-text` on `--ws-color-tag-bg` |
|
|
56
|
+
| Status | `--ws-color-tip`, `-note`, `-warning`, `-danger`: each with `-text` for its label and `-tint` for its background |
|
|
54
57
|
|
|
55
58
|
Rules:
|
|
56
59
|
|
|
@@ -66,7 +69,7 @@ The pairs that are checked for contrast are in `tokens/contrast.json`. If you ne
|
|
|
66
69
|
|
|
67
70
|
## 3. Theme
|
|
68
71
|
|
|
69
|
-
Dark is the default. Light applies when the system asks for it. `data-theme="dark"` or `data-theme="light"` on `<html>` overrides the system. Do not write your own `prefers-color-scheme` rules: the tokens already switch, and an element that has to differ by theme takes a class.
|
|
72
|
+
Dark is the default. Light applies when the system asks for it. `data-theme="dark"` or `data-theme="light"` on `<html>` overrides the system, and so does a `dark` or `light` class, as Nuxt UI and VueUse's `useColorMode` set it. A library that marks light only by leaving `dark` off, such as the toggle script in Tailwind's docs or VueUse's `useDark`, needs a `light` class kept in step with it: on when light is chosen, off for dark or the system. For Tailwind's script that is `classList.toggle('light', localStorage.theme === 'light')` next to its toggle of `dark`. With no class the system decides. Do not write your own `prefers-color-scheme` rules: the tokens already switch, and an element that has to differ by theme takes a class.
|
|
70
73
|
|
|
71
74
|
```ts
|
|
72
75
|
import { getTheme, setTheme, toggleTheme, themeInitScript } from '@whatsaaaa/design-system/theme'
|
|
@@ -77,7 +80,7 @@ setTheme('system') // follows the system again
|
|
|
77
80
|
|
|
78
81
|
Run the head script before the stylesheet, so a remembered choice applies before the first paint. Inline `themeInitScript` in a `<script>`, or load it as a file: `<script src=".../theme/init.js"></script>`. It is a plain script, not a module.
|
|
79
82
|
|
|
80
|
-
The browser's own bars, such as a phone's address bar, take the background of the theme shown, `--ws-color-bg`. The head script keeps `<meta name="theme-color">` at it from the first paint on, when the theme is chosen by hand, with `setTheme`, `toggleTheme` or anything else that sets `data-theme
|
|
83
|
+
The browser's own bars, such as a phone's address bar, take the background of the theme shown, `--ws-color-bg`. The head script keeps `<meta name="theme-color">` at it from the first paint on, when the theme is chosen by hand, with `setTheme`, `toggleTheme` or anything else that sets `data-theme` or the class of `<html>`, and when the system's theme changes. A page that has no theme-color tag gets one, so the head needs no tag of its own and no color in it:
|
|
81
84
|
|
|
82
85
|
```html
|
|
83
86
|
<head>
|
|
@@ -91,7 +94,7 @@ The browser's own bars, such as a phone's address bar, take the background of th
|
|
|
91
94
|
|
|
92
95
|
A theme-color tag that is there, with or without `media`, takes the theme's color too. Do not set it from a script of your own. A docs site gets the same script from the base config of the docs theme.
|
|
93
96
|
|
|
94
|
-
An element for one theme only, such as a cut of a mark, takes `ws-theme-dark` or `ws-theme-light`. Put both in the page and the styles show the one of the theme in effect where it stands: the nearest `data-theme
|
|
97
|
+
An element for one theme only, such as a cut of a mark, takes `ws-theme-dark` or `ws-theme-light`. Put both in the page and the styles show the one of the theme in effect where it stands: the nearest `data-theme` or `dark` or `light` class, on `<html>` or on an element around it, or the system's theme. So the right one shows before any script runs. Do not swap them from a script.
|
|
95
98
|
|
|
96
99
|
```html
|
|
97
100
|
<img class="ws-theme-dark" src="mark-on-dark.svg" alt="whatsaaaa" width="32" height="32" />
|
|
@@ -100,7 +103,15 @@ An element for one theme only, such as a cut of a mark, takes `ws-theme-dark` or
|
|
|
100
103
|
|
|
101
104
|
On a page with a status line, its theme button is the theme switch at every width: see [the status line](#status-line).
|
|
102
105
|
|
|
103
|
-
`data-theme` also works on any element, to keep a part of a page in one theme.
|
|
106
|
+
`data-theme` also works on any element, to keep a part of a page in one theme, and so does the class. Where they meet:
|
|
107
|
+
|
|
108
|
+
- On one element, `data-theme` wins over the class. An element with both the `dark` and the `light` class chooses nothing.
|
|
109
|
+
- The nearest choice around an element holds for it, made either way: a `light` part in a page with `data-theme="dark"` is light.
|
|
110
|
+
- Any choice, the attribute or the class, wins over the system's theme.
|
|
111
|
+
|
|
112
|
+
So a `dark` or `light` class you give an element for something else puts what is inside it in that theme. Use another name for it.
|
|
113
|
+
|
|
114
|
+
`setTheme` and `toggleTheme` write `data-theme`, and `getTheme` reads it, then the class of `<html>`. In an app whose color mode library owns the class, such as Nuxt UI or `useColorMode`, switch the theme with the library and leave `data-theme` alone: do not call `setTheme` or `toggleTheme`, because the attribute they write wins over the library's class from then on. Keep the head script for the browser's bars. With nothing remembered under `ws-theme` it sets no `data-theme`, and it follows the class. So do not give the library that storage key. An app that called `setTheme` or `toggleTheme` before, such as from a script that bridged the two, has visitors with a choice still remembered there. Remove it before the head script runs, with `localStorage.removeItem('ws-theme')`, or the `data-theme` the head script sets from it wins over the library's class on every load.
|
|
104
115
|
|
|
105
116
|
## 4. Type
|
|
106
117
|
|
|
@@ -115,13 +126,14 @@ Use a text style, not a size. A style is two lines:
|
|
|
115
126
|
}
|
|
116
127
|
```
|
|
117
128
|
|
|
118
|
-
Styles: `display`, `h1`, `h2`, `h3`, `h4`, `lead`, `body`, `body-sm`, `label`, `label-sm`, `caption`, `overline` (set it in uppercase) and `code`. Below 64rem use `display-compact`, `h1-compact` and `
|
|
129
|
+
Styles: `display`, `h1`, `h2`, `h3`, `h4`, `tagline` (the line under the display name), `lead`, `body`, `body-sm`, `label`, `label-sm`, `caption`, `overline` (set it in uppercase) and `code`. Below 64rem use `display-compact`, `h1-compact`, `h2-compact` and `tagline-compact`.
|
|
119
130
|
|
|
120
131
|
Do not load other fonts, and do not load these from a CDN. Set `font-variant-ligatures: none` on anything that shows code.
|
|
121
132
|
|
|
122
133
|
## 5. Space, radius, motion
|
|
123
134
|
|
|
124
135
|
- Space: `--ws-space-2` to `--ws-space-64`, named by px, set in rem. Use them for padding, margin and gap.
|
|
136
|
+
- Sizes: `--ws-size-control` (40 px) is the height of a one-line field, a button and a segmented control. `--ws-size-check` (20 px) is a checkbox or a radio button and `--ws-size-step` (24 px) the circle of a step number. Use them for those, not a space token.
|
|
125
137
|
- Radius: `--ws-radius-xs` (key caps), `-sm` (inline code, tags), `-md` (inputs, buttons), `-lg` (blocks, cards), `-xl` (the window), `-full` (dots).
|
|
126
138
|
- Borders, not shadows: `--ws-border-width-thin`, `-medium`, `-thick`.
|
|
127
139
|
- Motion: `--ws-motion-duration-fast`, `-base`, `-slow` with `--ws-motion-easing-standard`. Wrap movement in `@media (prefers-reduced-motion: no-preference)`.
|
|
@@ -130,10 +142,11 @@ Do not load other fonts, and do not load these from a CDN. Set `font-variant-lig
|
|
|
130
142
|
## 6. Classes
|
|
131
143
|
|
|
132
144
|
- Long-form text: put rendered Markdown in `<article class="ws-prose">`. Wrap a table in `<div class="ws-table">` so it scrolls inside itself, and give a cell of running text `class="ws-table__text"` so a narrow frame scrolls instead of squeezing it. A first cell stays on one line unless it has that class. The docs theme does both.
|
|
133
|
-
- Code block with a caption: `<figure class="ws-code"><figcaption><span>file.ts</span><span>ts</span></figcaption><pre><code>...</code></pre></figure>`. For highlighting, use Shiki with `codeTheme` from `@whatsaaaa/design-system/shiki`.
|
|
145
|
+
- Code block with a caption: `<figure class="ws-code"><figcaption><span>file.ts</span><span>ts</span></figcaption><pre><code>...</code></pre></figure>`. For highlighting, use Shiki with `codeTheme` from `@whatsaaaa/design-system/shiki`. See [code blocks](#code-blocks).
|
|
134
146
|
- Callout: `<aside class="ws-callout ws-callout--warning"><p class="ws-callout__title">Warning</p><p>...</p></aside>`. Modifiers: `--tip`, `--warning`, `--danger`. None is a note.
|
|
135
147
|
- Terminal frame: `ws-term` (the window), `ws-tab-bar` with `ws-tab-bar__brand`, `ws-tabs` and `ws-tab-bar__end`, `ws-prompt` for headings, `ws-output`, `ws-status-line`. Mark the current tab with `aria-current="page"`.
|
|
136
148
|
- Small pieces: `ws-kbd`, `ws-tag`, `ws-tag--outline`, `ws-state` with `--active` or `--experimental`, `ws-arrow`, `ws-cursor`, and `ws-visually-hidden` for text that only assistive technology reads.
|
|
149
|
+
- Forms: `ws-segmented` and `ws-pairs`. See [forms](#forms).
|
|
137
150
|
|
|
138
151
|
The markup of each piece is in the comment at the top of its stylesheet, and in the style guide.
|
|
139
152
|
|
|
@@ -160,6 +173,71 @@ The markup of each piece is in the comment at the top of its stylesheet, and in
|
|
|
160
173
|
- An item for wide screens only takes `ws-status-line__item--wide`, and one with a border on its left `ws-status-line__item--edge`.
|
|
161
174
|
- A focus ring in the window's bars is drawn inside its control, so neither the bars nor the window's corners cut it off. A control of your own in a bar does the same: `outline-offset: calc(-1 * var(--ws-border-width-medium))`.
|
|
162
175
|
|
|
176
|
+
### Forms
|
|
177
|
+
|
|
178
|
+
The system draws no fields and no buttons: draw them from the roles, with these.
|
|
179
|
+
|
|
180
|
+
- **One height.** A one-line field, a button and a segmented control are `--ws-size-control` tall. A checkbox or a radio button is `--ws-size-check`, a step number's circle `--ws-size-step`.
|
|
181
|
+
- **The primary button** is filled with `--ws-color-interactive`, its label `--ws-color-on-interactive`. Under the pointer it takes `--ws-color-interactive-hover`, while pressed `--ws-color-interactive-active`. Do not mix a hover color of your own.
|
|
182
|
+
- **A tick** is `--ws-icon-check` from `css/icons.css`, a mask like the other icons: a ticked box, a done step, a sent form. Draw it at 1rem in `currentcolor`, or `--ws-color-on-interactive` on a checked box.
|
|
183
|
+
- **A number field has no spin buttons.** `base.css` hides the browser's own, and the arrow keys still step the value. Without `base.css`, hide them the same way: `appearance: textfield` on the field, and `appearance: none` on its `::-webkit-inner-spin-button` and `::-webkit-outer-spin-button`.
|
|
184
|
+
|
|
185
|
+
A **segmented control** is a few buttons with one pressed, such as a switch between the languages of a page:
|
|
186
|
+
|
|
187
|
+
```html
|
|
188
|
+
<div class="ws-segmented" role="group" aria-label="Language">
|
|
189
|
+
<button type="button" aria-pressed="true" lang="en">English</button>
|
|
190
|
+
<button type="button" aria-pressed="false" lang="sr">Srpski</button>
|
|
191
|
+
</div>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
- Give the group a name with `aria-label`, and each button `aria-pressed`. Pressing a button presses it and releases the one that was pressed. Pressing the pressed one does nothing.
|
|
195
|
+
- Keys: each button is a stop of the Tab key, and Enter or Space presses it. No arrow keys: those belong to a radio group. A choice that is a value of a form, sent with it, is a group of radio buttons, not this.
|
|
196
|
+
- The pressed button is raised, in the text color, with an edge of the interactive color twice as thick, at least 3:1 on the page and on the raised fill. In forced colors it takes the system's selection colors. Do not fill it with the interactive color: next to a primary button it would be as loud.
|
|
197
|
+
|
|
198
|
+
**Terms and values**, a row each, are a `<dl class="ws-pairs">`: the answers of a form on its review step. The term is in the voice of a label, its value in the face of a field. The terms share a column as wide as the longest of them, at most two fifths of the row, so the values line up and have the rest of it. With `ws-pairs--amounts` the amounts take what the widest of them needs, and the terms the rest of the row. A long value wraps: give a long email or URL a `<wbr />` after its `@` or a `/`, so it breaks there. A value that still does not fit breaks anywhere, as a last resort.
|
|
199
|
+
|
|
200
|
+
```html
|
|
201
|
+
<dl class="ws-pairs ws-pairs--amounts">
|
|
202
|
+
<div>
|
|
203
|
+
<dt>2 × workshop ticket</dt>
|
|
204
|
+
<dd>€96.00</dd>
|
|
205
|
+
</div>
|
|
206
|
+
<div>
|
|
207
|
+
<dt>Lunch</dt>
|
|
208
|
+
<dd>€12.50</dd>
|
|
209
|
+
</div>
|
|
210
|
+
<div>
|
|
211
|
+
<dt>Booking fee</dt>
|
|
212
|
+
<dd>€1.00</dd>
|
|
213
|
+
</div>
|
|
214
|
+
<div class="ws-pairs__total">
|
|
215
|
+
<dt>Total</dt>
|
|
216
|
+
<dd>€109.50</dd>
|
|
217
|
+
</div>
|
|
218
|
+
</dl>
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
- `ws-pairs--amounts` is for money and other numbers: each value at the right edge, in figures of one width, so the digits of the rows line up. Write each amount whole, with its currency and the same number of decimals.
|
|
222
|
+
- `ws-pairs__total` is the last row: set off by a solid rule, and semibold.
|
|
223
|
+
|
|
224
|
+
### Code blocks
|
|
225
|
+
|
|
226
|
+
- **A block scrolls sideways.** One that shows what a person typed, which a phone would cut off, takes `ws-code--wrap` and wraps its lines instead.
|
|
227
|
+
- **Its lines hang.** When each line is a `<span class="line">` with `--ws-code-hang`, its indent in characters plus two, the rest of a wrapped line starts one level in from the line's own text. With Shiki, the `hangingIndent` transformer gives each line its own:
|
|
228
|
+
|
|
229
|
+
```ts
|
|
230
|
+
import { codeTheme, hangingIndent } from '@whatsaaaa/design-system/shiki'
|
|
231
|
+
|
|
232
|
+
const html = highlighter.codeToHtml(json, {
|
|
233
|
+
lang: 'json',
|
|
234
|
+
theme: codeTheme,
|
|
235
|
+
transformers: [hangingIndent()],
|
|
236
|
+
})
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
- **Shiki is large.** With one language and the JavaScript engine it is about 40 KB gzipped, enough to push a small app past a bundler's chunk warning. When code blocks are not on the first screen, load it when a block needs it, with a dynamic `import()` of `shiki/core`, its JavaScript engine and the languages you use, so it is a chunk of its own: show the code as plain text in `--ws-code-text` first, and the colors when they arrive. For one small language, such as the JSON a form sends, a tokenizer of your own that colors with the `--ws-syntax-*` tokens needs no Shiki at all.
|
|
240
|
+
|
|
163
241
|
## 7. Keys
|
|
164
242
|
|
|
165
243
|
A key hint in a status line has to work. Put `data-ws-key` on the control the key presses, give the status line the keys switch, and turn the shortcuts on:
|
|
@@ -201,14 +279,15 @@ The switch is not optional. The keys are single characters that act on the whole
|
|
|
201
279
|
## 8. The ghost
|
|
202
280
|
|
|
203
281
|
```ts
|
|
204
|
-
import { defineGhost, ghostMarkup, ghostSvg } from '@whatsaaaa/design-system/ghost'
|
|
282
|
+
import { defineGhost, ghostElement, ghostMarkup, ghostSvg } from '@whatsaaaa/design-system/ghost'
|
|
205
283
|
|
|
206
284
|
defineGhost() // registers <ws-ghost>, in the browser
|
|
207
285
|
```
|
|
208
286
|
|
|
209
|
-
- `<ws-ghost px="6"></ws-ghost>` is the ghost with the easter egg. Render `ghostMarkup({ px: 6 })` inside it on the server.
|
|
210
|
-
- `ghostSvg({ px: 2 })` is the ghost as a picture, for a link or a decoration.
|
|
211
|
-
- `
|
|
287
|
+
- `<ws-ghost px="6"></ws-ghost>` is the ghost with the easter egg. Render `ghostMarkup({ px: 6 })` inside it on the server. It fills itself in when it is empty, and draws its speech bubble, without setting `innerHTML`.
|
|
288
|
+
- `ghostSvg({ px: 2 })` is the ghost as a picture, for a link or a decoration. `ghostElement({ px: 2 })` is the same picture as an element, for a script that adds it with `append`.
|
|
289
|
+
- In a component, where markup would need `innerHTML`, `v-html` or `dangerouslySetInnerHTML`, take the files instead: `ghost-on-dark.svg` and `ghost-on-light.svg`, the ghost without the margin of its grid, 20 by 24. Put both in, with `ws-theme-dark` and `ws-theme-light`.
|
|
290
|
+
- `px` is the size of one sprite pixel. Use whole numbers. A large ghost, such as the one next to the display name, takes `compact-px="4"` too: its size below 64rem, from 1 to 5.
|
|
212
291
|
|
|
213
292
|
Do not recolor the ghost, do not draw on it, do not rotate or stretch it, and do not redraw it. Its tongue is always the brand color. On a project's site the ghost links to the handle's site, and the project's own sprite is the logo.
|
|
214
293
|
|
|
@@ -221,6 +300,7 @@ Generated files are in `assets/<name>/`, for `whatsaaaa` and for each project. `
|
|
|
221
300
|
| Favicon | `favicon.ico`, `favicon.svg`, `apple-touch-icon.png`. `icon-192.png` and `icon-512.png` for a manifest |
|
|
222
301
|
| Logo on any background | `mark.svg` |
|
|
223
302
|
| Logo in a header | `mark-on-dark.svg`, `mark-on-light.svg`, or `mark-mono.svg` to take the text color |
|
|
303
|
+
| The ghost in a link | `ghost-on-dark.svg`, `ghost-on-light.svg`, the handle's only |
|
|
224
304
|
| Name | `wordmark-dark.svg`, `wordmark-light.svg` |
|
|
225
305
|
| Logo with name | `lockup-dark.svg`, `lockup-light.svg` |
|
|
226
306
|
| Top of a README | `readme-header.svg` |
|
|
@@ -229,6 +309,8 @@ Generated files are in `assets/<name>/`, for `whatsaaaa` and for each project. `
|
|
|
229
309
|
|
|
230
310
|
Copy the files you need into the project. Show a mark at 16, 32, 48 or 64 px, where its pixels are sharp.
|
|
231
311
|
|
|
312
|
+
A mark's box is its whole 16 by 16 grid, with the empty pixels around the sprite. A project's sprite leaves two columns empty on each side, an eighth of the width, so at 32 px its pixels start 4 px inside the box. To put them on an edge, such as the edge the content of a page starts at, pull the image out by that much: `margin-inline: calc(-1 * var(--ws-space-4))` at 32 px. The ghost's files have no margin.
|
|
313
|
+
|
|
232
314
|
Never edit a file in `assets/`. To change artwork, change its source and run `pnpm assets` in this repository. For a project that has no kit yet, add a file like `identity/projects/form-builder.json` first.
|
|
233
315
|
|
|
234
316
|
## 10. Docs sites
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whatsaaaa/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Whatsaaaa's design system: brand identity, design tokens, typography, docs theme and asset kit",
|
|
5
5
|
"homepage": "https://github.com/whatsaaaa/design-system#readme",
|
|
6
6
|
"bugs": "https://github.com/whatsaaaa/design-system/issues",
|
|
@@ -103,6 +103,7 @@
|
|
|
103
103
|
"png-to-ico": "^3.0.2",
|
|
104
104
|
"postcss-html": "^2.0.0",
|
|
105
105
|
"publint": "^0.3.25",
|
|
106
|
+
"shiki": "^2.5.0",
|
|
106
107
|
"stylelint": "^18.0.0",
|
|
107
108
|
"stylelint-config-standard": "^41.0.0",
|
|
108
109
|
"stylelint-value-no-unknown-custom-properties": "^6.1.1",
|
package/src/vitepress/Layout.vue
CHANGED
|
@@ -14,7 +14,8 @@ const { isDark } = useData()
|
|
|
14
14
|
/** The slots this layout fills itself. A site's content for them goes inside, next to the theme's. */
|
|
15
15
|
const OWN_SLOTS = ['nav-bar-content-after', 'doc-before', 'not-found', 'layout-bottom']
|
|
16
16
|
|
|
17
|
-
// VitePress marks dark with a class on <html
|
|
17
|
+
// VitePress marks dark with a dark class on <html> and light with no class, which the tokens
|
|
18
|
+
// read as the system's theme. So data-theme says both.
|
|
18
19
|
watchEffect(() => {
|
|
19
20
|
if (inBrowser) document.documentElement.dataset.theme = isDark.value ? 'dark' : 'light'
|
|
20
21
|
})
|
|
@@ -118,10 +118,10 @@
|
|
|
118
118
|
--vp-button-brand-bg: var(--ws-color-interactive);
|
|
119
119
|
--vp-button-brand-hover-border: transparent;
|
|
120
120
|
--vp-button-brand-hover-text: var(--ws-color-on-interactive);
|
|
121
|
-
--vp-button-brand-hover-bg: var(--ws-color-interactive);
|
|
121
|
+
--vp-button-brand-hover-bg: var(--ws-color-interactive-hover);
|
|
122
122
|
--vp-button-brand-active-border: transparent;
|
|
123
123
|
--vp-button-brand-active-text: var(--ws-color-on-interactive);
|
|
124
|
-
--vp-button-brand-active-bg: var(--ws-color-interactive);
|
|
124
|
+
--vp-button-brand-active-bg: var(--ws-color-interactive-active);
|
|
125
125
|
--vp-button-alt-border: var(--ws-color-field-border);
|
|
126
126
|
--vp-button-alt-text: var(--ws-color-text);
|
|
127
127
|
--vp-button-alt-bg: transparent;
|
package/tokens/contrast.json
CHANGED
|
@@ -97,6 +97,24 @@
|
|
|
97
97
|
"min": 4.5,
|
|
98
98
|
"use": "The label of a primary button"
|
|
99
99
|
},
|
|
100
|
+
{
|
|
101
|
+
"foreground": "color.on-interactive",
|
|
102
|
+
"background": "color.interactive-hover",
|
|
103
|
+
"min": 4.5,
|
|
104
|
+
"use": "The label of a primary button under the pointer"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"foreground": "color.on-interactive",
|
|
108
|
+
"background": "color.interactive-active",
|
|
109
|
+
"min": 4.5,
|
|
110
|
+
"use": "The label of a primary button while it is pressed"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"foreground": "color.interactive",
|
|
114
|
+
"background": "color.raised",
|
|
115
|
+
"min": 3,
|
|
116
|
+
"use": "The edge of a pressed segment"
|
|
117
|
+
},
|
|
100
118
|
{ "foreground": "color.tag-text", "background": "color.tag-bg", "min": 4.5, "use": "Tags" },
|
|
101
119
|
{
|
|
102
120
|
"foreground": "color.tip",
|
package/tokens/core.tokens.json
CHANGED
|
@@ -271,6 +271,38 @@
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
},
|
|
274
|
+
"tagline": {
|
|
275
|
+
"$description": "The line under the display name on a home page.",
|
|
276
|
+
"$value": {
|
|
277
|
+
"fontFamily": "{font.family.sans}",
|
|
278
|
+
"fontSize": {
|
|
279
|
+
"value": 1.25,
|
|
280
|
+
"unit": "rem"
|
|
281
|
+
},
|
|
282
|
+
"fontWeight": 500,
|
|
283
|
+
"lineHeight": 1.5,
|
|
284
|
+
"letterSpacing": {
|
|
285
|
+
"value": 0,
|
|
286
|
+
"unit": "rem"
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"tagline-compact": {
|
|
291
|
+
"$description": "The tagline on phones.",
|
|
292
|
+
"$value": {
|
|
293
|
+
"fontFamily": "{font.family.sans}",
|
|
294
|
+
"fontSize": {
|
|
295
|
+
"value": 1.125,
|
|
296
|
+
"unit": "rem"
|
|
297
|
+
},
|
|
298
|
+
"fontWeight": 500,
|
|
299
|
+
"lineHeight": 1.5,
|
|
300
|
+
"letterSpacing": {
|
|
301
|
+
"value": 0,
|
|
302
|
+
"unit": "rem"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
},
|
|
274
306
|
"lead": {
|
|
275
307
|
"$description": "The first paragraph of a page.",
|
|
276
308
|
"$value": {
|
|
@@ -606,6 +638,27 @@
|
|
|
606
638
|
"unit": "rem"
|
|
607
639
|
},
|
|
608
640
|
"$description": "Height of the status line."
|
|
641
|
+
},
|
|
642
|
+
"control": {
|
|
643
|
+
"$value": {
|
|
644
|
+
"value": 2.5,
|
|
645
|
+
"unit": "rem"
|
|
646
|
+
},
|
|
647
|
+
"$description": "Height of a one-line field, a button and a segmented control."
|
|
648
|
+
},
|
|
649
|
+
"check": {
|
|
650
|
+
"$value": {
|
|
651
|
+
"value": 1.25,
|
|
652
|
+
"unit": "rem"
|
|
653
|
+
},
|
|
654
|
+
"$description": "A checkbox or a radio button."
|
|
655
|
+
},
|
|
656
|
+
"step": {
|
|
657
|
+
"$value": {
|
|
658
|
+
"value": 1.5,
|
|
659
|
+
"unit": "rem"
|
|
660
|
+
},
|
|
661
|
+
"$description": "The number of a step in its circle."
|
|
609
662
|
}
|
|
610
663
|
},
|
|
611
664
|
"motion": {
|
|
@@ -57,6 +57,22 @@
|
|
|
57
57
|
"$value": "{palette.main.foam}",
|
|
58
58
|
"$description": "Links, the focus ring, checked controls and the primary button fill."
|
|
59
59
|
},
|
|
60
|
+
"interactive-hover": {
|
|
61
|
+
"$value": {
|
|
62
|
+
"colorSpace": "srgb",
|
|
63
|
+
"components": [0.6745, 0.8745, 0.9098],
|
|
64
|
+
"hex": "#acdfe8"
|
|
65
|
+
},
|
|
66
|
+
"$description": "The interactive fill under the pointer, such as a hovered primary button: the interactive color 0.05 further from the page in OKLab lightness."
|
|
67
|
+
},
|
|
68
|
+
"interactive-active": {
|
|
69
|
+
"$value": {
|
|
70
|
+
"colorSpace": "srgb",
|
|
71
|
+
"components": [0.7373, 0.9412, 0.9765],
|
|
72
|
+
"hex": "#bcf0f9"
|
|
73
|
+
},
|
|
74
|
+
"$description": "The interactive fill while it is pressed: 0.1 further from the page in OKLab lightness."
|
|
75
|
+
},
|
|
60
76
|
"on-interactive": {
|
|
61
77
|
"$value": "{palette.main.base}",
|
|
62
78
|
"$description": "Text on the interactive fill."
|
|
@@ -57,6 +57,22 @@
|
|
|
57
57
|
"$value": "{palette.dawn.pine}",
|
|
58
58
|
"$description": "Links, the focus ring, checked controls and the primary button fill."
|
|
59
59
|
},
|
|
60
|
+
"interactive-hover": {
|
|
61
|
+
"$value": {
|
|
62
|
+
"colorSpace": "srgb",
|
|
63
|
+
"components": [0.0863, 0.3569, 0.4549],
|
|
64
|
+
"hex": "#165b74"
|
|
65
|
+
},
|
|
66
|
+
"$description": "The interactive fill under the pointer, such as a hovered primary button: the interactive color 0.05 further from the page in OKLab lightness."
|
|
67
|
+
},
|
|
68
|
+
"interactive-active": {
|
|
69
|
+
"$value": {
|
|
70
|
+
"colorSpace": "srgb",
|
|
71
|
+
"components": [0.0, 0.302, 0.3961],
|
|
72
|
+
"hex": "#004d65"
|
|
73
|
+
},
|
|
74
|
+
"$description": "The interactive fill while it is pressed: 0.1 further from the page in OKLab lightness."
|
|
75
|
+
},
|
|
60
76
|
"on-interactive": {
|
|
61
77
|
"$value": "{palette.dawn.base}",
|
|
62
78
|
"$description": "Text on the interactive fill."
|