@axiapps/axi-design 1.6.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/src/tokens.css ADDED
@@ -0,0 +1,83 @@
1
+ /* axi design language - tokens.
2
+ The only file in this system permitted to contain a colour literal. Every
3
+ component resolves its colours through the names below, which is what keeps
4
+ a future light theme a palette swap instead of a rewrite.
5
+
6
+ Three layers:
7
+ - surface & text: the neutral ramp the language is drawn on
8
+ - accent & status: the per-app override surface. An app that sets
9
+ --axi-accent and nothing else is correctly themed.
10
+ - form: geometry and type. Shared by every property; overriding these
11
+ means leaving the design language, not theming it. */
12
+ :root {
13
+ /* --- surface & text --- */
14
+ --axi-ground: #15181d; /* the page itself */
15
+ --axi-surface: #222731; /* a panel raised off the page */
16
+ --axi-surface-raised: #2b313d; /* a chip or popover raised off a panel */
17
+ --axi-ink-line: #0c0e12; /* the outline every raised element is drawn with */
18
+ --axi-rule: #3a4250; /* internal rules, inside an outlined panel */
19
+ --axi-text: #f4f6f9;
20
+ --axi-text-dim: #a7b0be;
21
+ --axi-text-faint: #7c8695;
22
+ --axi-scrim: rgba(6, 7, 9, .72); /* behind a drawer */
23
+
24
+ /* --- accent & status --- */
25
+ --axi-accent: #ffc53d;
26
+ /* Text drawn on top of an accent fill. Near-black suits every accent bright
27
+ enough to pass contrast on this ground; an app choosing a dark accent
28
+ overrides this to --axi-text rather than editing components. */
29
+ --axi-accent-ink: var(--axi-ink-line);
30
+ --axi-meta: #4ec3ff; /* the one cool ink: meta only, never a status */
31
+ --axi-ok: #2fd38a;
32
+ --axi-warn: #ff7a2f;
33
+ --axi-danger: #ff5252;
34
+
35
+ /* --- form: outline and offset --- */
36
+ /* Two steps, and only two. A panel is drawn heavier than a control so a
37
+ toolbar full of controls still reads as sitting inside its panel. */
38
+ --axi-border-panel: 4px;
39
+ --axi-offset-panel: 6px;
40
+ --axi-border-control: 3px;
41
+ --axi-offset-control: 3px;
42
+ /* The deepened blocks a hover lifts into. Not a third and fourth step: a
43
+ step is a border+offset pair a thing rests at, and nothing rests at
44
+ these. They are tokenised so the offset check can enumerate every legal
45
+ block instead of admitting bare literals. */
46
+ --axi-offset-panel-hover: 10px;
47
+ --axi-offset-control-hover: 6px;
48
+ --axi-radius: 10px;
49
+ --axi-radius-sm: 6px;
50
+ /* Not a form step: a hairline used inside prose (inline code, table rules,
51
+ the list bullet) where the two form steps above would read as too heavy
52
+ for a line of running text. */
53
+ --axi-border-hairline: 2px;
54
+
55
+ /* --- form: measure --- */
56
+ --axi-page: 1280px; /* the default reading//browsing width */
57
+ --axi-page-narrow: 46rem; /* prose */
58
+ --axi-page-wide: 1660px; /* dense card grids */
59
+ --axi-gutter: 18px;
60
+
61
+ /* --- form: type --- */
62
+ --axi-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable", "Segoe UI", Roboto, sans-serif;
63
+ --axi-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
64
+ /* Font shorthands, so a component sets `font: var(--axi-t-h2)` in one
65
+ declaration. Tracking cannot ride in the shorthand, so the headings that
66
+ need it carry a paired --axi-ls-* token. */
67
+ --axi-t-display: 900 54px/1.02 var(--axi-sans);
68
+ --axi-ls-display: -.045em;
69
+ --axi-t-h1: 900 30px/1.1 var(--axi-sans);
70
+ --axi-ls-h1: -.035em;
71
+ --axi-t-h2: 900 24px/1.15 var(--axi-sans);
72
+ --axi-ls-h2: -.035em;
73
+ --axi-t-h3: 900 19px/1.2 var(--axi-sans);
74
+ --axi-ls-h3: -.025em;
75
+ --axi-t-body: 400 15px/1.55 var(--axi-sans);
76
+ --axi-t-small: 400 13.5px/1.5 var(--axi-sans);
77
+ --axi-t-label: 800 13px/1 var(--axi-sans);
78
+ --axi-ls-label: .02em;
79
+ --axi-t-micro: 800 11px/1 var(--axi-sans);
80
+ --axi-ls-micro: .04em;
81
+ --axi-t-eyebrow: 900 11.5px/1 var(--axi-sans);
82
+ --axi-ls-eyebrow: .1em;
83
+ }