@voidable/theme 0.7.0 → 0.8.1
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 +133 -8
- package/dist/base.css +20 -0
- package/dist/base.min.css +1 -0
- package/dist/component-tokens.json +1015 -0
- package/dist/components/accordion.css +149 -0
- package/dist/components/accordion.min.css +1 -0
- package/dist/components/action-input.css +416 -0
- package/dist/components/action-input.min.css +1 -0
- package/dist/components/alert.css +151 -0
- package/dist/components/alert.min.css +1 -0
- package/dist/components/avatar.css +73 -0
- package/dist/components/avatar.min.css +1 -0
- package/dist/components/badge.css +108 -0
- package/dist/components/badge.min.css +1 -0
- package/dist/components/banner.css +149 -0
- package/dist/components/banner.min.css +1 -0
- package/dist/components/bar-chart.css +101 -0
- package/dist/components/bar-chart.min.css +1 -0
- package/dist/components/breadcrumbs.css +82 -0
- package/dist/components/breadcrumbs.min.css +1 -0
- package/dist/components/button.css +237 -0
- package/dist/components/button.min.css +1 -0
- package/dist/components/calendar.css +669 -0
- package/dist/components/calendar.min.css +1 -0
- package/dist/components/card.css +161 -0
- package/dist/components/card.min.css +1 -0
- package/dist/components/carousel.css +223 -0
- package/dist/components/carousel.min.css +1 -0
- package/dist/components/checkbox-group.css +68 -0
- package/dist/components/checkbox-group.min.css +1 -0
- package/dist/components/checkbox.css +169 -0
- package/dist/components/checkbox.min.css +1 -0
- package/dist/components/collapsible.css +152 -0
- package/dist/components/collapsible.min.css +1 -0
- package/dist/components/color-picker.css +364 -0
- package/dist/components/color-picker.min.css +1 -0
- package/dist/components/combobox.css +548 -0
- package/dist/components/combobox.min.css +1 -0
- package/dist/components/compose-input.css +117 -0
- package/dist/components/compose-input.min.css +1 -0
- package/dist/components/dialog.css +175 -0
- package/dist/components/dialog.min.css +1 -0
- package/dist/components/divider.css +84 -0
- package/dist/components/divider.min.css +1 -0
- package/dist/components/donut-chart.css +122 -0
- package/dist/components/donut-chart.min.css +1 -0
- package/dist/components/drawer.css +230 -0
- package/dist/components/drawer.min.css +1 -0
- package/dist/components/dropdown-menu.css +274 -0
- package/dist/components/dropdown-menu.min.css +1 -0
- package/dist/components/editable.css +141 -0
- package/dist/components/editable.min.css +1 -0
- package/dist/components/error-fallback.css +129 -0
- package/dist/components/error-fallback.min.css +1 -0
- package/dist/components/field.css +103 -0
- package/dist/components/field.min.css +1 -0
- package/dist/components/file-upload.css +156 -0
- package/dist/components/file-upload.min.css +1 -0
- package/dist/components/gauge.css +186 -0
- package/dist/components/gauge.min.css +1 -0
- package/dist/components/hamburger.css +114 -0
- package/dist/components/hamburger.min.css +1 -0
- package/dist/components/hover-card.css +220 -0
- package/dist/components/hover-card.min.css +1 -0
- package/dist/components/indicator.css +159 -0
- package/dist/components/indicator.min.css +1 -0
- package/dist/components/input.css +134 -0
- package/dist/components/input.min.css +1 -0
- package/dist/components/line-chart.css +157 -0
- package/dist/components/line-chart.min.css +1 -0
- package/dist/components/list.css +90 -0
- package/dist/components/list.min.css +1 -0
- package/dist/components/menu.css +208 -0
- package/dist/components/menu.min.css +1 -0
- package/dist/components/multiselect.css +397 -0
- package/dist/components/multiselect.min.css +1 -0
- package/dist/components/nav-bar.css +75 -0
- package/dist/components/nav-bar.min.css +1 -0
- package/dist/components/nav-menu.css +173 -0
- package/dist/components/nav-menu.min.css +1 -0
- package/dist/components/number-input.css +272 -0
- package/dist/components/number-input.min.css +1 -0
- package/dist/components/pagination.css +128 -0
- package/dist/components/pagination.min.css +1 -0
- package/dist/components/panel.css +96 -0
- package/dist/components/panel.min.css +1 -0
- package/dist/components/pin-input.css +185 -0
- package/dist/components/pin-input.min.css +1 -0
- package/dist/components/popover.css +227 -0
- package/dist/components/popover.min.css +1 -0
- package/dist/components/progress.css +148 -0
- package/dist/components/progress.min.css +1 -0
- package/dist/components/radio-group.css +64 -0
- package/dist/components/radio-group.min.css +1 -0
- package/dist/components/radio.css +174 -0
- package/dist/components/radio.min.css +1 -0
- package/dist/components/scroll-area.css +83 -0
- package/dist/components/scroll-area.min.css +1 -0
- package/dist/components/segmented-control.css +158 -0
- package/dist/components/segmented-control.min.css +1 -0
- package/dist/components/select.css +207 -0
- package/dist/components/select.min.css +1 -0
- package/dist/components/sidebar.css +62 -0
- package/dist/components/sidebar.min.css +1 -0
- package/dist/components/skeleton.css +85 -0
- package/dist/components/skeleton.min.css +1 -0
- package/dist/components/slider.css +193 -0
- package/dist/components/slider.min.css +1 -0
- package/dist/components/spinner.css +100 -0
- package/dist/components/spinner.min.css +1 -0
- package/dist/components/stat.css +177 -0
- package/dist/components/stat.min.css +1 -0
- package/dist/components/status-dot.css +60 -0
- package/dist/components/status-dot.min.css +1 -0
- package/dist/components/stepper.css +114 -0
- package/dist/components/stepper.min.css +1 -0
- package/dist/components/switch.css +175 -0
- package/dist/components/switch.min.css +1 -0
- package/dist/components/table.css +416 -0
- package/dist/components/table.min.css +1 -0
- package/dist/components/tabs.css +185 -0
- package/dist/components/tabs.min.css +1 -0
- package/dist/components/tag.css +134 -0
- package/dist/components/tag.min.css +1 -0
- package/dist/components/tags-input.css +267 -0
- package/dist/components/tags-input.min.css +1 -0
- package/dist/components/textarea.css +127 -0
- package/dist/components/textarea.min.css +1 -0
- package/dist/components/toast.css +200 -0
- package/dist/components/toast.min.css +1 -0
- package/dist/components/toggle-group.css +59 -0
- package/dist/components/toggle-group.min.css +1 -0
- package/dist/components/toggle.css +139 -0
- package/dist/components/toggle.min.css +1 -0
- package/dist/components/tooltip.css +221 -0
- package/dist/components/tooltip.min.css +1 -0
- package/dist/core.css +9657 -0
- package/dist/core.min.css +1 -0
- package/dist/dtcg/aurora.dark.tokens.json +4723 -0
- package/dist/dtcg/aurora.light.tokens.json +4723 -0
- package/dist/dtcg/capsule.dark.tokens.json +4723 -0
- package/dist/dtcg/capsule.light.tokens.json +4723 -0
- package/dist/dtcg/console.dark.tokens.json +4723 -0
- package/dist/dtcg/console.light.tokens.json +4723 -0
- package/dist/dtcg/dune.dark.tokens.json +4723 -0
- package/dist/dtcg/dune.light.tokens.json +4723 -0
- package/dist/dtcg/iris.dark.tokens.json +4723 -0
- package/dist/dtcg/iris.light.tokens.json +4723 -0
- package/dist/dtcg/loft.dark.tokens.json +5203 -0
- package/dist/dtcg/loft.light.tokens.json +5203 -0
- package/dist/dtcg/orbit.dark.tokens.json +4723 -0
- package/dist/dtcg/orbit.light.tokens.json +4723 -0
- package/dist/dtcg/paper.dark.tokens.json +4723 -0
- package/dist/dtcg/paper.light.tokens.json +4723 -0
- package/dist/dtcg/slab.dark.tokens.json +4969 -0
- package/dist/dtcg/slab.light.tokens.json +4969 -0
- package/dist/dtcg/void.dark.tokens.json +4723 -0
- package/dist/dtcg/void.light.tokens.json +4723 -0
- package/dist/dtcg/voidable.resolver.json +117 -0
- package/dist/exports.json +708 -0
- package/dist/json/aurora.dark.json +394 -0
- package/dist/json/aurora.light.json +394 -0
- package/dist/json/capsule.dark.json +394 -0
- package/dist/json/capsule.light.json +394 -0
- package/dist/json/console.dark.json +394 -0
- package/dist/json/console.light.json +394 -0
- package/dist/json/dune.dark.json +394 -0
- package/dist/json/dune.light.json +394 -0
- package/dist/json/iris.dark.json +394 -0
- package/dist/json/iris.light.json +394 -0
- package/dist/json/loft.dark.json +423 -0
- package/dist/json/loft.light.json +423 -0
- package/dist/json/orbit.dark.json +394 -0
- package/dist/json/orbit.light.json +394 -0
- package/dist/json/paper.dark.json +394 -0
- package/dist/json/paper.light.json +394 -0
- package/dist/json/slab.dark.json +412 -0
- package/dist/json/slab.light.json +412 -0
- package/dist/json/void.dark.json +394 -0
- package/dist/json/void.light.json +394 -0
- package/dist/knobs.css +21 -0
- package/dist/knobs.json +362 -0
- package/dist/knobs.min.css +1 -0
- package/dist/layers.css +2 -0
- package/dist/layers.min.css +1 -0
- package/dist/names.d.ts +519 -0
- package/dist/names.js +719 -0
- package/dist/patterns/app-shell.css +136 -0
- package/dist/patterns/app-shell.min.css +1 -0
- package/dist/patterns/data.css +430 -0
- package/dist/patterns/data.min.css +1 -0
- package/dist/patterns/media.css +288 -0
- package/dist/patterns/media.min.css +1 -0
- package/dist/patterns/page.css +323 -0
- package/dist/patterns/page.min.css +1 -0
- package/dist/patterns/shell.css +328 -0
- package/dist/patterns/shell.min.css +1 -0
- package/dist/primitives.css +175 -0
- package/dist/primitives.min.css +1 -0
- package/dist/reset.css +44 -0
- package/dist/reset.min.css +1 -0
- package/dist/skin.d.ts +14 -0
- package/dist/skin.js +158 -0
- package/dist/skins/loft.css +94 -0
- package/dist/skins/loft.min.css +1 -0
- package/dist/skins/slab.css +99 -0
- package/dist/skins/slab.min.css +1 -0
- package/dist/themes/aurora.css +18 -0
- package/dist/themes/aurora.min.css +1 -0
- package/dist/themes/capsule.css +18 -0
- package/dist/themes/capsule.min.css +1 -0
- package/dist/themes/console.css +18 -0
- package/dist/themes/console.min.css +1 -0
- package/dist/themes/dune.css +18 -0
- package/dist/themes/dune.min.css +1 -0
- package/dist/themes/iris.css +18 -0
- package/dist/themes/iris.min.css +1 -0
- package/dist/themes/orbit.css +18 -0
- package/dist/themes/orbit.min.css +1 -0
- package/dist/themes/paper.css +19 -0
- package/dist/themes/paper.min.css +1 -0
- package/dist/themes/void.css +18 -0
- package/dist/themes/void.min.css +1 -0
- package/dist/tokens.css +695 -0
- package/dist/tokens.min.css +1 -0
- package/dist/type.css +99 -0
- package/dist/type.min.css +1 -0
- package/dist/void.css +9673 -0
- package/dist/void.min.css +1 -0
- package/package.json +66 -8
- package/src/app-shell/detail.css +7 -5
- package/src/app-shell/subtable.css +7 -6
- package/src/base.css +28 -0
- package/src/components/accordion.css +96 -19
- package/src/components/action-input.css +51 -61
- package/src/components/alert.css +63 -23
- package/src/components/avatar.css +0 -2
- package/src/components/badge.css +35 -25
- package/src/components/banner.css +60 -19
- package/src/components/bar-chart.css +10 -3
- package/src/components/breadcrumbs.css +20 -16
- package/src/components/button.css +130 -55
- package/src/components/calendar.css +40 -17
- package/src/components/card.css +122 -23
- package/src/components/carousel.css +85 -118
- package/src/components/checkbox-group.css +3 -1
- package/src/components/checkbox.css +18 -23
- package/src/components/collapsible.css +95 -29
- package/src/components/color-picker.css +10 -10
- package/src/components/combobox.css +47 -29
- package/src/components/compose-input.css +3 -3
- package/src/components/dialog.css +115 -41
- package/src/components/divider.css +7 -4
- package/src/components/donut-chart.css +25 -15
- package/src/components/drawer.css +135 -68
- package/src/components/dropdown-menu.css +21 -43
- package/src/components/editable.css +7 -7
- package/src/components/error-fallback.css +48 -27
- package/src/components/field.css +12 -5
- package/src/components/file-upload.css +2 -1
- package/src/components/gauge.css +35 -23
- package/src/components/hamburger.css +10 -10
- package/src/components/hover-card.css +13 -113
- package/src/components/indicator.css +22 -18
- package/src/components/input.css +15 -12
- package/src/components/line-chart.css +10 -10
- package/src/components/list.css +28 -7
- package/src/components/menu.css +48 -33
- package/src/components/multiselect.css +57 -40
- package/src/components/nav-bar.css +23 -14
- package/src/components/nav-menu.css +31 -22
- package/src/components/number-input.css +56 -79
- package/src/components/overlay.css +215 -0
- package/src/components/pagination.css +42 -31
- package/src/components/panel.css +37 -11
- package/src/components/pin-input.css +23 -22
- package/src/components/popover.css +19 -35
- package/src/components/progress.css +19 -10
- package/src/components/radio-group.css +2 -1
- package/src/components/radio.css +15 -20
- package/src/components/scroll-area.css +3 -3
- package/src/components/segmented-control.css +46 -29
- package/src/components/select.css +99 -31
- package/src/components/sidebar.css +8 -4
- package/src/components/skeleton.css +8 -3
- package/src/components/slider.css +4 -2
- package/src/components/spinner.css +5 -4
- package/src/components/stat.css +59 -52
- package/src/components/status-dot.css +0 -1
- package/src/components/switch.css +18 -26
- package/src/components/table.css +443 -16
- package/src/components/tabs.css +92 -29
- package/src/components/tag.css +44 -20
- package/src/components/tags-input.css +43 -55
- package/src/components/textarea.css +15 -12
- package/src/components/toast.css +84 -22
- package/src/components/toggle.css +35 -42
- package/src/components/tooltip.css +19 -38
- package/src/core.css +98 -0
- package/src/forced-colors.css +134 -0
- package/src/index.css +4 -77
- package/src/knobs.css +101 -0
- package/src/layers.css +38 -0
- package/src/media/media.css +258 -0
- package/src/media/surface.css +143 -0
- package/src/patterns/data.css +461 -0
- package/src/patterns/page.css +348 -0
- package/src/patterns/shell.css +371 -0
- package/src/pre-upgrade.css +202 -0
- package/src/primitives.css +19 -97
- package/src/reset.css +45 -21
- package/src/skins/loft.css +114 -0
- package/src/skins/slab.css +107 -0
- package/src/themes/aurora.css +16 -0
- package/src/themes/capsule.css +16 -0
- package/src/themes/console.css +16 -0
- package/src/themes/dune.css +16 -0
- package/src/themes/iris.css +16 -0
- package/src/themes/orbit.css +16 -0
- package/src/themes/paper.css +18 -0
- package/src/themes/void.css +16 -0
- package/src/tokens.css +552 -98
- package/src/type.css +103 -0
package/src/tokens.css
CHANGED
|
@@ -1,53 +1,327 @@
|
|
|
1
1
|
/* ============================================================
|
|
2
2
|
@voidable/theme — Tier 2 Semantic Tokens
|
|
3
|
-
|
|
3
|
+
Everything here is derived from the knobs in knobs.css.
|
|
4
|
+
With no explicit choice the scheme is the theme's preference, or
|
|
5
|
+
else the operating system's; the page is true black or
|
|
6
|
+
true white and every grey is the neutral colour at an opacity.
|
|
7
|
+
|
|
8
|
+
Browser baseline: oklch(), color-mix() and calc() inside both
|
|
9
|
+
(Chrome 111, Firefox 113, Safari 16.2; all 2023). No build step,
|
|
10
|
+
no relative colour syntax, no light-dark().
|
|
4
11
|
============================================================ */
|
|
5
12
|
|
|
6
|
-
/* ──
|
|
7
|
-
|
|
13
|
+
/* ── Colour scheme ──
|
|
14
|
+
One number says which scheme is in force; every colour below is a
|
|
15
|
+
single formula of it, so light is not a second hand-tuned block.
|
|
16
|
+
|
|
17
|
+
Three things can say which scheme it is, strongest first:
|
|
18
|
+
|
|
19
|
+
1. data-theme="dark" | "light" | "system" on the element or an
|
|
20
|
+
ancestor: the application's (its user's) explicit choice.
|
|
21
|
+
"system" says "follow the operating system" out loud, which also
|
|
22
|
+
overrides a theme's preference.
|
|
23
|
+
2. the scheme a theme or a skin says it was designed for:
|
|
24
|
+
--void-preferred-scheme: light; keyword, for color-scheme
|
|
25
|
+
--void-preferred-scheme-dark: 0; the same, as the number
|
|
26
|
+
set together in its file (CSS cannot turn one into the other).
|
|
27
|
+
3. the operating system (prefers-color-scheme); dark where the
|
|
28
|
+
browser cannot say.
|
|
29
|
+
|
|
30
|
+
Each is a custom property that is simply not set when its source says
|
|
31
|
+
nothing, so the derived block picks the first one that is set with
|
|
32
|
+
var() fallbacks. `color-scheme` (native scrollbars, form controls,
|
|
33
|
+
autofill) is not set on :root, which would restyle an application's
|
|
34
|
+
own controls. The scoped reset applies it to every theme element and
|
|
35
|
+
base.css to html, both from --void-color-scheme; a data-theme region
|
|
36
|
+
sets it on itself. */
|
|
37
|
+
:root {
|
|
38
|
+
--void-scheme-system: 1;
|
|
39
|
+
--void-color-scheme-system: dark;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@media (prefers-color-scheme: light) {
|
|
43
|
+
:root {
|
|
44
|
+
--void-scheme-system: 0;
|
|
45
|
+
--void-color-scheme-system: light;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
8
49
|
[data-theme="dark"] {
|
|
9
|
-
|
|
10
|
-
--void-
|
|
11
|
-
--void-color-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
--void-
|
|
22
|
-
--void-color-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
--void-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
color-scheme: dark;
|
|
51
|
+
--void-scheme-explicit: 1;
|
|
52
|
+
--void-color-scheme-explicit: dark;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
[data-theme="light"] {
|
|
56
|
+
color-scheme: light;
|
|
57
|
+
--void-scheme-explicit: 0;
|
|
58
|
+
--void-color-scheme-explicit: light;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
[data-theme="system"] {
|
|
62
|
+
--void-scheme-explicit: var(--void-scheme-system);
|
|
63
|
+
--void-color-scheme-explicit: var(--void-color-scheme-system);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* ── User preference: more contrast ──
|
|
67
|
+
Added to the contrast knob, so it applies whatever a theme set. */
|
|
68
|
+
:root {
|
|
69
|
+
--void-contrast-boost: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@media (prefers-contrast: more) {
|
|
73
|
+
:root {
|
|
74
|
+
--void-contrast-boost: 1;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* ── User preference: reduced motion ──
|
|
79
|
+
The OS preference wins over the anim-scale knob wherever it was
|
|
80
|
+
set: on :root, by data-anim-speed, by a theme, or inline on a
|
|
81
|
+
data-void-theme subtree (hence !important). A user who asked their
|
|
82
|
+
OS for less motion should not get it back from an app default.
|
|
83
|
+
Apps that want a motion toggle should drive it from their own UI
|
|
84
|
+
and treat the OS preference as the initial value. This block lives
|
|
85
|
+
here, after knobs.css, so the knob's default cannot override it. */
|
|
86
|
+
@media (prefers-reduced-motion: reduce) {
|
|
87
|
+
:root,
|
|
88
|
+
:root[data-anim-speed],
|
|
89
|
+
:root[data-void-theme],
|
|
90
|
+
:root [data-void-theme] { --void-anim-scale: 0 !important; }
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* ── UI over imagery ──
|
|
94
|
+
Fixed inputs for the media surface, its scrim and glass panels
|
|
95
|
+
(media/*.css). They are not theme knobs: how strong a scrim must be
|
|
96
|
+
depends on the photograph, not on the theme.
|
|
97
|
+
|
|
98
|
+
--void-scrim-strength runs from 0 to 1 like the contrast knob: 0 is
|
|
99
|
+
the lightest scrim that still keeps body text at 4.5:1 over a pure
|
|
100
|
+
white image, 1 is close to opaque. --void-glass-solid is 1 where a
|
|
101
|
+
translucent panel must be solid (no backdrop-filter, or the user
|
|
102
|
+
asked for reduced transparency). */
|
|
103
|
+
:root {
|
|
104
|
+
--void-scrim-strength: 0;
|
|
105
|
+
--void-scrim-fade: 10rem;
|
|
106
|
+
--void-glass-blur: 24px;
|
|
107
|
+
--void-glass-solid: 0;
|
|
108
|
+
--void-media-focal: 50% 50%;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@media (prefers-reduced-transparency: reduce) {
|
|
112
|
+
:root { --void-glass-solid: 1; }
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
|
116
|
+
:root { --void-glass-solid: 1; }
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* ── Shape ──
|
|
120
|
+
data-shape is a preset for the radius knob: sharp zeroes every
|
|
121
|
+
radius under it, curvy restores the theme's radius. */
|
|
122
|
+
:root,
|
|
123
|
+
[data-shape="curvy"] {
|
|
124
|
+
--void-shape: 1;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
[data-shape="sharp"] {
|
|
128
|
+
--void-shape: 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* ── Derived tokens ──
|
|
132
|
+
var() is substituted where a custom property is declared, so
|
|
133
|
+
tokens derived on :root alone would not follow a knob changed on a
|
|
134
|
+
descendant. They are therefore declared on every element that can
|
|
135
|
+
carry a scheme, a theme, a shape or a surface (media, glass).
|
|
136
|
+
:where() keeps the specificity at zero, so any override of a token
|
|
137
|
+
still wins. */
|
|
138
|
+
:where(:root, [data-theme], [data-void-theme], [data-shape], [data-void-surface], void-media, void-glass) {
|
|
139
|
+
/* ── Colour scheme in force ──
|
|
140
|
+
The first of: explicit (data-theme), preferred (a theme or skin),
|
|
141
|
+
system. --void-page-scheme-dark is the scheme of the page itself: a
|
|
142
|
+
media surface forces --void-scheme-dark to 1 for what sits on the
|
|
143
|
+
image, and a glass panel reads the page's (media/surface.css: a
|
|
144
|
+
panel outside a media surface, over the page, is in the page's
|
|
145
|
+
scheme; one on a media surface stays dark). */
|
|
146
|
+
--void-page-scheme-dark: var(--void-scheme-explicit, var(--void-preferred-scheme-dark, var(--void-scheme-system)));
|
|
147
|
+
--void-scheme-dark: var(--void-page-scheme-dark);
|
|
148
|
+
--void-color-scheme: var(--void-color-scheme-explicit, var(--void-preferred-scheme, var(--void-color-scheme-system)));
|
|
149
|
+
|
|
150
|
+
/* ── Working values (internal; set the knobs instead) ── */
|
|
151
|
+
--void-contrast-level: clamp(0, var(--void-contrast) + var(--void-contrast-boost), 1);
|
|
152
|
+
--void-chrome-level: clamp(0, var(--void-chrome), 1);
|
|
153
|
+
--void-page-level: clamp(0, var(--void-page-tint), 1);
|
|
154
|
+
--void-neutral-c: clamp(0, var(--void-neutral-chroma), 0.04);
|
|
155
|
+
|
|
156
|
+
/* The neutral foreground as "L C H": near-white on black, near-black
|
|
157
|
+
on white. Used as oklch(var(--void-fg) / alpha). */
|
|
158
|
+
--void-fg: calc(0.145 + 0.825 * var(--void-scheme-dark)) var(--void-neutral-c) var(--void-neutral-hue);
|
|
159
|
+
|
|
160
|
+
/* Opacity steps of the foreground. The first term of each is the
|
|
161
|
+
lowest value that keeps WCAG AA on every surface in that scheme
|
|
162
|
+
(white needs slightly more than black); the contrast knob only
|
|
163
|
+
ever adds to it. */
|
|
164
|
+
--void-alpha-muted: calc(0.60 - 0.08 * var(--void-scheme-dark) + 0.25 * var(--void-contrast-level));
|
|
165
|
+
--void-alpha-secondary: calc(0.74 - 0.08 * var(--void-scheme-dark) + 0.20 * var(--void-contrast-level));
|
|
166
|
+
--void-alpha-disabled: calc(0.38 + 0.12 * var(--void-contrast-level));
|
|
167
|
+
--void-alpha-control: calc(0.47 - 0.08 * var(--void-scheme-dark) + 0.25 * var(--void-contrast-level));
|
|
168
|
+
--void-alpha-focus: calc(0.80 + 0.20 * var(--void-contrast-level));
|
|
169
|
+
--void-alpha-divider: calc(0.05 + 0.18 * var(--void-chrome-level) + 0.06 * var(--void-contrast-level));
|
|
170
|
+
|
|
171
|
+
/* ── Surfaces ──
|
|
172
|
+
The page is pure black or white unless the page-tint knob softens
|
|
173
|
+
it. Each step up is the foreground mixed into the page, and
|
|
174
|
+
opaque, so sticky headers and floating panels cover what is
|
|
175
|
+
beneath them. */
|
|
176
|
+
--void-color-page: oklch(
|
|
177
|
+
calc((1 - var(--void-scheme-dark)) * (1 - 0.03 * var(--void-page-level)) + var(--void-scheme-dark) * 0.2 * var(--void-page-level))
|
|
178
|
+
calc(var(--void-neutral-c) * var(--void-page-level) * (0.6 + 0.4 * var(--void-scheme-dark)))
|
|
179
|
+
var(--void-neutral-hue)
|
|
180
|
+
);
|
|
181
|
+
/* What things sit on. The page colour, except on a media surface or
|
|
182
|
+
a glass panel, where it is a translucent shade of it and every
|
|
183
|
+
surface below therefore lets the image through. */
|
|
184
|
+
--void-color-bg: var(--void-color-page);
|
|
185
|
+
/* Container fill (cards, panels, stats): set by the chrome knob,
|
|
186
|
+
close to invisible by default. */
|
|
187
|
+
--void-color-surface: color-mix(in srgb, oklch(var(--void-fg)) calc(8% * var(--void-chrome-level)), var(--void-color-bg));
|
|
188
|
+
/* A subtle step that is always visible: stripes, code, wells. */
|
|
189
|
+
--void-color-bg-secondary: color-mix(in srgb, oklch(var(--void-fg)) 4%, var(--void-color-bg));
|
|
190
|
+
/* Things that float over the page: menus, popovers, dialogs. Lifted
|
|
191
|
+
in dark; on white the shadow and ring do the lifting. */
|
|
192
|
+
--void-color-bg-elevated: color-mix(in srgb, oklch(var(--void-fg)) calc(7% * var(--void-scheme-dark)), var(--void-color-page));
|
|
193
|
+
/* The resting fill of a control that draws no fill of its own
|
|
194
|
+
(outline button, outline badge). Nothing on the page; a dark shade
|
|
195
|
+
on a media surface, so the control reads on any photograph. */
|
|
196
|
+
--void-color-control-fill: transparent;
|
|
197
|
+
--void-color-bg-hover: color-mix(in srgb, oklch(var(--void-fg)) 8%, var(--void-color-bg));
|
|
198
|
+
--void-color-bg-active: color-mix(in srgb, oklch(var(--void-fg)) 13%, var(--void-color-bg));
|
|
199
|
+
--void-color-bg-accent: var(--void-color-bg-secondary);
|
|
200
|
+
--void-color-bg-overlay: oklch(0 0 0 / calc(0.3 + 0.4 * var(--void-scheme-dark)));
|
|
201
|
+
|
|
202
|
+
/* ── Text ── */
|
|
203
|
+
--void-color-text: oklch(var(--void-fg));
|
|
204
|
+
--void-color-text-secondary: oklch(var(--void-fg) / var(--void-alpha-secondary));
|
|
205
|
+
--void-color-text-muted: oklch(var(--void-fg) / var(--void-alpha-muted));
|
|
206
|
+
--void-color-text-tertiary: var(--void-color-text-muted);
|
|
207
|
+
--void-color-text-disabled: oklch(var(--void-fg) / var(--void-alpha-disabled));
|
|
208
|
+
--void-color-text-on-accent: oklch(calc(1 - var(--void-scheme-dark)) 0 0);
|
|
209
|
+
|
|
210
|
+
/* ── Borders ──
|
|
211
|
+
Two strengths with two jobs. A divider separates content and is
|
|
212
|
+
decorative, so it may be faint. A control border is the only
|
|
213
|
+
boundary of an input or an outline button, so it keeps 3:1. */
|
|
214
|
+
--void-color-border: oklch(var(--void-fg) / var(--void-alpha-divider));
|
|
215
|
+
--void-color-border-strong: oklch(var(--void-fg) / calc(var(--void-alpha-divider) + 0.10));
|
|
216
|
+
--void-color-border-control: oklch(var(--void-fg) / var(--void-alpha-control));
|
|
217
|
+
--void-color-border-focus: oklch(var(--void-fg) / var(--void-alpha-focus));
|
|
218
|
+
|
|
219
|
+
/* ── Scrim and glass ──
|
|
220
|
+
A scrim is the translucent dark layer between an image and the
|
|
221
|
+
text over it. Its opacity starts at the lowest value that keeps
|
|
222
|
+
4.5:1 for body text over a white image and only rises from there.
|
|
223
|
+
Glass is a translucent, blurred panel in the page's own scheme
|
|
224
|
+
(dark when it lies on a media surface). */
|
|
225
|
+
--void-scrim-alpha: calc(0.64 + 0.30 * clamp(0, var(--void-scrim-strength), 1));
|
|
226
|
+
--void-color-scrim: oklch(0 0 0 / var(--void-scrim-alpha));
|
|
227
|
+
--void-glass-alpha: max(calc(0.76 + 0.10 * var(--void-scheme-dark)), var(--void-glass-solid));
|
|
228
|
+
|
|
229
|
+
/* Focus ring — shared by every :focus-visible indicator. */
|
|
230
|
+
--void-focus-ring-color: var(--void-color-border-focus);
|
|
231
|
+
--void-focus-ring-width: 2px;
|
|
232
|
+
--void-focus-ring-offset: 2px;
|
|
233
|
+
|
|
234
|
+
/* ── Accent ──
|
|
235
|
+
Lightness follows chroma: with no chroma the accent is the
|
|
236
|
+
foreground itself (inverse of the page); as chroma rises it moves
|
|
237
|
+
toward a mid tone that still carries 4.5:1 text in each scheme. */
|
|
238
|
+
--void-accent-c: clamp(0, var(--void-accent-chroma), 0.3);
|
|
239
|
+
--void-accent-l: calc(
|
|
240
|
+
var(--void-scheme-dark) * max(0.97 - 0.9 * var(--void-accent-c), 0.78)
|
|
241
|
+
+ (1 - var(--void-scheme-dark)) * min(0.145 + 2 * var(--void-accent-c), 0.42)
|
|
242
|
+
);
|
|
243
|
+
/* On a media surface or glass the backdrop is unknown, so a coloured
|
|
244
|
+
accent moves toward white (dark) or black (light), as the status
|
|
245
|
+
colours do. On the page it is zero, except for the most saturated
|
|
246
|
+
accents (chroma above 0.2) on a tinted page, which would otherwise
|
|
247
|
+
fall just short of 4.5:1 as text on the lifted surfaces. */
|
|
248
|
+
--void-accent-shift: calc(400% * var(--void-page-level) * max(0, var(--void-accent-c) - 0.2));
|
|
249
|
+
--void-color-accent: color-mix(in srgb, oklch(var(--void-scheme-dark) 0 0) var(--void-accent-shift), oklch(var(--void-accent-l) var(--void-accent-c) var(--void-accent-hue)));
|
|
250
|
+
--void-color-accent-hover: color-mix(in srgb, var(--void-color-accent) 92%, var(--void-color-bg));
|
|
251
|
+
|
|
252
|
+
/* ── Status ──
|
|
253
|
+
A fixed set a theme may override but does not have to. Each is one
|
|
254
|
+
palette step on black and a darker one on white, chosen so the
|
|
255
|
+
colour keeps 4.5:1 as text on every surface and on its own tint
|
|
256
|
+
over every surface, and carries 4.5:1 text when used as a fill. */
|
|
257
|
+
/* On a tinted page the fixed steps lose contrast, so they move
|
|
258
|
+
toward white (dark) or black (light) as the page tint rises. */
|
|
259
|
+
--void-status-pole: oklch(var(--void-scheme-dark) 0 0);
|
|
260
|
+
--void-status-shift: calc(22% * var(--void-page-level));
|
|
261
|
+
--void-color-error: color-mix(in srgb, var(--void-status-pole) var(--void-status-shift), color-mix(in srgb, var(--void-red-400) calc(100% * var(--void-scheme-dark)), var(--void-red-700)));
|
|
262
|
+
--void-color-warning: color-mix(in srgb, var(--void-status-pole) var(--void-status-shift), color-mix(in srgb, var(--void-orange-400) calc(100% * var(--void-scheme-dark)), var(--void-orange-800)));
|
|
263
|
+
--void-color-caution: color-mix(in srgb, var(--void-status-pole) var(--void-status-shift), color-mix(in srgb, var(--void-amber-400) calc(100% * var(--void-scheme-dark)), var(--void-amber-800)));
|
|
264
|
+
--void-color-success: color-mix(in srgb, var(--void-status-pole) var(--void-status-shift), color-mix(in srgb, var(--void-green-400) calc(100% * var(--void-scheme-dark)), var(--void-green-800)));
|
|
265
|
+
--void-color-info: color-mix(in srgb, var(--void-status-pole) var(--void-status-shift), color-mix(in srgb, var(--void-blue-400) calc(100% * var(--void-scheme-dark)), var(--void-blue-700)));
|
|
266
|
+
--void-color-notice: color-mix(in srgb, var(--void-status-pole) var(--void-status-shift), color-mix(in srgb, var(--void-purple-400) calc(100% * var(--void-scheme-dark)), var(--void-purple-700)));
|
|
267
|
+
--void-color-highlight: color-mix(in srgb, var(--void-status-pole) var(--void-status-shift), color-mix(in srgb, var(--void-pink-400) calc(100% * var(--void-scheme-dark)), var(--void-pink-800)));
|
|
268
|
+
|
|
269
|
+
/* Strength of the tone tints behind outline badges, alerts and
|
|
270
|
+
subtle status fills: 14% on black, 8% on white so tone-coloured
|
|
271
|
+
text on the tint keeps 4.5:1. */
|
|
272
|
+
--void-tone-tint: calc(8% + 6% * var(--void-scheme-dark));
|
|
273
|
+
|
|
274
|
+
--void-color-error-subtle: color-mix(in srgb, var(--void-color-error) var(--void-tone-tint), transparent);
|
|
275
|
+
--void-color-warning-subtle: color-mix(in srgb, var(--void-color-warning) var(--void-tone-tint), transparent);
|
|
276
|
+
--void-color-caution-subtle: color-mix(in srgb, var(--void-color-caution) var(--void-tone-tint), transparent);
|
|
277
|
+
--void-color-success-subtle: color-mix(in srgb, var(--void-color-success) var(--void-tone-tint), transparent);
|
|
278
|
+
--void-color-info-subtle: color-mix(in srgb, var(--void-color-info) var(--void-tone-tint), transparent);
|
|
279
|
+
--void-color-notice-subtle: color-mix(in srgb, var(--void-color-notice) var(--void-tone-tint), transparent);
|
|
280
|
+
--void-color-highlight-subtle: color-mix(in srgb, var(--void-color-highlight) var(--void-tone-tint), transparent);
|
|
281
|
+
|
|
282
|
+
/* ── Elevation ──
|
|
283
|
+
Only for things that overlap the page. A hairline ring and a soft
|
|
284
|
+
dark shadow; on black the ring and the lifted surface do the
|
|
285
|
+
work, on white the shadow does. */
|
|
286
|
+
--void-shadow-sm: 0 1px 2px oklch(0 0 0 / calc(0.06 + 0.34 * var(--void-scheme-dark)));
|
|
287
|
+
--void-shadow-md: 0 6px 20px -4px oklch(0 0 0 / calc(0.12 + 0.48 * var(--void-scheme-dark)));
|
|
288
|
+
--void-shadow-lg: 0 16px 48px -8px oklch(0 0 0 / calc(0.16 + 0.54 * var(--void-scheme-dark)));
|
|
289
|
+
--void-shadow-xl: 0 32px 88px -12px oklch(0 0 0 / calc(0.20 + 0.60 * var(--void-scheme-dark)));
|
|
290
|
+
--void-ring-hair: 0 0 0 1px var(--void-color-border);
|
|
291
|
+
--void-ring-hair-strong: 0 0 0 1px var(--void-color-border-strong);
|
|
292
|
+
|
|
293
|
+
/* ── Spacing scale (density knob) ── */
|
|
294
|
+
--void-space-unit: calc(0.25rem * var(--void-density));
|
|
295
|
+
--void-space-0h: calc(var(--void-space-unit) * 0.5);
|
|
296
|
+
--void-space-1: var(--void-space-unit);
|
|
297
|
+
--void-space-1h: calc(var(--void-space-unit) * 1.5);
|
|
298
|
+
--void-space-2: calc(var(--void-space-unit) * 2);
|
|
299
|
+
--void-space-2h: calc(var(--void-space-unit) * 2.5);
|
|
300
|
+
--void-space-3: calc(var(--void-space-unit) * 3);
|
|
301
|
+
--void-space-4: calc(var(--void-space-unit) * 4);
|
|
302
|
+
--void-space-5: calc(var(--void-space-unit) * 5);
|
|
303
|
+
--void-space-6: calc(var(--void-space-unit) * 6);
|
|
304
|
+
--void-space-7: calc(var(--void-space-unit) * 7);
|
|
305
|
+
--void-space-8: calc(var(--void-space-unit) * 8);
|
|
306
|
+
--void-space-9: calc(var(--void-space-unit) * 9);
|
|
307
|
+
--void-space-10: calc(var(--void-space-unit) * 10);
|
|
308
|
+
--void-space-12: calc(var(--void-space-unit) * 12);
|
|
309
|
+
--void-space-14: calc(var(--void-space-unit) * 14);
|
|
310
|
+
--void-space-15: calc(var(--void-space-unit) * 15);
|
|
311
|
+
--void-space-16: calc(var(--void-space-unit) * 16);
|
|
312
|
+
--void-space-20: calc(var(--void-space-unit) * 20);
|
|
313
|
+
--void-space-24: calc(var(--void-space-unit) * 24);
|
|
314
|
+
--void-space-28: calc(var(--void-space-unit) * 28);
|
|
315
|
+
--void-space-30: calc(var(--void-space-unit) * 30);
|
|
316
|
+
--void-space-32: calc(var(--void-space-unit) * 32);
|
|
317
|
+
--void-space-35: calc(var(--void-space-unit) * 35);
|
|
318
|
+
--void-space-40: calc(var(--void-space-unit) * 40);
|
|
319
|
+
|
|
320
|
+
--void-space-xs: var(--void-space-1);
|
|
321
|
+
--void-space-sm: var(--void-space-2);
|
|
322
|
+
--void-space-md: var(--void-space-3);
|
|
323
|
+
--void-space-lg: var(--void-space-4);
|
|
324
|
+
--void-space-xl: var(--void-space-6);
|
|
51
325
|
|
|
52
326
|
/* Named spacing aliases */
|
|
53
327
|
--void-spacing-xs: var(--void-space-xs);
|
|
@@ -55,60 +329,240 @@
|
|
|
55
329
|
--void-spacing-md: var(--void-space-md);
|
|
56
330
|
--void-spacing-lg: var(--void-space-lg);
|
|
57
331
|
--void-spacing-xl: var(--void-space-xl);
|
|
58
|
-
}
|
|
59
332
|
|
|
60
|
-
/* ──
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
--void-
|
|
64
|
-
--void-
|
|
65
|
-
--void-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
--void-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
--void-
|
|
73
|
-
--void-
|
|
74
|
-
--void-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
--void-
|
|
82
|
-
|
|
83
|
-
/*
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
--void-
|
|
91
|
-
--void-
|
|
92
|
-
--void-
|
|
93
|
-
--void-
|
|
94
|
-
--void-
|
|
95
|
-
|
|
96
|
-
/*
|
|
97
|
-
--void-
|
|
98
|
-
--void-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
--void-
|
|
102
|
-
|
|
103
|
-
|
|
333
|
+
/* ── Control size (density knob) ──
|
|
334
|
+
One height per size step, shared by every control, so a button,
|
|
335
|
+
an input and a select in a row line up. */
|
|
336
|
+
--void-control-height-sm: calc(1.75rem * var(--void-density));
|
|
337
|
+
--void-control-height: calc(2.25rem * var(--void-density));
|
|
338
|
+
--void-control-height-lg: calc(2.75rem * var(--void-density));
|
|
339
|
+
|
|
340
|
+
/* Inline padding of a text field; buttons use a little more. */
|
|
341
|
+
--void-control-padding-sm: calc(0.5rem * var(--void-density));
|
|
342
|
+
--void-control-padding: calc(0.75rem * var(--void-density));
|
|
343
|
+
--void-control-padding-lg: calc(1rem * var(--void-density));
|
|
344
|
+
|
|
345
|
+
--void-control-text-sm: var(--void-text-sm);
|
|
346
|
+
--void-control-text: var(--void-text-base);
|
|
347
|
+
--void-control-text-lg: var(--void-text-md);
|
|
348
|
+
|
|
349
|
+
/* Padding of a table cell or list row, block then inline. */
|
|
350
|
+
--void-cell-padding-block: calc(0.75rem * var(--void-density));
|
|
351
|
+
--void-cell-padding-inline: calc(0.75rem * var(--void-density));
|
|
352
|
+
|
|
353
|
+
/* Padding inside a container (card, panel, dialog). */
|
|
354
|
+
--void-container-padding: calc(1.25rem * var(--void-density));
|
|
355
|
+
|
|
356
|
+
/* ── Layout rhythm ──
|
|
357
|
+
Tight inside a group, generous between groups, more between
|
|
358
|
+
sections: the difference between the steps is where the airiness
|
|
359
|
+
comes from. tight is a label to its control; inside is items in a
|
|
360
|
+
row or a group; stack is blocks stacked in a group (fields in a
|
|
361
|
+
form). Those follow density. group, section and the page gutter
|
|
362
|
+
follow rhythm. */
|
|
363
|
+
--void-gap-tight: calc(0.5rem * var(--void-density));
|
|
364
|
+
--void-gap-inside: calc(1rem * var(--void-density));
|
|
365
|
+
--void-gap-stack: calc(1.5rem * var(--void-density));
|
|
366
|
+
--void-gap-group: calc(2.5rem * var(--void-rhythm));
|
|
367
|
+
--void-gap-section: calc(4.5rem * var(--void-rhythm));
|
|
368
|
+
--void-gutter: clamp(1rem, calc(4vw * var(--void-rhythm)), calc(3rem * var(--void-rhythm)));
|
|
369
|
+
/* Line length for running text, and the width of a page column. */
|
|
370
|
+
--void-measure: 34rem;
|
|
371
|
+
--void-measure-page: 72rem;
|
|
372
|
+
/* Inline padding that lines a full-width block (a bar, a media
|
|
373
|
+
surface) up with the page column: use it as padding-inline. */
|
|
374
|
+
--void-page-inset: max(var(--void-gutter), calc((100% - var(--void-measure-page)) / 2 + var(--void-gutter)));
|
|
375
|
+
|
|
376
|
+
/* ── Type scale (font-size knob) ── */
|
|
377
|
+
--void-text-2xs: calc(var(--void-font-size) * 0.7143);
|
|
378
|
+
--void-text-xs: calc(var(--void-font-size) * 0.8571);
|
|
379
|
+
--void-text-sm: calc(var(--void-font-size) * 0.9286);
|
|
380
|
+
--void-text-base: var(--void-font-size);
|
|
381
|
+
--void-text-md: calc(var(--void-font-size) * 1.1429);
|
|
382
|
+
--void-text-lg: calc(var(--void-font-size) * 1.2857);
|
|
383
|
+
--void-text-xl: calc(var(--void-font-size) * 1.4286);
|
|
384
|
+
--void-text-2xl: calc(var(--void-font-size) * 1.7143);
|
|
385
|
+
--void-text-3xl: calc(var(--void-font-size) * 2.1429);
|
|
386
|
+
--void-text-4xl: calc(var(--void-font-size) * 2.5714);
|
|
387
|
+
--void-text-5xl: calc(var(--void-font-size) * 3.4286);
|
|
388
|
+
|
|
389
|
+
/* ── Type roles ──
|
|
390
|
+
Named jobs for text. Components and the data-void-type attribute
|
|
391
|
+
read these, so restyling a role once restyles it everywhere. */
|
|
392
|
+
|
|
393
|
+
/* label: the small quiet name of a thing. Table headers, stat
|
|
394
|
+
labels, section meta, crumbs. */
|
|
395
|
+
--void-type-label-family: var(--void-font-mono);
|
|
396
|
+
--void-type-label-size: calc(var(--void-font-size) * 0.7857);
|
|
397
|
+
--void-type-label-leading: 1.4;
|
|
398
|
+
--void-type-label-weight: var(--void-weight-medium);
|
|
399
|
+
--void-type-label-tracking: 0.08em;
|
|
400
|
+
--void-type-label-case: uppercase;
|
|
401
|
+
--void-type-label-color: var(--void-color-text-secondary);
|
|
402
|
+
|
|
403
|
+
/* value: the number or word a stat is about. */
|
|
404
|
+
--void-type-value-family: var(--void-font-sans);
|
|
405
|
+
--void-type-value-size: var(--void-text-3xl);
|
|
406
|
+
--void-type-value-size-sm: var(--void-text-xl);
|
|
407
|
+
--void-type-value-size-lg: var(--void-text-4xl);
|
|
408
|
+
--void-type-value-leading: 1.1;
|
|
409
|
+
--void-type-value-weight: var(--void-weight-normal);
|
|
410
|
+
--void-type-value-tracking: -0.02em;
|
|
411
|
+
--void-type-value-numeric: tabular-nums;
|
|
412
|
+
--void-type-value-color: var(--void-color-text);
|
|
413
|
+
|
|
414
|
+
/* unit: set after a value ("TB", "ms", "of 44"). */
|
|
415
|
+
--void-type-unit-family: var(--void-font-sans);
|
|
416
|
+
--void-type-unit-size: var(--void-text-base);
|
|
417
|
+
--void-type-unit-weight: var(--void-weight-normal);
|
|
418
|
+
--void-type-unit-tracking: 0em;
|
|
419
|
+
--void-type-unit-color: var(--void-color-text-secondary);
|
|
420
|
+
|
|
421
|
+
/* caption: the supporting line under a value, a field or a row. */
|
|
422
|
+
--void-type-caption-family: var(--void-font-sans);
|
|
423
|
+
--void-type-caption-size: var(--void-text-xs);
|
|
424
|
+
--void-type-caption-leading: 1.5;
|
|
425
|
+
--void-type-caption-weight: var(--void-weight-normal);
|
|
426
|
+
--void-type-caption-color: var(--void-color-text-secondary);
|
|
427
|
+
|
|
428
|
+
/* heading: a section heading. title: the page title. */
|
|
429
|
+
--void-type-heading-family: var(--void-font-sans);
|
|
430
|
+
--void-type-heading-size: var(--void-text-lg);
|
|
431
|
+
--void-type-heading-leading: 1.3;
|
|
432
|
+
--void-type-heading-weight: var(--void-weight-medium);
|
|
433
|
+
--void-type-heading-tracking: -0.01em;
|
|
434
|
+
--void-type-heading-color: var(--void-color-text);
|
|
435
|
+
|
|
436
|
+
--void-type-title-family: var(--void-type-heading-family);
|
|
437
|
+
--void-type-title-size: var(--void-text-2xl);
|
|
438
|
+
--void-type-title-leading: 1.2;
|
|
439
|
+
--void-type-title-weight: var(--void-type-heading-weight);
|
|
440
|
+
--void-type-title-tracking: -0.02em;
|
|
441
|
+
--void-type-title-color: var(--void-color-text);
|
|
442
|
+
|
|
443
|
+
/* display: the one large line of a hero or a media surface. */
|
|
444
|
+
--void-type-display-family: var(--void-type-heading-family);
|
|
445
|
+
--void-type-display-size: clamp(var(--void-text-4xl), 5.2vw, calc(var(--void-font-size) * 4.5714));
|
|
446
|
+
--void-type-display-leading: 1.05;
|
|
447
|
+
--void-type-display-weight: var(--void-type-heading-weight);
|
|
448
|
+
--void-type-display-tracking: -0.03em;
|
|
449
|
+
--void-type-display-color: var(--void-color-text);
|
|
450
|
+
|
|
451
|
+
/* lede: the sentence or two under a title. */
|
|
452
|
+
--void-type-lede-family: var(--void-font-sans);
|
|
453
|
+
--void-type-lede-size: var(--void-text-md);
|
|
454
|
+
--void-type-lede-leading: var(--void-leading-relaxed);
|
|
455
|
+
--void-type-lede-weight: var(--void-weight-normal);
|
|
456
|
+
--void-type-lede-color: var(--void-color-text-secondary);
|
|
457
|
+
|
|
458
|
+
/* body: default running text. */
|
|
459
|
+
--void-type-body-family: var(--void-font-sans);
|
|
460
|
+
--void-type-body-size: var(--void-text-base);
|
|
461
|
+
--void-type-body-leading: var(--void-leading-normal);
|
|
462
|
+
--void-type-body-weight: var(--void-weight-normal);
|
|
463
|
+
--void-type-body-color: var(--void-color-text);
|
|
464
|
+
|
|
465
|
+
/* code: ids, configuration, anything typed exactly. */
|
|
466
|
+
--void-type-code-family: var(--void-font-mono);
|
|
467
|
+
--void-type-code-size: var(--void-text-sm);
|
|
468
|
+
--void-type-code-weight: var(--void-weight-normal);
|
|
469
|
+
--void-type-code-numeric: tabular-nums;
|
|
470
|
+
--void-type-code-color: var(--void-color-text);
|
|
471
|
+
|
|
472
|
+
/* ── Border radius (radius knob) ──
|
|
473
|
+
md is the control radius, the knob itself. Larger steps grow from
|
|
474
|
+
it but stop short of turning containers into ovals when the knob
|
|
475
|
+
is set to a pill. */
|
|
476
|
+
--void-radius-base: calc(var(--void-radius) * var(--void-shape));
|
|
477
|
+
--void-radius-xs: min(calc(var(--void-radius-base) * 0.5), 5px);
|
|
478
|
+
--void-radius-sm: min(calc(var(--void-radius-base) * 0.75), 10px);
|
|
479
|
+
--void-radius-md: var(--void-radius-base);
|
|
480
|
+
--void-radius-lg: min(calc(var(--void-radius-base) * 2), calc(var(--void-radius-base) + 8px), 24px);
|
|
481
|
+
--void-radius-xl: min(calc(var(--void-radius-base) * 4), calc(var(--void-radius-base) + 16px), 32px);
|
|
482
|
+
--void-radius-full: calc(var(--void-radius-base) * 9999);
|
|
483
|
+
|
|
484
|
+
/* ── Motion — durations (anim-scale knob) ── */
|
|
485
|
+
--void-duration-fast: calc(120ms * var(--void-anim-scale));
|
|
486
|
+
--void-duration-normal: calc(200ms * var(--void-anim-scale));
|
|
487
|
+
--void-duration-slow: calc(300ms * var(--void-anim-scale));
|
|
488
|
+
|
|
489
|
+
/* ── Structural roles ──
|
|
490
|
+
What a kind of component is drawn with. Each is a semantic token by
|
|
491
|
+
default, so nothing changes until a skin sets one; components read
|
|
492
|
+
them through their own token first:
|
|
493
|
+
|
|
494
|
+
box-shadow: var(--void-card-shadow, var(--void-container-shadow));
|
|
495
|
+
|
|
496
|
+
A skin sets a role to restyle every component of that kind, and a
|
|
497
|
+
component token for the exception. Component tokens are never
|
|
498
|
+
declared here: an unset custom property costs nothing, and one
|
|
499
|
+
declaration of it anywhere (an element, a subtree, :root) wins. */
|
|
500
|
+
|
|
501
|
+
/* container: a box that groups content on the page. Card, panel,
|
|
502
|
+
stat; alert and the section and figure patterns can join it. */
|
|
503
|
+
--void-container-surface: var(--void-color-surface);
|
|
504
|
+
--void-container-border: var(--void-color-border);
|
|
505
|
+
--void-container-border-width: 1px;
|
|
506
|
+
--void-container-radius: var(--void-radius-lg);
|
|
507
|
+
--void-container-shadow: none;
|
|
508
|
+
|
|
509
|
+
/* float: a box that lies over the page. Menu, popover, dropdown,
|
|
510
|
+
select list, hover card, toast; dialog and drawer for their panel. */
|
|
511
|
+
--void-float-surface: var(--void-color-bg-elevated);
|
|
512
|
+
--void-float-border: var(--void-color-border);
|
|
513
|
+
--void-float-border-width: 1px;
|
|
514
|
+
--void-float-radius: var(--void-radius-lg);
|
|
515
|
+
--void-float-shadow: var(--void-shadow-md);
|
|
516
|
+
|
|
517
|
+
/* control: anything pressed or typed into. Size steps are the
|
|
518
|
+
--void-control-height|padding|text tokens above; border is the
|
|
519
|
+
edge that is its only boundary (3:1). */
|
|
520
|
+
--void-control-radius: var(--void-radius-md);
|
|
521
|
+
--void-control-border: var(--void-color-border-control);
|
|
522
|
+
--void-control-border-width: 1px;
|
|
523
|
+
|
|
524
|
+
/* field: a control text is entered or chosen in. Input, textarea,
|
|
525
|
+
select, combobox, number, pin, tags and the like. */
|
|
526
|
+
--void-field-surface: var(--void-color-surface);
|
|
527
|
+
--void-field-border: var(--void-control-border);
|
|
528
|
+
|
|
529
|
+
/* item: one of a set you move between. The link to the current page,
|
|
530
|
+
the selected item of a list. */
|
|
531
|
+
--void-item-surface-selected: var(--void-color-bg-hover);
|
|
532
|
+
--void-item-ink-selected: var(--void-color-text);
|
|
533
|
+
|
|
534
|
+
/* rule: a line that separates. A whole border (width, style,
|
|
535
|
+
colour), so `none` switches it off and `2px solid …` makes it
|
|
536
|
+
heavy. between: items of one group (rows, cells, figures). edge:
|
|
537
|
+
the line that opens and closes a group. head: under a heading (the
|
|
538
|
+
page head, a divided section, a card header, a table header).
|
|
539
|
+
frame: the line all the way round a box that has no fill of its own
|
|
540
|
+
(a bordered card or panel, a bordered table, a collapsible). */
|
|
541
|
+
--void-rule: 1px solid var(--void-color-border);
|
|
542
|
+
--void-rule-between: var(--void-rule);
|
|
543
|
+
--void-rule-edge: var(--void-rule);
|
|
544
|
+
--void-rule-head: var(--void-rule);
|
|
545
|
+
--void-rule-frame: var(--void-rule);
|
|
546
|
+
|
|
547
|
+
/* ── Charts ── */
|
|
548
|
+
--void-chart-series-1: var(--void-color-accent);
|
|
549
|
+
--void-chart-series-2: var(--void-color-info);
|
|
550
|
+
--void-chart-series-3: var(--void-color-success);
|
|
551
|
+
--void-chart-series-4: var(--void-color-warning);
|
|
552
|
+
--void-chart-series-5: var(--void-color-error);
|
|
553
|
+
--void-chart-series-6: var(--void-color-notice);
|
|
554
|
+
|
|
555
|
+
--void-chart-grid: var(--void-color-border);
|
|
556
|
+
--void-chart-axis: var(--void-color-border-strong);
|
|
557
|
+
--void-chart-tick-label: var(--void-color-text-muted);
|
|
104
558
|
}
|
|
105
559
|
|
|
106
|
-
/* ──
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
--void-
|
|
560
|
+
/* ── Scoped regions ──
|
|
561
|
+
Text colour and font inherit, so a region with its own scheme or
|
|
562
|
+
theme re-resolves them from its own tokens. The background is
|
|
563
|
+
deliberately not painted here: body paints it for the root, and a
|
|
564
|
+
region's surfaces come from the components inside it. */
|
|
565
|
+
[data-theme],
|
|
566
|
+
[data-void-theme] {
|
|
567
|
+
color: var(--void-color-text);
|
|
114
568
|
}
|