@brignano/design 0.13.0 → 0.15.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/DESIGN.md +164 -34
- package/README.md +51 -4
- package/components.css +249 -249
- package/controls.css +238 -238
- package/decisions/0001-cobalt.md +1 -1
- package/decisions/0008-cobalt-hue-256.md +1 -1
- package/decisions/0014-identity.md +1 -1
- package/decisions/0015-white-label-on-cobalt.md +1 -1
- package/decisions/0017-product-identity.md +1 -1
- package/decisions/0019-house-theme-shell.md +51 -0
- package/decisions/0020-kits-opt-in.md +56 -0
- package/decisions/0021-ab-logo.md +29 -0
- package/decisions/README.md +3 -0
- package/kits/larch.css +125 -0
- package/kits/ledger.css +121 -0
- package/kits/split.css +123 -0
- package/logo/mark.svg +4 -4
- package/logo/paths.mjs +14 -11
- package/logo/tile-180.png +0 -0
- package/logo/tile-512.png +0 -0
- package/logo/tile.svg +3 -3
- package/package.json +9 -1
- package/product-page.css +82 -82
- package/scripts/colour.mjs +42 -0
- package/scripts/theme.mjs +190 -0
- package/tailwind.css +13 -20
- package/templates/app-shell.css +15 -15
- package/templates/article.css +26 -26
- package/templates/changelog.css +9 -9
- package/templates/email.html +3 -3
- package/templates/error.css +7 -7
- package/templates/legal.css +11 -11
- package/templates/settings.css +9 -9
- package/themes/driftwood.css +109 -0
- package/themes/driftwood.theme +5 -0
- package/themes/guidebook.css +104 -0
- package/themes/guidebook.theme +5 -0
- package/themes/homelab.css +101 -0
- package/themes/homelab.theme +2 -0
- package/themes/receipts.css +101 -0
- package/themes/receipts.theme +2 -0
- package/themes/sites.css +106 -0
- package/themes/sites.theme +7 -0
- package/tokens/base.css +37 -0
- package/tokens/chart.json +145 -0
- package/tokens/color.json +840 -0
- package/tokens/component.json +75 -0
- package/tokens/head.css +84 -0
- package/tokens/kits/larch.json +255 -0
- package/tokens/kits/ledger.json +247 -0
- package/tokens/kits/split.json +247 -0
- package/tokens/motion.json +38 -0
- package/tokens/names.d.ts +246 -0
- package/tokens/shape.json +56 -0
- package/tokens/space.json +99 -0
- package/tokens/tailwind.json +343 -0
- package/tokens/type.json +206 -0
- package/tokens.chart.css +23 -23
- package/tokens.css +278 -136
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
// theme.mjs — a product's theme file in, the tokens it sets out.
|
|
2
|
+
//
|
|
3
|
+
// A theme is a few lines a person can read (themes/<product>.theme):
|
|
4
|
+
//
|
|
5
|
+
// kit: larch # split, ledger or larch: the look it starts from
|
|
6
|
+
// ground: wash # plain (the kit's), bright or wash
|
|
7
|
+
// scheme: dark # both (the default) or dark, which pins the product dark
|
|
8
|
+
// hue: 355 # what acts, as an OKLCH hue, 0 to 360
|
|
9
|
+
// typeface: onest # headings; `mono` sets everything in the kit's mono
|
|
10
|
+
// heading-weight: 500
|
|
11
|
+
// corners: 16 # px, or `pill`
|
|
12
|
+
// shell: conversation # the shape of the main screen (ADR-0019)
|
|
13
|
+
//
|
|
14
|
+
// A key left out takes the kit's value. scripts/build.mjs lays what this
|
|
15
|
+
// returns over the kit and writes themes/<product>.css; it refuses a theme
|
|
16
|
+
// whose colours miss a contrast floor (gate(), below).
|
|
17
|
+
//
|
|
18
|
+
// THE STEPS. Every derived colour is a fixed lightness and chroma at the
|
|
19
|
+
// theme's hue, [light, dark]. They are written out here, once, so a theme is
|
|
20
|
+
// a hue and never a palette. Measured results for the five shipped themes are
|
|
21
|
+
// in DESIGN.md §11.
|
|
22
|
+
import { oklchToHex, contrast } from './colour.mjs';
|
|
23
|
+
|
|
24
|
+
export const KEYS = ['kit', 'ground', 'scheme', 'hue', 'typeface', 'heading-weight', 'corners', 'shell'];
|
|
25
|
+
const KITS = ['split', 'ledger', 'larch'];
|
|
26
|
+
const GROUNDS = ['plain', 'bright', 'wash'];
|
|
27
|
+
const SHELLS = ['console', 'canvas', 'player', 'conversation', 'document'];
|
|
28
|
+
const FACES = {
|
|
29
|
+
archivo: "'Archivo', system-ui, sans-serif",
|
|
30
|
+
'martian-mono': "'Martian Mono', ui-monospace, monospace",
|
|
31
|
+
newsreader: "'Newsreader', Georgia, serif",
|
|
32
|
+
'instrument-sans': "'Instrument Sans', system-ui, sans-serif",
|
|
33
|
+
'bricolage-grotesque': "'Bricolage Grotesque', system-ui, sans-serif",
|
|
34
|
+
onest: "'Onest', system-ui, sans-serif",
|
|
35
|
+
'ibm-plex-mono': "'IBM Plex Mono', ui-monospace, monospace",
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// Ground, by hue. [l, c] light then dark. The card is lighter than the page
|
|
39
|
+
// in light: state marks and chart series need a surface near white (ADR-0020).
|
|
40
|
+
const GROUND = {
|
|
41
|
+
bright: {
|
|
42
|
+
bg: [[0.975, 0.008], [0.17, 0.02]], card: [[0.995, 0.003], [0.225, 0.026]],
|
|
43
|
+
'surface-hover': [[0.96, 0.012], [0.265, 0.03]], 'surface-active': [[0.935, 0.016], [0.3, 0.032]],
|
|
44
|
+
},
|
|
45
|
+
wash: {
|
|
46
|
+
bg: [[0.95, 0.032], [0.19, 0.025]], card: [[0.985, 0.012], [0.24, 0.03]],
|
|
47
|
+
'surface-hover': [[0.96, 0.02], [0.28, 0.034]], 'surface-active': [[0.935, 0.026], [0.315, 0.036]],
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
// Text and lines on a hued ground.
|
|
51
|
+
const TEXT = {
|
|
52
|
+
ink: [[0.21, 0.03], [0.96, 0.012]], 'ink-soft': [[0.38, 0.033], [0.84, 0.02]], slate: [[0.46, 0.033], [0.74, 0.025]],
|
|
53
|
+
line: [[0.9, 0.02], [0.32, 0.03]], 'line-soft': [[0.93, 0.018], [0.27, 0.028]], 'line-strong': [[0.8, 0.024], [0.42, 0.034]],
|
|
54
|
+
'line-control': [[0.56, 0.045], [0.63, 0.045]], 'disabled-ink': [[0.62, 0.025], [0.52, 0.025]],
|
|
55
|
+
};
|
|
56
|
+
// The action colour, two ways.
|
|
57
|
+
// signal: a bright fill with an ink label (Split). The same in both schemes.
|
|
58
|
+
// deep: a deep fill with a light label in light, a pale fill with a dark
|
|
59
|
+
// label in dark (Ledger, Larch).
|
|
60
|
+
const SIGNAL = { action: [0.84, 0.12], 'action-hover': [0.78, 0.115], 'action-pressed': [0.72, 0.11] };
|
|
61
|
+
const DEEP = {
|
|
62
|
+
action: [[0.5, 0.2], [0.8, 0.12]], 'action-hover': [[0.44, 0.19], [0.74, 0.12]], 'action-pressed': [[0.38, 0.17], [0.68, 0.115]],
|
|
63
|
+
'action-ink-hover': [[0.4, 0.18], [0.89, 0.08]],
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export function parse(name, text) {
|
|
67
|
+
const out = {}, at = {};
|
|
68
|
+
text.split('\n').forEach((raw, i) => {
|
|
69
|
+
const line = raw.replace(/#.*$/, '').trim();
|
|
70
|
+
if (!line) return;
|
|
71
|
+
const m = line.match(/^([a-z-]+):\s*(.+)$/);
|
|
72
|
+
if (!m) throw new Error(`themes/${name}.theme:${i + 1}: expected \`key: value\`, got \`${raw.trim()}\``);
|
|
73
|
+
if (!KEYS.includes(m[1])) throw new Error(`themes/${name}.theme:${i + 1}: \`${m[1]}\` is not a theme key (${KEYS.join(', ')})`);
|
|
74
|
+
if (m[1] in out) throw new Error(`themes/${name}.theme:${i + 1}: \`${m[1]}\` is set twice`);
|
|
75
|
+
out[m[1]] = m[2].trim();
|
|
76
|
+
at[m[1]] = i + 1;
|
|
77
|
+
});
|
|
78
|
+
const need = (ok, key, hint) => { if (!ok) throw new Error(`themes/${name}.theme:${at[key]}: \`${key}: ${out[key]}\` ${hint}`); };
|
|
79
|
+
if (!out.kit) throw new Error(`themes/${name}.theme: a theme names its \`kit\` (${KITS.join(', ')})`);
|
|
80
|
+
need(KITS.includes(out.kit), 'kit', `is not a kit (${KITS.join(', ')})`);
|
|
81
|
+
if ('ground' in out) need(GROUNDS.includes(out.ground), 'ground', `is not a ground (${GROUNDS.join(', ')})`);
|
|
82
|
+
if ('scheme' in out) need(['both', 'dark'].includes(out.scheme), 'scheme', 'must be `both` or `dark`');
|
|
83
|
+
if ('hue' in out) need(/^\d+(\.\d+)?$/.test(out.hue) && +out.hue <= 360, 'hue', 'must be a number from 0 to 360');
|
|
84
|
+
if ('typeface' in out) need(out.typeface === 'mono' || out.typeface in FACES, 'typeface', `is not a face this system ships (mono, ${Object.keys(FACES).join(', ')})`);
|
|
85
|
+
if ('heading-weight' in out) need(/^[1-9]00$/.test(out['heading-weight']), 'heading-weight', 'must be 100 to 900');
|
|
86
|
+
if ('corners' in out) need(out.corners === 'pill' || /^\d+$/.test(out.corners), 'corners', 'must be a number of px, or `pill`');
|
|
87
|
+
if ('shell' in out) need(SHELLS.includes(out.shell), 'shell', `is not a shell (${SHELLS.join(', ')})`);
|
|
88
|
+
if ((out.ground ?? 'plain') !== 'plain' && !('hue' in out)) throw new Error(`themes/${name}.theme:${at.ground}: \`ground: ${out.ground}\` is tinted with the theme's hue, so it needs a \`hue\``);
|
|
89
|
+
return out;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// One light-dark() declaration from two [l, c] steps at a hue.
|
|
93
|
+
const pair = ([light, dark], h) => `light-dark(${oklchToHex(light[0], light[1], h)}, ${oklchToHex(dark[0], dark[1], h)})`;
|
|
94
|
+
const sides = (value) => {
|
|
95
|
+
const m = value.match(/^light-dark\((#[0-9a-f]{6}),\s*(#[0-9a-f]{6})\)$/i);
|
|
96
|
+
if (!m) throw new Error(`expected light-dark(#hex, #hex), got ${value}`);
|
|
97
|
+
return [m[1], m[2]];
|
|
98
|
+
};
|
|
99
|
+
const wash = ([l, d], lp, dp) => `light-dark(color-mix(in srgb, ${l} ${lp}%, transparent), color-mix(in srgb, ${d} ${dp}%, transparent))`;
|
|
100
|
+
|
|
101
|
+
// The tokens a theme sets on top of its kit. `kit` is the kit's own tokens,
|
|
102
|
+
// name -> value, so a step can read what it sits on (the ink, the page).
|
|
103
|
+
export function derive(theme, kit) {
|
|
104
|
+
const set = new Map();
|
|
105
|
+
const h = +theme.hue;
|
|
106
|
+
const ground = theme.ground ?? 'plain';
|
|
107
|
+
|
|
108
|
+
if (ground !== 'plain') {
|
|
109
|
+
for (const [k, steps] of Object.entries({ ...GROUND[ground], ...TEXT })) set.set(k, pair(steps, h));
|
|
110
|
+
const [cardLight] = sides(set.get('card')), [, bgDark] = sides(set.get('bg'));
|
|
111
|
+
set.set('surface-sticky', `light-dark(color-mix(in srgb, ${cardLight} 92%, transparent), color-mix(in srgb, ${bgDark} 92%, transparent))`);
|
|
112
|
+
set.set('on-dark', set.get('bg'));
|
|
113
|
+
set.set('disabled', set.get('surface-active'));
|
|
114
|
+
// charts sit on the lightest paper in light, the card in dark
|
|
115
|
+
set.set('chart-surface', `light-dark(${oklchToHex(0.995, 0.003, h)}, ${sides(set.get('card'))[1]})`);
|
|
116
|
+
}
|
|
117
|
+
const now = (k) => set.get(k) ?? kit.get(k);
|
|
118
|
+
|
|
119
|
+
if ('hue' in theme) {
|
|
120
|
+
if (theme.kit === 'split') {
|
|
121
|
+
// signal: one bright fill, the kit's ink as its label, in both schemes.
|
|
122
|
+
const [inkLight] = sides(kit.get('ink'));
|
|
123
|
+
for (const [k, [l, c]] of Object.entries(SIGNAL)) { const x = oklchToHex(l, c, h); set.set(k, `light-dark(${x}, ${x})`); }
|
|
124
|
+
const [fill] = sides(set.get('action'));
|
|
125
|
+
set.set('on-action', `light-dark(${inkLight}, ${inkLight})`);
|
|
126
|
+
// the fill carries itself where it can be found on the page; else ink does
|
|
127
|
+
const edge = sides(now('bg')).map((bg, i) => (contrast(fill, bg) >= 3 ? fill : sides(now('ink'))[i]));
|
|
128
|
+
set.set('action-edge', `light-dark(${edge[0]}, ${edge[1]})`);
|
|
129
|
+
set.set('accent', set.get('action'));
|
|
130
|
+
set.set('on-accent', set.get('on-action'));
|
|
131
|
+
} else {
|
|
132
|
+
for (const [k, steps] of Object.entries(DEEP)) set.set(k, pair(steps, h));
|
|
133
|
+
const [, bgDark] = sides(now('bg'));
|
|
134
|
+
set.set('on-action', `light-dark(${oklchToHex(0.99, 0.004, h)}, ${bgDark})`);
|
|
135
|
+
set.set('action-edge', set.get('action'));
|
|
136
|
+
set.set('action-ink', set.get('action'));
|
|
137
|
+
}
|
|
138
|
+
const fills = sides(set.get('action'));
|
|
139
|
+
set.set('action-surface', wash(fills, 12, 20));
|
|
140
|
+
set.set('action-line', wash(fills, 32, 44));
|
|
141
|
+
set.set('action-selection', wash(fills, 26, 30));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (theme.typeface === 'mono') {
|
|
145
|
+
set.set('sans', kit.get('mono'));
|
|
146
|
+
set.set('display', kit.get('mono'));
|
|
147
|
+
set.set('display-stretch', 'normal');
|
|
148
|
+
} else if (theme.typeface) set.set('display', FACES[theme.typeface]);
|
|
149
|
+
if (theme['heading-weight']) set.set('weight-heavy', theme['heading-weight']);
|
|
150
|
+
if (theme.corners === 'pill') { set.set('button-radius', '999px'); set.set('pill-radius', '999px'); }
|
|
151
|
+
else if (theme.corners) {
|
|
152
|
+
const n = +theme.corners;
|
|
153
|
+
set.set('radius-sm', `${Math.round(n / 2)}px`);
|
|
154
|
+
set.set('radius-control', `${n}px`);
|
|
155
|
+
set.set('radius-card', `${Math.round(n * 1.5)}px`);
|
|
156
|
+
set.set('radius-lg', `${n * 2}px`);
|
|
157
|
+
}
|
|
158
|
+
return set;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// The generator's own gate: the floors a theme can break by its hue or
|
|
162
|
+
// ground. `npm run check` then holds the built file to every token floor.
|
|
163
|
+
// Returns the failures as sentences; none means the theme may be written.
|
|
164
|
+
export function gate(name, tokens, schemes) {
|
|
165
|
+
const TEXT_FLOOR = 4.5, EDGE_FLOOR = 3;
|
|
166
|
+
const get = (k, i) => {
|
|
167
|
+
let v = tokens.get(k);
|
|
168
|
+
for (let n = 0; n < 8 && /^var\(--/.test(v); n++) v = tokens.get(v.slice(6, -1));
|
|
169
|
+
return sides(v)[i];
|
|
170
|
+
};
|
|
171
|
+
const pairs = [];
|
|
172
|
+
for (const bg of ['bg', 'card']) {
|
|
173
|
+
for (const fg of ['ink', 'ink-soft', 'slate', 'action-ink', 'action-ink-hover']) pairs.push([fg, bg, TEXT_FLOOR]);
|
|
174
|
+
pairs.push(['line-control', bg, EDGE_FLOOR]);
|
|
175
|
+
}
|
|
176
|
+
for (const bg of ['action', 'action-hover', 'action-pressed']) pairs.push(['on-action', bg, TEXT_FLOOR]);
|
|
177
|
+
pairs.push(['on-accent', 'accent', TEXT_FLOOR], ['ink', 'surface-hover', TEXT_FLOOR], ['ink', 'surface-active', TEXT_FLOOR]);
|
|
178
|
+
const out = [];
|
|
179
|
+
for (const [label, i] of schemes) {
|
|
180
|
+
for (const [fg, bg, floor] of pairs) {
|
|
181
|
+
const r = contrast(get(fg, i), get(bg, i));
|
|
182
|
+
if (r < floor) out.push(`themes/${name}.theme (${label}): --${fg} on --${bg} is ${r.toFixed(2)}:1 (${get(fg, i)} on ${get(bg, i)}), needs ${floor}:1`);
|
|
183
|
+
}
|
|
184
|
+
for (const bg of ['bg', 'card']) {
|
|
185
|
+
const r = Math.max(contrast(get('action', i), get(bg, i)), contrast(get('action-edge', i), get(bg, i)));
|
|
186
|
+
if (r < EDGE_FLOOR) out.push(`themes/${name}.theme (${label}): neither --action nor --action-edge reaches ${EDGE_FLOOR}:1 on --${bg} (${r.toFixed(2)}:1)`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return out;
|
|
190
|
+
}
|
package/tailwind.css
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* GENERATED by scripts/build.mjs from tokens/tailwind.json. Edit that, then `npm run build`. */
|
|
2
|
+
|
|
1
3
|
/* Tailwind v4 bridge for @brignano/design.
|
|
2
4
|
Import AFTER tokens.css and after `@import "tailwindcss"`:
|
|
3
5
|
|
|
@@ -6,11 +8,12 @@
|
|
|
6
8
|
@import "@brignano/design/tailwind.css";
|
|
7
9
|
|
|
8
10
|
`@theme inline` is load-bearing: it makes the generated utilities emit
|
|
9
|
-
`var(--
|
|
11
|
+
`var(--action)` rather than baking a literal at build time, so `bg-interactive`
|
|
10
12
|
follows the light/dark switch instead of freezing one theme's value.
|
|
11
13
|
|
|
12
14
|
The bare `--radius` key is what drives `rounded`. Tailwind v4 has no
|
|
13
15
|
`-DEFAULT` suffix; with one, `rounded` silently stayed at 0.25rem. */
|
|
16
|
+
|
|
14
17
|
@theme inline {
|
|
15
18
|
--color-ink: var(--ink);
|
|
16
19
|
--color-ink-soft: var(--ink-soft);
|
|
@@ -25,20 +28,18 @@
|
|
|
25
28
|
--color-surface-active: var(--surface-active);
|
|
26
29
|
--color-surface-sticky: var(--surface-sticky);
|
|
27
30
|
--color-on-dark: var(--on-dark);
|
|
28
|
-
|
|
29
|
-
--color-interactive: var(--
|
|
30
|
-
--color-interactive-ink: var(--
|
|
31
|
-
--color-interactive-
|
|
32
|
-
--color-interactive-
|
|
33
|
-
--color-interactive-
|
|
34
|
-
--color-interactive-
|
|
35
|
-
--color-interactive
|
|
36
|
-
--color-on-interactive: var(--on-i);
|
|
31
|
+
--color-interactive: var(--action);
|
|
32
|
+
--color-interactive-ink: var(--action-ink);
|
|
33
|
+
--color-interactive-ink-hover: var(--action-ink-hover);
|
|
34
|
+
--color-interactive-hover: var(--action-hover);
|
|
35
|
+
--color-interactive-pressed: var(--action-pressed);
|
|
36
|
+
--color-interactive-surface: var(--action-surface);
|
|
37
|
+
--color-interactive-line: var(--action-line);
|
|
38
|
+
--color-on-interactive: var(--on-action);
|
|
37
39
|
--color-danger-fill: var(--danger-fill);
|
|
38
40
|
--color-danger-fill-hover: var(--danger-fill-hover);
|
|
39
41
|
--color-danger-fill-pressed: var(--danger-fill-pressed);
|
|
40
42
|
--color-on-danger: var(--on-danger);
|
|
41
|
-
|
|
42
43
|
--color-success: var(--success);
|
|
43
44
|
--color-success-ink: var(--success-ink);
|
|
44
45
|
--color-success-surface: var(--success-surface);
|
|
@@ -55,7 +56,6 @@
|
|
|
55
56
|
--color-info-ink: var(--info-ink);
|
|
56
57
|
--color-info-surface: var(--info-surface);
|
|
57
58
|
--color-info-line: var(--info-line);
|
|
58
|
-
|
|
59
59
|
--color-diff-added: var(--diff-added);
|
|
60
60
|
--color-diff-added-ink: var(--diff-added-ink);
|
|
61
61
|
--color-diff-added-surface: var(--diff-added-surface);
|
|
@@ -65,14 +65,12 @@
|
|
|
65
65
|
--color-diff-removed: var(--diff-removed);
|
|
66
66
|
--color-diff-removed-ink: var(--diff-removed-ink);
|
|
67
67
|
--color-diff-removed-surface: var(--diff-removed-surface);
|
|
68
|
-
|
|
69
68
|
--color-code-surface: var(--code-surface);
|
|
70
69
|
--color-code-ink: var(--code-ink);
|
|
71
70
|
--color-code-keyword: var(--code-keyword);
|
|
72
71
|
--color-code-string: var(--code-string);
|
|
73
72
|
--color-code-comment: var(--code-comment);
|
|
74
73
|
--color-code-highlight: var(--code-highlight);
|
|
75
|
-
|
|
76
74
|
--color-mark: var(--mark);
|
|
77
75
|
--color-mark-ink: var(--mark-ink);
|
|
78
76
|
--color-mark-fill: var(--mark-fill);
|
|
@@ -80,11 +78,9 @@
|
|
|
80
78
|
--color-mark-fill-pressed: var(--mark-fill-pressed);
|
|
81
79
|
--color-mark-surface: var(--mark-surface);
|
|
82
80
|
--color-on-mark: var(--on-mark);
|
|
83
|
-
|
|
84
81
|
--font-sans: var(--sans);
|
|
85
82
|
--font-mono: var(--mono);
|
|
86
83
|
--font-display: var(--display);
|
|
87
|
-
|
|
88
84
|
/* Weights match Tailwind's own, so font-medium and font-semibold are
|
|
89
85
|
unchanged. Leading and tracking are named by role, not tight/snug/…,
|
|
90
86
|
so they ADD leading-display, tracking-title and the rest and leave
|
|
@@ -99,15 +95,12 @@
|
|
|
99
95
|
--tracking-title: var(--tracking-title);
|
|
100
96
|
--tracking-display: var(--tracking-display);
|
|
101
97
|
--tracking-caps: var(--tracking-caps);
|
|
102
|
-
|
|
103
98
|
--radius-sm: var(--radius-sm);
|
|
104
99
|
--radius-control: var(--radius-control);
|
|
105
|
-
--radius: var(--radius);
|
|
100
|
+
--radius: var(--radius-card);
|
|
106
101
|
--radius-lg: var(--radius-lg);
|
|
107
|
-
|
|
108
102
|
--shadow-1: var(--shadow-1);
|
|
109
103
|
--shadow-2: var(--shadow-2);
|
|
110
104
|
--shadow-3: var(--shadow-3);
|
|
111
|
-
|
|
112
105
|
--ease-brand: var(--ease);
|
|
113
106
|
}
|
package/templates/app-shell.css
CHANGED
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
grid-template-areas: "head" "main";
|
|
86
86
|
}
|
|
87
87
|
.app-shell-grid > .site-header { grid-area: head; position: relative; }
|
|
88
|
-
.app-shell .site-header-inner { padding-inline: var(--
|
|
88
|
+
.app-shell .site-header-inner { padding-inline: var(--space-3); }
|
|
89
89
|
|
|
90
90
|
.app-main {
|
|
91
91
|
grid-area: main;
|
|
@@ -103,13 +103,13 @@
|
|
|
103
103
|
box-sizing: border-box;
|
|
104
104
|
display: none;
|
|
105
105
|
flex-direction: column;
|
|
106
|
-
gap: var(--
|
|
106
|
+
gap: var(--space-4);
|
|
107
107
|
position: static;
|
|
108
108
|
inset: auto;
|
|
109
109
|
width: auto;
|
|
110
110
|
height: auto;
|
|
111
111
|
margin: 0;
|
|
112
|
-
padding: var(--
|
|
112
|
+
padding: var(--space-4) var(--space-2);
|
|
113
113
|
overflow-x: hidden;
|
|
114
114
|
overflow-y: auto;
|
|
115
115
|
border: 0;
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
}
|
|
120
120
|
.app-sidebar-section { min-width: 0; }
|
|
121
121
|
.app-sidebar-title {
|
|
122
|
-
margin: 0 0 var(--
|
|
123
|
-
padding-inline: var(--
|
|
122
|
+
margin: 0 0 var(--space-1);
|
|
123
|
+
padding-inline: var(--space-3);
|
|
124
124
|
color: var(--ink-soft);
|
|
125
125
|
font-size: var(--text-xs);
|
|
126
126
|
font-weight: var(--weight-semibold);
|
|
@@ -130,18 +130,18 @@
|
|
|
130
130
|
.app-sidebar a {
|
|
131
131
|
display: flex;
|
|
132
132
|
align-items: center;
|
|
133
|
-
gap: var(--
|
|
133
|
+
gap: var(--space-3);
|
|
134
134
|
min-height: 40px;
|
|
135
|
-
padding: 0 var(--
|
|
136
|
-
border-radius: var(--radius);
|
|
135
|
+
padding: 0 var(--space-3);
|
|
136
|
+
border-radius: var(--radius-card);
|
|
137
137
|
color: var(--ink-soft);
|
|
138
138
|
font-size: var(--text-sm);
|
|
139
139
|
font-weight: var(--weight-medium);
|
|
140
140
|
text-decoration: none;
|
|
141
141
|
}
|
|
142
142
|
.app-sidebar a:hover { background-color: var(--surface-hover); color: var(--ink); }
|
|
143
|
-
.app-sidebar a[aria-current='page'] { background-color: var(--
|
|
144
|
-
.app-sidebar a:focus-visible { outline: 2px solid var(--
|
|
143
|
+
.app-sidebar a[aria-current='page'] { background-color: var(--action-surface); color: var(--action-ink); font-weight: var(--weight-semibold); }
|
|
144
|
+
.app-sidebar a:focus-visible { outline: 2px solid var(--action-ink); outline-offset: -2px; }
|
|
145
145
|
.app-sidebar-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
146
146
|
|
|
147
147
|
.app-sidebar-close, .app-sidebar-toggle { display: none; }
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
display: flex;
|
|
156
156
|
width: min(85%, 18rem);
|
|
157
157
|
height: 100dvh;
|
|
158
|
-
padding-top: var(--
|
|
158
|
+
padding-top: var(--space-3);
|
|
159
159
|
border-inline-end: 1px solid var(--line);
|
|
160
160
|
background-color: var(--card);
|
|
161
161
|
box-shadow: var(--shadow-3);
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
white-space: nowrap;
|
|
246
246
|
}
|
|
247
247
|
.app-shell[data-sidebar='collapsed'] .app-sidebar:not(:popover-open) .app-sidebar-section + .app-sidebar-section {
|
|
248
|
-
padding-top: var(--
|
|
248
|
+
padding-top: var(--space-4);
|
|
249
249
|
border-top: 1px solid var(--line-soft);
|
|
250
250
|
}
|
|
251
251
|
.app-shell[data-sidebar='collapsed'] .app-sidebar:not(:popover-open) a {
|
|
@@ -264,7 +264,7 @@
|
|
|
264
264
|
width: max-content;
|
|
265
265
|
max-width: 16rem;
|
|
266
266
|
height: auto;
|
|
267
|
-
padding: 4px var(--
|
|
267
|
+
padding: 4px var(--space-2);
|
|
268
268
|
overflow: visible;
|
|
269
269
|
clip-path: none;
|
|
270
270
|
border: 1px solid transparent;
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
.app-shell[data-sidebar='collapsed'] .app-sidebar:not(:popover-open) a:is(:hover, :focus-visible) > .app-sidebar-label {
|
|
290
290
|
position-anchor: --app-rail-item;
|
|
291
291
|
position-area: inline-end;
|
|
292
|
-
margin-inline-start: var(--
|
|
292
|
+
margin-inline-start: var(--space-2);
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
}
|
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
.app-shell[data-sidebar='collapsed'] .app-sidebar:not(:popover-open) a { position: relative; }
|
|
301
301
|
.app-shell[data-sidebar='collapsed'] .app-sidebar:not(:popover-open) a:is(:hover, :focus-visible) > .app-sidebar-label {
|
|
302
302
|
inset-block: 50% auto;
|
|
303
|
-
inset-inline: calc(100% + var(--
|
|
303
|
+
inset-inline: calc(100% + var(--space-2)) auto;
|
|
304
304
|
translate: 0 -50%;
|
|
305
305
|
}
|
|
306
306
|
}
|
package/templates/article.css
CHANGED
|
@@ -36,44 +36,44 @@
|
|
|
36
36
|
disclosure. */
|
|
37
37
|
@layer brignano.components {
|
|
38
38
|
.article { container: article / inline-size; width: 100%; max-width: var(--measure); margin-inline: auto; }
|
|
39
|
-
.article-header { margin-bottom: var(--
|
|
39
|
+
.article-header { margin-bottom: var(--space-6); }
|
|
40
40
|
.article-header > h1 { margin: 0; font-size: var(--text-3xl); font-weight: var(--weight-semibold); letter-spacing: -0.02em; line-height: var(--leading-display); text-wrap: balance; }
|
|
41
41
|
.article-meta {
|
|
42
42
|
display: flex;
|
|
43
43
|
flex-wrap: wrap;
|
|
44
|
-
gap: var(--
|
|
45
|
-
margin: var(--
|
|
44
|
+
gap: var(--space-1) var(--space-2);
|
|
45
|
+
margin: var(--space-2) 0 0;
|
|
46
46
|
font-family: var(--mono);
|
|
47
47
|
font-size: var(--text-sm);
|
|
48
48
|
color: var(--slate);
|
|
49
49
|
}
|
|
50
|
-
.article-meta > * + *::before { content: '·'; content: '·' / ''; margin-right: var(--
|
|
51
|
-
.article > .prose :is(h2, h3) { scroll-margin-top: var(--
|
|
50
|
+
.article-meta > * + *::before { content: '·'; content: '·' / ''; margin-right: var(--space-2); }
|
|
51
|
+
.article > .prose :is(h2, h3) { scroll-margin-top: var(--space-5); }
|
|
52
52
|
|
|
53
53
|
/* Previous / next. State comes from rel, so either link can be left out. */
|
|
54
54
|
.article-pager {
|
|
55
55
|
display: grid;
|
|
56
56
|
grid-template-columns: minmax(0, 1fr);
|
|
57
|
-
gap: var(--
|
|
58
|
-
margin-top: var(--
|
|
59
|
-
padding-top: var(--
|
|
57
|
+
gap: var(--space-3);
|
|
58
|
+
margin-top: var(--space-7);
|
|
59
|
+
padding-top: var(--space-5);
|
|
60
60
|
border-top: 1px solid var(--line);
|
|
61
61
|
}
|
|
62
62
|
.article-pager > a {
|
|
63
63
|
display: flex;
|
|
64
64
|
flex-direction: column;
|
|
65
|
-
gap: var(--
|
|
66
|
-
padding: var(--
|
|
65
|
+
gap: var(--space-1);
|
|
66
|
+
padding: var(--space-3) var(--space-4);
|
|
67
67
|
color: var(--ink);
|
|
68
68
|
font-weight: var(--weight-medium);
|
|
69
69
|
text-decoration: none;
|
|
70
70
|
border: 1px solid var(--line);
|
|
71
|
-
border-radius: var(--radius);
|
|
72
|
-
transition: background-color var(--
|
|
71
|
+
border-radius: var(--radius-card);
|
|
72
|
+
transition: background-color var(--duration-fast) var(--ease);
|
|
73
73
|
}
|
|
74
74
|
.article-pager > a[rel~='next'] { text-align: right; grid-column: -2; }
|
|
75
75
|
.article-pager > a:hover { background: var(--surface-hover); }
|
|
76
|
-
.article-pager > a:focus-visible { outline: 2px solid var(--
|
|
76
|
+
.article-pager > a:focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; }
|
|
77
77
|
.article-pager-label { font-size: var(--text-sm); font-weight: var(--weight-regular); color: var(--ink-soft); }
|
|
78
78
|
@container article (min-width: 36rem) {
|
|
79
79
|
.article-pager { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
@@ -90,17 +90,17 @@
|
|
|
90
90
|
display: grid;
|
|
91
91
|
grid-template-columns: minmax(0, 1fr);
|
|
92
92
|
grid-template-areas: 'nav' 'toc' 'main';
|
|
93
|
-
gap: var(--
|
|
93
|
+
gap: var(--space-4);
|
|
94
94
|
}
|
|
95
95
|
.article-docs-layout > .article-nav { grid-area: nav; }
|
|
96
96
|
.article-docs-layout > .article-toc { grid-area: toc; }
|
|
97
|
-
.article-docs-layout > .article { grid-area: main; margin-top: var(--
|
|
98
|
-
.article-docs-layout > details { border: 1px solid var(--line); border-radius: var(--radius); }
|
|
97
|
+
.article-docs-layout > .article { grid-area: main; margin-top: var(--space-4); }
|
|
98
|
+
.article-docs-layout > details { border: 1px solid var(--line); border-radius: var(--radius-card); }
|
|
99
99
|
|
|
100
|
-
.article-nav ul, .article-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--
|
|
100
|
+
.article-nav ul, .article-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-1); }
|
|
101
101
|
.article-nav-heading {
|
|
102
|
-
margin: var(--
|
|
103
|
-
padding-inline: var(--
|
|
102
|
+
margin: var(--space-3) 0 var(--space-1);
|
|
103
|
+
padding-inline: var(--space-2);
|
|
104
104
|
font-size: var(--text-xs);
|
|
105
105
|
font-weight: var(--weight-semibold);
|
|
106
106
|
letter-spacing: 0.04em;
|
|
@@ -110,26 +110,26 @@
|
|
|
110
110
|
.article-nav-heading:first-child { margin-top: 0; }
|
|
111
111
|
.article-nav a, .article-toc a {
|
|
112
112
|
display: block;
|
|
113
|
-
padding: 2px var(--
|
|
113
|
+
padding: 2px var(--space-2);
|
|
114
114
|
color: var(--ink-soft);
|
|
115
115
|
font-size: var(--text-sm);
|
|
116
116
|
text-decoration: none;
|
|
117
117
|
border-radius: var(--radius-sm);
|
|
118
118
|
}
|
|
119
119
|
.article-nav a:hover, .article-toc a:hover { color: var(--ink); background: var(--surface-hover); }
|
|
120
|
-
.article-nav a:focus-visible, .article-toc a:focus-visible { outline: 2px solid var(--
|
|
121
|
-
.article-nav a[aria-current='page'] { color: var(--ink); font-weight: var(--weight-semibold); box-shadow: inset 2px 0 0 var(--
|
|
120
|
+
.article-nav a:focus-visible, .article-toc a:focus-visible { outline: 2px solid var(--action-ink); outline-offset: -2px; }
|
|
121
|
+
.article-nav a[aria-current='page'] { color: var(--ink); font-weight: var(--weight-semibold); box-shadow: inset 2px 0 0 var(--action-ink); }
|
|
122
122
|
.article-toc a[aria-current] { color: var(--ink); font-weight: var(--weight-semibold); }
|
|
123
123
|
|
|
124
124
|
@container article-docs (min-width: 48rem) {
|
|
125
125
|
.article-docs-layout {
|
|
126
126
|
grid-template-columns: 13rem minmax(0, 1fr);
|
|
127
127
|
grid-template-areas: 'nav toc' 'nav main';
|
|
128
|
-
column-gap: var(--
|
|
128
|
+
column-gap: var(--space-7);
|
|
129
129
|
}
|
|
130
130
|
.article-docs-layout > .article { margin-top: 0; }
|
|
131
131
|
@supports selector(::details-content) {
|
|
132
|
-
.article-docs-layout > .article-nav { align-self: start; position: sticky; top: var(--
|
|
132
|
+
.article-docs-layout > .article-nav { align-self: start; position: sticky; top: var(--space-5); border: 0; }
|
|
133
133
|
.article-docs-layout > .article-nav > summary { display: none; }
|
|
134
134
|
.article-docs-layout > .article-nav::details-content { content-visibility: visible; }
|
|
135
135
|
.article-docs-layout > .article-nav > :not(summary) { padding: 0; }
|
|
@@ -141,13 +141,13 @@
|
|
|
141
141
|
grid-template-areas: 'nav main toc';
|
|
142
142
|
}
|
|
143
143
|
@supports selector(::details-content) {
|
|
144
|
-
.article-docs-layout > .article-toc { align-self: start; position: sticky; top: var(--
|
|
144
|
+
.article-docs-layout > .article-toc { align-self: start; position: sticky; top: var(--space-5); border: 0; }
|
|
145
145
|
.article-docs-layout > .article-toc > summary { display: none; }
|
|
146
146
|
.article-docs-layout > .article-toc > nav::before {
|
|
147
147
|
content: attr(aria-label);
|
|
148
148
|
content: attr(aria-label) / '';
|
|
149
149
|
display: block;
|
|
150
|
-
padding: 0 var(--
|
|
150
|
+
padding: 0 var(--space-2) var(--space-2);
|
|
151
151
|
font-size: var(--text-sm);
|
|
152
152
|
font-weight: var(--weight-semibold);
|
|
153
153
|
color: var(--ink);
|
package/templates/changelog.css
CHANGED
|
@@ -24,28 +24,28 @@
|
|
|
24
24
|
max-width: calc(var(--measure) + 12rem);
|
|
25
25
|
margin-inline: auto;
|
|
26
26
|
}
|
|
27
|
-
.changelog-header { margin-bottom: var(--
|
|
27
|
+
.changelog-header { margin-bottom: var(--space-7); }
|
|
28
28
|
.changelog-header > h1 { margin: 0; font-size: var(--text-3xl); font-weight: var(--weight-semibold); letter-spacing: -0.02em; line-height: var(--leading-display); text-wrap: balance; }
|
|
29
|
-
.changelog-header > p { margin: var(--
|
|
29
|
+
.changelog-header > p { margin: var(--space-2) 0 0; color: var(--ink-soft); }
|
|
30
30
|
|
|
31
31
|
.release {
|
|
32
32
|
display: grid;
|
|
33
33
|
grid-template-columns: minmax(0, 1fr);
|
|
34
|
-
gap: var(--
|
|
35
|
-
padding-block: var(--
|
|
34
|
+
gap: var(--space-3);
|
|
35
|
+
padding-block: var(--space-6);
|
|
36
36
|
border-top: 1px solid var(--line);
|
|
37
|
-
scroll-margin-top: var(--
|
|
37
|
+
scroll-margin-top: var(--space-5);
|
|
38
38
|
}
|
|
39
|
-
.release-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--
|
|
39
|
+
.release-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); }
|
|
40
40
|
.release-version { margin: 0; font-family: var(--mono); font-size: var(--text-lg); font-weight: var(--weight-semibold); }
|
|
41
41
|
.release-version > a { color: var(--ink); text-decoration: none; border-radius: var(--radius-sm); }
|
|
42
42
|
.release-version > a:hover { text-decoration: underline; text-underline-offset: 3px; }
|
|
43
|
-
.release-version > a:focus-visible { outline: 2px solid var(--
|
|
43
|
+
.release-version > a:focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; }
|
|
44
44
|
.release-date { font-family: var(--mono); font-size: var(--text-sm); color: var(--slate); }
|
|
45
45
|
|
|
46
46
|
@container changelog (min-width: 44rem) {
|
|
47
|
-
.release { grid-template-columns: 10rem minmax(0, 1fr); gap: var(--
|
|
48
|
-
.release-meta { flex-direction: column; align-self: start; position: sticky; top: var(--
|
|
47
|
+
.release { grid-template-columns: 10rem minmax(0, 1fr); gap: var(--space-6); }
|
|
48
|
+
.release-meta { flex-direction: column; align-self: start; position: sticky; top: var(--space-5); }
|
|
49
49
|
}
|
|
50
50
|
@media (pointer: coarse) {
|
|
51
51
|
.release-version > a { display: inline-flex; align-items: center; min-height: 44px; }
|
package/templates/email.html
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<style>
|
|
22
22
|
:root { color-scheme: light only; supported-color-schemes: light; }
|
|
23
23
|
body { margin: 0; padding: 0; width: 100% !important; -webkit-text-size-adjust: 100%; }
|
|
24
|
-
a { color: {{--
|
|
24
|
+
a { color: {{--action-ink}}; }
|
|
25
25
|
@media (max-width: 620px) {
|
|
26
26
|
.email-card { padding: 24px 20px !important; }
|
|
27
27
|
.email-outer { padding: 16px 8px !important; }
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
<div style="font-size:16px;line-height:1.6;color:{{--ink-soft}};">{{body}}</div>
|
|
44
44
|
<table role="presentation" cellpadding="0" cellspacing="0" border="0" style="margin:24px 0 0;">
|
|
45
45
|
<tr>
|
|
46
|
-
<td bgcolor="{{--
|
|
47
|
-
<a href="{{button_url}}" style="display:inline-block;padding:12px 20px;font-size:15px;font-weight:600;line-height:20px;color:{{--on-
|
|
46
|
+
<td bgcolor="{{--action}}" style="background-color:{{--action}};border-radius:8px;">
|
|
47
|
+
<a href="{{button_url}}" style="display:inline-block;padding:12px 20px;font-size:15px;font-weight:600;line-height:20px;color:{{--on-action}};text-decoration:none;border-radius:8px;">{{button_label}}</a>
|
|
48
48
|
</td>
|
|
49
49
|
</tr>
|
|
50
50
|
</table>
|
package/templates/error.css
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
place-items: center;
|
|
29
29
|
box-sizing: border-box;
|
|
30
30
|
min-height: 100svh;
|
|
31
|
-
padding: var(--
|
|
31
|
+
padding: var(--space-7) var(--space-5);
|
|
32
32
|
background: var(--bg);
|
|
33
33
|
color: var(--ink);
|
|
34
34
|
}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
display: flex;
|
|
37
37
|
flex-direction: column;
|
|
38
38
|
align-items: center;
|
|
39
|
-
gap: var(--
|
|
39
|
+
gap: var(--space-3);
|
|
40
40
|
min-width: 0;
|
|
41
41
|
max-width: min(28rem, 100%);
|
|
42
42
|
text-align: center;
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
.error-page-mark {
|
|
45
45
|
display: inline-flex;
|
|
46
46
|
align-items: center;
|
|
47
|
-
gap: var(--
|
|
48
|
-
margin-bottom: var(--
|
|
47
|
+
gap: var(--space-2);
|
|
48
|
+
margin-bottom: var(--space-5);
|
|
49
49
|
font-weight: var(--weight-semibold);
|
|
50
50
|
color: var(--ink);
|
|
51
51
|
text-decoration: none;
|
|
52
52
|
}
|
|
53
|
-
.error-page-mark:focus-visible { outline: 2px solid var(--
|
|
53
|
+
.error-page-mark:focus-visible { outline: 2px solid var(--action-ink); outline-offset: 2px; border-radius: var(--radius-card); }
|
|
54
54
|
.error-page-mark > svg { width: 1.5em; height: 1.5em; flex: none; color: var(--mark-current); }
|
|
55
55
|
.error-page-code {
|
|
56
56
|
margin: 0;
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
text-wrap: balance;
|
|
70
70
|
overflow-wrap: anywhere;
|
|
71
71
|
}
|
|
72
|
-
.error-page-body { margin: 0 0 var(--
|
|
72
|
+
.error-page-body { margin: 0 0 var(--space-3); color: var(--ink-soft); text-wrap: pretty; overflow-wrap: anywhere; }
|
|
73
73
|
.error-page-ref {
|
|
74
|
-
margin: var(--
|
|
74
|
+
margin: var(--space-3) 0 0;
|
|
75
75
|
font-family: var(--mono);
|
|
76
76
|
font-size: var(--text-xs);
|
|
77
77
|
color: var(--slate);
|