@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.
Files changed (59) hide show
  1. package/DESIGN.md +164 -34
  2. package/README.md +51 -4
  3. package/components.css +249 -249
  4. package/controls.css +238 -238
  5. package/decisions/0001-cobalt.md +1 -1
  6. package/decisions/0008-cobalt-hue-256.md +1 -1
  7. package/decisions/0014-identity.md +1 -1
  8. package/decisions/0015-white-label-on-cobalt.md +1 -1
  9. package/decisions/0017-product-identity.md +1 -1
  10. package/decisions/0019-house-theme-shell.md +51 -0
  11. package/decisions/0020-kits-opt-in.md +56 -0
  12. package/decisions/0021-ab-logo.md +29 -0
  13. package/decisions/README.md +3 -0
  14. package/kits/larch.css +125 -0
  15. package/kits/ledger.css +121 -0
  16. package/kits/split.css +123 -0
  17. package/logo/mark.svg +4 -4
  18. package/logo/paths.mjs +14 -11
  19. package/logo/tile-180.png +0 -0
  20. package/logo/tile-512.png +0 -0
  21. package/logo/tile.svg +3 -3
  22. package/package.json +9 -1
  23. package/product-page.css +82 -82
  24. package/scripts/colour.mjs +42 -0
  25. package/scripts/theme.mjs +190 -0
  26. package/tailwind.css +13 -20
  27. package/templates/app-shell.css +15 -15
  28. package/templates/article.css +26 -26
  29. package/templates/changelog.css +9 -9
  30. package/templates/email.html +3 -3
  31. package/templates/error.css +7 -7
  32. package/templates/legal.css +11 -11
  33. package/templates/settings.css +9 -9
  34. package/themes/driftwood.css +109 -0
  35. package/themes/driftwood.theme +5 -0
  36. package/themes/guidebook.css +104 -0
  37. package/themes/guidebook.theme +5 -0
  38. package/themes/homelab.css +101 -0
  39. package/themes/homelab.theme +2 -0
  40. package/themes/receipts.css +101 -0
  41. package/themes/receipts.theme +2 -0
  42. package/themes/sites.css +106 -0
  43. package/themes/sites.theme +7 -0
  44. package/tokens/base.css +37 -0
  45. package/tokens/chart.json +145 -0
  46. package/tokens/color.json +840 -0
  47. package/tokens/component.json +75 -0
  48. package/tokens/head.css +84 -0
  49. package/tokens/kits/larch.json +255 -0
  50. package/tokens/kits/ledger.json +247 -0
  51. package/tokens/kits/split.json +247 -0
  52. package/tokens/motion.json +38 -0
  53. package/tokens/names.d.ts +246 -0
  54. package/tokens/shape.json +56 -0
  55. package/tokens/space.json +99 -0
  56. package/tokens/tailwind.json +343 -0
  57. package/tokens/type.json +206 -0
  58. package/tokens.chart.css +23 -23
  59. package/tokens.css +278 -136
package/DESIGN.md CHANGED
@@ -33,7 +33,7 @@ family, motion and shape are identical; what changes is how much room things get
33
33
  |---|---|---|
34
34
  | Opt in | `class="tier-marketing"` on `<html>` | default, no class |
35
35
  | Body size | 17px | 15px |
36
- | Section rhythm | `--s9` (96px) | `--s6` (32px) |
36
+ | Section rhythm | `--space-9` (96px) | `--space-6` (32px) |
37
37
  | Measure | 68ch | 780px |
38
38
  | Display face | Silkscreen — hero eyebrows | none (aliases to `--sans`) |
39
39
  | Motion | scroll reveal, overlays opening and closing (ADR-0013), a press and a switch of view (ADR-0015) | none, except overlays opening and closing (ADR-0013), a press and a switch of view (ADR-0015) |
@@ -50,7 +50,7 @@ Every hue answers exactly one question, on every surface, in both tiers:
50
50
  | Token | Answers | Hue |
51
51
  |---|---|---|
52
52
  | neutral ramp | the page itself | cool grey |
53
- | `--i-*` | *you can act on this* | cobalt |
53
+ | `--action-*` | *you can act on this* | cobalt |
54
54
  | `--success` | *settled, confirmed, done* | forest |
55
55
  | `--attention` | *this wants you* | larch amber |
56
56
  | `--danger` | *this has gone wrong* | rust |
@@ -68,7 +68,7 @@ system coherent across a marketing site and an operational tool.
68
68
 
69
69
  ### Identity is not a fill
70
70
 
71
- `--mark` inks a **graphic**: a product's glyph, the bar in the `A|B` logo, a hero rule.
71
+ `--mark` inks a **graphic**: a product's glyph, the cursor in the logo, a hero rule.
72
72
  That is its entire permitted use. It is never a button, chip, badge, wash, border,
73
73
  or link. The scoped exceptions are the next sections: a product page, and the
74
74
  stage behind a product's picture on its card.
@@ -107,18 +107,18 @@ graphic (ADR-0017). There, and only there, it may do two more things:
107
107
  - **Fill the one primary button**: `--mark-fill` under a white `--on-mark`
108
108
  label, stepping darker to `--mark-fill-hover` and `--mark-fill-pressed`.
109
109
  - **Wash the page ground**: `--mark-surface`, a faint opaque tint that
110
- `--ink`, `--ink-soft` and links in `--i-ink` all read on.
110
+ `--ink`, `--ink-soft` and links in `--action-ink` all read on.
111
111
 
112
112
  `data-mark` points all four at the product's, as it does `--mark-current`;
113
113
  with no attribute they are the family amber. The fill is its own step, the
114
- way `--i` sits beside `--i-ink`: in light it is the mark (amber is deepened
114
+ way `--action` sits beside `--action-ink`: in light it is the mark (amber is deepened
115
115
  to carry the label), in dark it is the mark's hue as light as a white label
116
116
  allows. Never fill or wash with
117
117
  `--mark-teal` and its siblings directly: in dark they are pale, for drawing.
118
118
 
119
119
  This is a scoped exception to "identity is not a fill", as the stage behind a
120
120
  hero proof was (ADR-0011). It never reaches an app, a link, text or a state,
121
- and the focus ring stays `--i-ink`.
121
+ and the focus ring stays `--action-ink`.
122
122
 
123
123
  ### On a card that stands for a product, the stage
124
124
 
@@ -131,7 +131,7 @@ without a product page has none and stays on the family amber.
131
131
 
132
132
  The stage is the picture's ground and nothing else. On that card the mark
133
133
  still never colours a button, link, text, chip, badge, border or state, and
134
- the focus ring stays `--i-ink`. A card that doesn't stand for a product (a
134
+ the focus ring stays `--action-ink`. A card that doesn't stand for a product (a
135
135
  trip, a post) never gets a stage.
136
136
 
137
137
  ### Colour is a surface, not text
@@ -169,26 +169,26 @@ type is already carried by a text label. Nor `idea`, `planning`, `someday`, or
169
169
 
170
170
  The part that makes an interface feel built rather than styled.
171
171
 
172
- - `--i` fill, `--i-hover`, `--i-pressed`, `--i-ink` for links/icons/focus. The
173
- fill is a saturated cobalt with a white label (`--on-i`) in both themes, and
172
+ - `--action` fill, `--action-hover`, `--action-pressed`, `--action-ink` for links/icons/focus. The
173
+ fill is a saturated cobalt with a white label (`--on-action`) in both themes, and
174
174
  hover and pressed step darker in both. In dark the fill and the ink are
175
- different steps: fill a surface with `--i`, write or draw on a surface with
176
- `--i-ink`, and a hovered link takes `--i-ink-hover`, never the fill's hover. A destructive button fills with `--danger-fill` (and its
175
+ different steps: fill a surface with `--action`, write or draw on a surface with
176
+ `--action-ink`, and a hovered link takes `--action-ink-hover`, never the fill's hover. A destructive button fills with `--danger-fill` (and its
177
177
  `-hover` and `-pressed` steps) under a white `--on-danger` label, not with
178
178
  the state hue `--danger`, which in dark is a pale rust for reading.
179
- - **Disabled is neutral, never hued** (`--i-disabled-bg` / `--i-disabled-ink`). A
179
+ - **Disabled is neutral, never hued** (`--disabled` / `--disabled-ink`). A
180
180
  greyed-out control must stop signalling "click me". Its low contrast is allowed
181
181
  only because WCAG 1.4.3 exempts *inactive* controls, so the state must be real:
182
182
  `disabled` on a button or input, `aria-disabled="true"` otherwise. Disabled
183
183
  styling on an element that isn't marked disabled is just low-contrast text.
184
- - Focus is always visible: 2px `--i-ink` outline, 2px offset. Never remove it.
184
+ - Focus is always visible: 2px `--action-ink` outline, 2px offset. Never remove it.
185
185
  - Hover and pressed surfaces on neutral elements come from `--surface-hover` and
186
186
  `--surface-active`, not from opacity tricks.
187
187
  - A control's own edge — an input, a secondary button — is `--line-control`
188
188
  (≥ 3:1). `--line-strong` is a divider, too faint to tell you a control is there.
189
189
  - Checkboxes and radios in a `.choice` row are drawn from tokens
190
190
  (`components.css`), so they look the same on every OS. Bare ones, ranges and
191
- progress bars stay native and inherit `accent-color: var(--i)` from
191
+ progress bars stay native and inherit `accent-color: var(--action)` from
192
192
  `tokens.css`; don't restyle those just to recolour them. `.progress` and
193
193
  `.meter` on a native `<progress>` or `<meter>` draw it from tokens, for
194
194
  when a bar must look the same everywhere.
@@ -202,8 +202,8 @@ Three roles, no more:
202
202
  countdowns align in a column.
203
203
  - **`--mono` (IBM Plex Mono)** — data that must read *precise*: confirmation codes,
204
204
  timestamps, stat numbers, eyebrow labels.
205
- - **`--display` (Silkscreen)** — marketing tier only. Hero eyebrows; the `A|B`
206
- logo is drawn, not set in it ("The logo", below). Used **once, well** — it is
205
+ - **`--display` (Silkscreen)** — marketing tier only. Hero eyebrows; the logo
206
+ is drawn, not set in it ("The logo", below). Used **once, well** — it is
207
207
  memorable precisely because it is concentrated. On the tool tier it aliases to `--sans`.
208
208
 
209
209
  No serif. Abstract over literal — no mascots, clip-art, or stock scenery.
@@ -228,10 +228,11 @@ No serif. Abstract over literal — no mascots, clip-art, or stock scenery.
228
228
 
229
229
  ### The logo
230
230
 
231
- The `A|B` logo is the monogram drawn once, in [`logo/`](./logo): the initials in
232
- Geist at 800, outlined, with the bar between them as a text cursor in the mark
233
- colour. It is the `.stamp` treatment made into a picture, so the logo and the
234
- type match.
231
+ The logo is `ab`, the initials in lowercase, drawn once in [`logo/`](./logo):
232
+ Geist at 800, set tight and outlined, with a block cursor after the letters in
233
+ the mark colour, as if they had just been typed. The cursor is the same idea as
234
+ the bar in the `A|B` stamp, pulled out of the middle so the letters read as one
235
+ word. Redraw it with `scripts/logo.py`, never by hand.
235
236
 
236
237
  | File | For |
237
238
  |---|---|
@@ -240,15 +241,15 @@ type match.
240
241
  | `logo/tile.svg` | the favicon: the mark in an ink tile, the same in both themes |
241
242
  | `logo/tile-180.png`, `logo/tile-512.png` | `apple-touch-icon` and the web manifest |
242
243
 
243
- - **Inline it where the page has tokens.** The letters take `--ink` and the bar
244
- `--mark-current`, so the header follows the site theme, not the OS. An
244
+ - **Inline it where the page has tokens.** The letters take `--ink` and the cursor
245
+ (`bar` in `paths.mjs`) `--mark-current`, so the header follows the site theme, not the OS. An
245
246
  `<img>` can only follow the OS.
246
- - **The letters are ink and only the bar is amber.** Never the whole mark in
247
+ - **The letters are ink and only the cursor is amber.** Never the whole mark in
247
248
  `--mark`, never the letters in a state colour, never a gradient or a shadow.
248
249
  - **Size by height.** 24 to 32px in a header; under 20px use the tile.
249
250
  - **The tile is for icons only:** favicon, home screen, an app's sign-in. On a
250
251
  page, use the bare mark.
251
- - **The bar doesn't move,** except at most one blink on a page's first load,
252
+ - **The cursor doesn't move,** except at most one blink on a page's first load,
252
253
  and none under `prefers-reduced-motion`.
253
254
 
254
255
  Sizes change with the tier (`--text-xs` … `--text-4xl`); weight, leading and
@@ -275,16 +276,21 @@ avoids a one-word last line (`pretty`). On a touch screen the tool tier's
275
276
 
276
277
  ## 6. Space, shape, elevation
277
278
 
278
- 4px base (`--s1` … `--s9`). Radius steps by what the thing is, so a control
279
+ 4px base (`--space-1` … `--space-9`). Radius steps by what the thing is, so a control
279
280
  inside a card reads as nested rather than as a smaller card: `--radius-sm`
280
281
  (6px) for chips and pills, `--radius-control` (8px) for buttons, inputs,
281
- selects, the segmented control and menu items, `--radius` (12px) for cards,
282
+ selects, the segmented control and menu items, `--radius-card` (12px) for cards,
282
283
  messages, popovers and code blocks, `--radius-lg` (18px) for dialogs and
283
284
  hero surfaces.
284
285
 
285
286
  **Elevation differs by theme.** Light mode separates surfaces with a hairline plus
286
287
  a shadow (`--shadow-1/2/3`). Dark mode does not use borders — surfaces get
287
288
  *lighter* with elevation. This is why `--line` can stay nearly invisible in dark.
289
+ A card is the exception to a faint hairline in light: `--line` all but
290
+ vanishes between a white card and the page, so a grid of cards read as one
291
+ sheet. `.card` reads `--card-line` (one step up, neutral-200) and
292
+ `--card-shadow` (`--shadow-2`); a kit whose `--line` already shows sets both
293
+ back to `--line` and `--shadow-1`.
288
294
 
289
295
  **Stacking** is named, not numbered: `--z-raised` (a control above its card's
290
296
  stretched link), `--z-sticky` (a header), `--z-float` (a floating label),
@@ -330,7 +336,7 @@ except the overlay case below.
330
336
  **The second: overlays may move as they open and close, in both tiers**
331
337
  (ADR-0013). A dialog, sheet, popover, menu or toast that someone opened, or that answers what they
332
338
  just did, fades and slides a few pixels (a sheet from its own edge) over
333
- `--dur-fast`. Only opacity and transform move; the open state is always fully
339
+ `--duration-fast`. Only opacity and transform move; the open state is always fully
334
340
  shown, so a browser without `@starting-style` shows it at once; and under
335
341
  `prefers-reduced-motion` it is instant, backdrop included. An overlay that is
336
342
  already open when the page loads doesn't animate. That is the whole
@@ -339,12 +345,12 @@ exception: content on the page itself still never animates in.
339
345
  **The third: a control may answer the person who used it** (ADR-0015). Two
340
346
  cases, both only ever started by the person:
341
347
 
342
- - **A press.** A `.btn` settles by 2% over `--dur-fast` while it is held down. Not when it is
348
+ - **A press.** A `.btn` settles by 2% over `--duration-fast` while it is held down. Not when it is
343
349
  disabled or busy.
344
350
  - **A switch of view.** When someone picks a tab or a segment, the script that
345
351
  swaps the content may wrap the swap in `document.startViewTransition()`, and
346
352
  the old view cross-fades to the new one at the browser's default, 250ms
347
- (the same as `--dur`). The package sets nothing on the transition, so a
353
+ (the same as `--duration`). The package sets nothing on the transition, so a
348
354
  site that already uses view transitions is not affected. Opt in per switch;
349
355
  a browser without the API swaps at once.
350
356
 
@@ -379,7 +385,7 @@ the chart exception: node *type* is a category like event type, and is carried b
379
385
  an icon and a label, never a hue. A diagram where every node is tinted by family
380
386
  is thirty coloured things, and the one that is down disappears among them.
381
387
 
382
- - **Nodes are neutral.** `--card` fill, `--line-strong` edge, `--radius` corners,
388
+ - **Nodes are neutral.** `--card` fill, `--line-strong` edge, `--radius-card` corners,
383
389
  an icon in `--ink-soft`, the name in `--ink`, the kind in `--mono` at
384
390
  `--text-xs` in `--ink-soft`. Grouping is a zone: `--line` hairline, no fill or
385
391
  a faint one, a `--mono` eyebrow label.
@@ -401,7 +407,7 @@ is thirty coloured things, and the one that is down disappears among them.
401
407
  `--code-string` (`--ink-soft`), comments `--code-comment` (`--slate`, italic),
402
408
  everything else `--code-ink`. A highlighted line is `--code-highlight`. No
403
409
  syntax rainbow: a reader scanning code needs the keywords, not a palette.
404
- - **Selection** is the focus treatment: a 2px `--i-ink` outline, offset. Asking
410
+ - **Selection** is the focus treatment: a 2px `--action-ink` outline, offset. Asking
405
411
  "what depends on this?" dims everything unrelated to ~30% opacity and inks the
406
412
  connecting edges in `--ink`; it never introduces a colour.
407
413
  - **A path is numbered, not coloured.** A request path drawn over a diagram
@@ -422,7 +428,7 @@ is thirty coloured things, and the one that is down disappears among them.
422
428
  Non-negotiable in both themes:
423
429
 
424
430
  - Body text ≥ 4.5:1; large text and UI marks ≥ 3:1. `--slate` is the quietest
425
- text step and clears 4.5:1 in both themes; `--n-500` in light does not, so it
431
+ text step and clears 4.5:1 in both themes; `--neutral-500` in light does not, so it
426
432
  is never text.
427
433
  - Touch targets ≥ 44px on coarse pointers, with a `.touch-hit` opt-out for controls
428
434
  whose shape is meaningful (a 22px circular checkbox forced to 44px becomes an
@@ -434,6 +440,88 @@ Non-negotiable in both themes:
434
440
 
435
441
  ## 11. Themes, and integrating with a Tailwind consumer
436
442
 
443
+ ### Kits
444
+
445
+ A kit is a whole look: ground, text, the action colour, typefaces, corners and
446
+ elevation. Three ship, Split, Ledger and Larch (ADR-0019), each as
447
+ `kits/<kit>.css`, generated from `tokens/kits/<kit>.json`. **They are opt-in
448
+ until 1.0** (ADR-0020): today's look is the default, and `data-kit="split"` on
449
+ `<html>`, or on any element, gives that subtree the kit.
450
+
451
+ - **A kit sets only names `:root` defines.** A component never asks which kit
452
+ it is in; it reads the same token and gets the kit's value.
453
+ - **One hue acts, another says "settled".** A kit's `--action` stays at least
454
+ 25° from `--success`. State hues are the same in every kit.
455
+ - **A fill's label is `--on-action`**, whatever reads on it: ink on Split's
456
+ lime, the page on Ledger's ink.
457
+ - **The primary is found by its fill or its edge.** `--action-edge` is the
458
+ fill, except Split in light, where lime can't be found on white and the edge
459
+ is ink. There `--action` is a fill only; a mark, a line or a link takes
460
+ `--action-ink`.
461
+ - **The display treatment reads the kit**: `--display`, `--weight-heavy`,
462
+ `--display-case` and `--display-stretch` (Split sets capitals and a wide cut).
463
+ - **A step of the type scale is three tokens**: `--text-N`, `--leading-N`,
464
+ `--tracking-N`.
465
+ - **Density.** `data-density="compact"` tightens `--control-height` for a
466
+ dense tool screen. Touch targets stay 44px.
467
+
468
+ `npm run check` measures every kit, both schemes, against every token floor
469
+ the default look is held to, plus its washes and the gap between act and
470
+ settled. A kit may not set a state colour.
471
+
472
+ ### Product themes
473
+
474
+ A product's look is a file of a few lines, `themes/<product>.theme`
475
+ (ADR-0019). `npm run build` lays it over its kit and writes
476
+ `themes/<product>.css`, one rule under `[data-product='<product>']`, so a
477
+ product imports one file and sets one attribute. Opt-in until 1.0, like kits.
478
+
479
+ ```
480
+ kit: larch # split, ledger or larch: the look it starts from
481
+ ground: wash # plain (the kit's), bright, or wash
482
+ scheme: dark # both (the default) or dark, which pins the product dark
483
+ hue: 355 # what acts: an OKLCH hue, 0 to 360
484
+ typeface: onest # headings; `mono` sets everything in the kit's mono
485
+ heading-weight: 500
486
+ corners: 16 # px, or `pill`
487
+ shell: conversation # console, canvas, player, conversation, document
488
+ ```
489
+
490
+ Those eight keys are all there are. A key left out takes the kit's value.
491
+
492
+ **To add a product:** write its `.theme`, run `npm run build`, import
493
+ `@brignano/design/themes/<product>.css`, set `data-product="<product>"` on
494
+ `<html>`, and load the kit's fonts (README). Nothing else: no CSS, no palette.
495
+
496
+ **A theme is a hue, never a palette.** Every colour a theme sets is a fixed
497
+ step of lightness and chroma at its hue, written once in
498
+ `scripts/theme.mjs`:
499
+
500
+ - `ground: bright` is a near-white page with white cards; `wash` is a page
501
+ tinted with the hue and lighter cards on it. Text and lines take the hue too.
502
+ - On Split the hue is a **signal**: a bright fill with an ink label, the same
503
+ in both schemes, and an ink edge wherever the fill can't be found on the
504
+ page. On Ledger and Larch it is **deep**: a deep fill with a light label in
505
+ light, a pale fill with a dark label in dark.
506
+ - State colours are never a theme's to set, and are the same in every one.
507
+
508
+ **It can't make an unreadable theme.** The build refuses a theme whose text
509
+ is under 4.5:1 or whose controls are under 3:1, naming the pair and the
510
+ ratio. `npm run check` proves every hue, on every kit and ground, passes that
511
+ gate (648 combinations), and holds each built theme to every token floor.
512
+
513
+ Measured, light / dark (Driftwood is dark only):
514
+
515
+ | Theme | Text on page | Muted on a surface | Button label | Link on page | Primary found | Control edge |
516
+ |---|---|---|---|---|---|---|
517
+ | homelab | 18.34 / 17.48 | 6.01 / 6.82 | 14.89 / 14.89 | 18.34 / 17.48 | 18.34 / 15.22 | 18.34 / 17.48 |
518
+ | driftwood | 17.48 | 6.82 | 12.29 | 17.48 | 12.56 | 17.48 |
519
+ | guidebook | 16.53 / 17.06 | 7.10 / 7.37 | 6.39 / 9.99 | 6.12 / 9.99 | 6.12 / 9.99 | 4.38 / 5.41 |
520
+ | sites | 15.30 / 16.50 | 6.89 / 7.15 | 6.54 / 9.47 | 5.74 / 9.47 | 5.74 / 9.47 | 4.06 / 5.17 |
521
+ | receipts | 16.30 / 15.69 | 5.86 / 6.41 | 16.30 / 15.69 | 16.30 / 15.69 | 16.30 / 15.69 | 3.65 / 4.01 |
522
+
523
+ `shell` is stored and validated; the shell templates are their own work.
524
+
437
525
  ### How the theme is chosen
438
526
 
439
527
  Every colour is one declaration holding both values, `light-dark(<light>, <dark>)`,
@@ -539,7 +627,49 @@ To use the components in a Tailwind site, import **`controls.css`**, not
539
627
 
540
628
  ## 12. The one rule that keeps this true
541
629
 
542
- **Never hardcode a hex outside `tokens.css`.**
630
+ **Never hardcode a hex outside the token files.**
631
+
632
+ ### Where a token lives
633
+
634
+ `tokens/*.json` is the source, one file per family (`color`, `type`, `space`,
635
+ `shape`, `motion`, `component`, `chart`), in the W3C design-tokens shape so
636
+ other tools can read it. `npm run build` writes `tokens.css`,
637
+ `tokens.chart.css`, `tailwind.css` and `tokens/names.d.ts` from it, and
638
+ `npm run check` fails if any of them is stale. Never edit a generated file.
639
+ The rules that aren't tokens (`color-scheme`, `::selection`, print, reduced
640
+ motion) are `tokens/head.css` and `tokens/base.css`.
641
+
642
+ Three tiers, and a rule for which one to read:
643
+
644
+ | Tier | Example | Read it from |
645
+ |---|---|---|
646
+ | **Primitive** | `--neutral-300` | other tokens only |
647
+ | **Semantic** | `--ink`, `--line`, `--action`, `--success-surface` | anything |
648
+ | **Component** | `--button-radius`, `--card-line`, `--focus-ring` | that component |
649
+
650
+ A component token starts as an alias of a semantic one. It exists so a kit or
651
+ a product's theme can restyle a component without touching a colour (ADR-0019).
652
+ `.card` reads `--card-line`, `--card-shadow` and `--card-radius`; the rest
653
+ wait on #183, which moves the other components onto them, so setting one of
654
+ those today changes nothing.
655
+
656
+ **Names that changed in 0.14.** The old name still resolves until 1.0;
657
+ `DeprecatedTokenName` in `tokens/names.d.ts` lists them.
658
+
659
+ | Before | Now |
660
+ |---|---|
661
+ | `--n-0` … `--n-900` | `--neutral-0` … `--neutral-900` |
662
+ | `--i`, `--i-hover`, `--i-pressed` | `--action`, `--action-hover`, `--action-pressed` |
663
+ | `--i-ink`, `--i-ink-hover` | `--action-ink`, `--action-ink-hover` |
664
+ | `--i-surface`, `--i-line`, `--i-selection` | `--action-surface`, `--action-line`, `--action-selection` |
665
+ | `--on-i` | `--on-action` |
666
+ | `--i-disabled-bg`, `--i-disabled-ink` | `--disabled`, `--disabled-ink` |
667
+ | `--s1` … `--s9` | `--space-1` … `--space-9` |
668
+ | `--dur-fast`, `--dur`, `--dur-slow` | `--duration-fast`, `--duration`, `--duration-slow` |
669
+ | `--radius` | `--radius-card` |
670
+
671
+ Reading an old name works. **Setting** one no longer reaches the components,
672
+ which read the new names: set the new name instead.
543
673
 
544
674
  Hardcoded values silently survive a theme change. `life`'s status pills carried
545
675
  literal greys for months and would have stayed light grey in dark mode.
@@ -668,7 +798,7 @@ The attributes `product-page.css` gives every page:
668
798
  **stage** (a faint field behind the hero proof), the clip's current step and
669
799
  the how-it-works numerals, and it **fills the one primary button**
670
800
  (`--mark-fill` under `--on-mark`, §3). It is never a link, text or state,
671
- and the focus ring stays `--i-ink`.
801
+ and the focus ring stays `--action-ink`.
672
802
  - **An ink button** (`data-button="ink"` on `.pp`) when the mark is better
673
803
  kept for the picture. A page with no `data-mark` is ink too.
674
804
  - **A mark ground** (`data-ground="mark"` on `.pp`): the page washes in
package/README.md CHANGED
@@ -7,14 +7,15 @@ The shared design system for every brignano surface — `brignano.io`, `life`,
7
7
  |---|---|
8
8
  | [`DESIGN.md`](./DESIGN.md) | **Start here.** The rules — the three colour layers, the two tiers, type, motion. |
9
9
  | [`decisions/`](./decisions/README.md) | Why the values are what they are. One ADR per file. |
10
- | [`tokens.css`](./tokens.css) | Single source of truth for colour, type, space, shape, motion. |
10
+ | [`tokens/`](./tokens) | The source: every token as JSON, by family. Edit here, then `npm run build`. |
11
+ | [`tokens.css`](./tokens.css) | Generated from `tokens/`. What a surface imports for colour, type, space, shape, motion. |
11
12
  | [`tokens.chart.css`](./tokens.chart.css) | Validated categorical palette for data viz. |
12
13
  | [`components.css`](./components.css) | Shared controls and patterns as plain CSS in `@layer brignano.components`: one import, any framework. DESIGN.md §14; catalog in `proposals/component-layer.md`; preview in `previews/components.html`. |
13
14
  | [`controls.css`](./controls.css) | `components.css` without the layout primitives (`.container`, `.stack`, `.cluster`, `.grid`, `.section`, `.divider`, `.gap-*`), for a Tailwind site where those names are already utilities. Generated by `npm run controls`; DESIGN.md §11. |
14
15
  | [`product-page.css`](./product-page.css) | The structure of a product's marketing page, built from a five-line brief: thesis and proof on the first phone screen, one signature band, how it works, closing ask. The shared parts every page needs, and a starting point for the look each product writes over it: its mark fills the primary button, and five choices keep any two products from looking alike (ADR-0017). DESIGN.md §13; skeleton in `previews/product-page.html`, one worked example per product in `previews/product-page-example.html` (Driftwood), `product-page-guidebook.html` and `product-page-sites.html`, first-screen check in `scripts/fold.mjs`. |
15
16
  | [`templates/`](./templates) | Page templates built on `components.css`: `article.css` (posts and docs), `changelog.css`, `legal.css`, `error.css` (404, 500, offline), `settings.css`, and a transactional email (`email.html` + `email.txt`, filled from the tokens by `scripts/email-tokens.mjs`). Import as `@brignano/design/templates/<name>.css`. |
16
17
  | [`icons/`](./icons) | One curated outline icon set (Lucide, ISC; `icons/LICENSE`) on a 24px grid in `currentColor`. Size with `.icon-sm`, `.icon`, `.icon-lg` from `components.css`; browse and copy in `previews/icons.html`. Paste the markup inline (`@brignano/design/icons/<name>.svg`); through `<img>` an icon can't take the text colour. |
17
- | [`logo/`](./logo) | The `A\|B` logo: `paths.mjs` to inline it (letters in `--ink`, bar in `--mark-current`), `mark.svg` for an `<img>`, `tile.svg` and the tile PNGs for a favicon and app icon. Rules in DESIGN.md §5, "The logo". |
18
+ | [`logo/`](./logo) | The `ab` logo: `paths.mjs` to inline it (letters in `--ink`, cursor in `--mark-current`), `mark.svg` for an `<img>`, `tile.svg` and the tile PNGs for a favicon and app icon. Rules in DESIGN.md §5, "The logo". |
18
19
  | [`previews/`](./previews) | Live swatches. Open one in a browser to see the tokens render. |
19
20
 
20
21
  ## The shape of it
@@ -22,7 +23,7 @@ The shared design system for every brignano surface — `brignano.io`, `life`,
22
23
  Three layers, so no colour does two jobs:
23
24
 
24
25
  - **`--mark`** — identity. Larch amber. Inks a product's glyph, the monogram and a hero rule. Never a control.
25
- - **`--i-*`** — affordance. Cobalt. Links, buttons, focus, selection. Semantically inert.
26
+ - **`--action-*`** — affordance. Cobalt. Links, buttons, focus, selection. Semantically inert.
26
27
  - **`--success / --attention / --danger`** — state. Conventional hues, always with an icon and a word.
27
28
 
28
29
  Distinctiveness lives in the mark; conventionality lives in the control layer.
@@ -44,6 +45,52 @@ Light and dark follow the OS until something sets `data-theme="light"` or
44
45
  part (DESIGN.md §11). Each colour is a single `light-dark()` declaration, so this
45
46
  needs a browser from mid-2024 or later.
46
47
 
48
+ ### Kits
49
+
50
+ Three looks ship beside the default one, opt-in until 1.0 (ADR-0020). Import
51
+ one and name it on `<html>`, or on any element to give just that part the look:
52
+
53
+ ```css
54
+ @import '@brignano/design/kits/split.css'; /* or ledger.css, larch.css */
55
+ ```
56
+
57
+ ```html
58
+ <html data-kit="split">
59
+ ```
60
+
61
+ A kit names its typefaces; the surface loads them. All are SIL OFL, latin
62
+ subset, in [`fonts/`](./fonts) with their licences:
63
+
64
+ | Kit | Load | Size |
65
+ |---|---|---|
66
+ | `split` | `archivo-latin-wdth-normal.woff2`, `martian-mono-latin-wght-normal.woff2` | 111 KB |
67
+ | `ledger` | `newsreader-latin-wght-normal.woff2`, `newsreader-latin-wght-italic.woff2`, `instrument-sans-latin-wght-normal.woff2`, and Plex Mono | 149 KB + 44 KB |
68
+ | `larch` | `bricolage-grotesque-latin-wght-normal.woff2`, `onest-latin-wght-normal.woff2`, and Plex Mono | 73 KB + 44 KB |
69
+
70
+ Plex Mono is `ibm-plex-mono-latin-400-normal.woff2`, `-500-` and `-600-` (44 KB
71
+ together), which a surface on today's look already loads.
72
+
73
+ The `@font-face` rules are in [`previews/_fonts.css`](./previews/_fonts.css) to
74
+ copy. Components are not restyled for the kits yet.
75
+
76
+ ### Product themes
77
+
78
+ A product's look is a few lines in [`themes/`](./themes) (a kit, a ground, a
79
+ hue, a face, corners), built into one CSS file. Import it and name the product;
80
+ there is no kit file to import as well:
81
+
82
+ ```css
83
+ @import '@brignano/design/themes/sites.css';
84
+ ```
85
+
86
+ ```html
87
+ <html data-product="sites">
88
+ ```
89
+
90
+ Shipped: `homelab`, `driftwood`, `guidebook`, `sites`, `receipts`. Adding one
91
+ is a new `.theme` file and `npm run build` (DESIGN.md §11, "Product themes").
92
+ Load the fonts of the theme's kit, plus any face its `typeface` names.
93
+
47
94
  The tool tier is the default. A marketing surface opts in with
48
95
  `class="tier-marketing"` on `<html>`, which unlocks the display face and opens the
49
96
  type scale. Colour is identical across tiers.
@@ -76,7 +123,7 @@ preview renders unstyled.
76
123
  ## For agents
77
124
 
78
125
  Read `DESIGN.md` before styling anything. Use the tokens. **Never hardcode a hex
79
- outside `tokens.css`** — a literal survives a theme change silently, which is how
126
+ outside `tokens/`** — a literal survives a theme change silently, which is how
80
127
  `life`'s status pills sat light grey in dark mode for months.
81
128
 
82
129
  ## Status