@brignano/design 0.8.0 → 0.9.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 (61) hide show
  1. package/DECISIONS.md +126 -0
  2. package/DESIGN.md +269 -9
  3. package/README.md +3 -2
  4. package/components.css +175 -61
  5. package/icons/LICENSE +43 -0
  6. package/icons/arrow-down.svg +15 -0
  7. package/icons/arrow-left.svg +15 -0
  8. package/icons/arrow-right.svg +15 -0
  9. package/icons/arrow-up-down.svg +17 -0
  10. package/icons/arrow-up.svg +15 -0
  11. package/icons/bell.svg +15 -0
  12. package/icons/calendar.svg +17 -0
  13. package/icons/check.svg +14 -0
  14. package/icons/chevron-down.svg +14 -0
  15. package/icons/chevron-left.svg +14 -0
  16. package/icons/chevron-right.svg +14 -0
  17. package/icons/chevron-up.svg +14 -0
  18. package/icons/circle-check.svg +15 -0
  19. package/icons/circle-help.svg +16 -0
  20. package/icons/circle-x.svg +16 -0
  21. package/icons/clock.svg +15 -0
  22. package/icons/copy.svg +15 -0
  23. package/icons/download.svg +16 -0
  24. package/icons/ellipsis-vertical.svg +16 -0
  25. package/icons/ellipsis.svg +16 -0
  26. package/icons/external-link.svg +16 -0
  27. package/icons/eye-off.svg +17 -0
  28. package/icons/eye.svg +15 -0
  29. package/icons/funnel.svg +14 -0
  30. package/icons/house.svg +15 -0
  31. package/icons/info.svg +16 -0
  32. package/icons/link.svg +15 -0
  33. package/icons/lock.svg +15 -0
  34. package/icons/log-out.svg +16 -0
  35. package/icons/map-pin.svg +15 -0
  36. package/icons/menu.svg +16 -0
  37. package/icons/minus.svg +14 -0
  38. package/icons/monitor.svg +16 -0
  39. package/icons/moon.svg +14 -0
  40. package/icons/pencil.svg +15 -0
  41. package/icons/plus.svg +15 -0
  42. package/icons/refresh-cw.svg +17 -0
  43. package/icons/search.svg +15 -0
  44. package/icons/settings.svg +15 -0
  45. package/icons/sun.svg +22 -0
  46. package/icons/trash-2.svg +18 -0
  47. package/icons/triangle-alert.svg +16 -0
  48. package/icons/undo-2.svg +15 -0
  49. package/icons/upload.svg +16 -0
  50. package/icons/user.svg +15 -0
  51. package/icons/x.svg +15 -0
  52. package/package.json +3 -1
  53. package/product-page.css +31 -28
  54. package/tailwind.css +21 -0
  55. package/templates/app-shell.css +346 -0
  56. package/templates/article.css +7 -7
  57. package/templates/changelog.css +2 -2
  58. package/templates/error.css +81 -0
  59. package/templates/legal.css +3 -3
  60. package/templates/settings.css +95 -0
  61. package/tokens.css +123 -14
package/DECISIONS.md CHANGED
@@ -586,3 +586,129 @@ and closes, in both tiers, when:
586
586
  adopt it in a later change.
587
587
  - Anything else that wants to move still has to meet ADR-0009 or it is
588
588
  decorative.
589
+
590
+ ---
591
+
592
+ ## ADR-0014 — Identity is a mono voice, a product's mark inside its app, and heavy Geist
593
+
594
+ **Status:** accepted · 2026-11-12 · #137, [`proposals/identity.md`](proposals/identity.md)
595
+ **Supersedes:** the identity elements named in ADR-0004 (the trail, Silkscreen)
596
+
597
+ ### Context
598
+
599
+ ADR-0004 moved identity off amber fills and onto "the things that were always
600
+ carrying it": the trail, the `A|B` monogram and the Silkscreen display face.
601
+ The trail was later removed from brignano.io because it didn't help the
602
+ experience, and neither of the other two ever shipped in the package. An app
603
+ built from the system had no identity at all, and the product marks
604
+ (ADR-0011) stopped at the product page. Anthony chose a direction from a
605
+ wireframe (`previews/wireframes/identity.html`) and accepted the proposal.
606
+
607
+ ### Decision
608
+
609
+ - **A mono voice.** Every screen opens with one small uppercase mono label,
610
+ and numbers, dates and codes are set in mono. A written rule, not a check.
611
+ - **A product's mark follows it into its app.** `data-mark` on `<html>` sets
612
+ the mark for everything below it: the brand glyph in the header and on
613
+ error pages, and the rule above a hero heading. With no attribute the mark
614
+ is the family amber (`--mark`), so personal tools share it. A product gets
615
+ its own hue when it gets a product page.
616
+ - **Heavy, tight Geist is the display treatment**, in both tiers, for an
617
+ error code or the `A|B` stamp. Silkscreen is removed in the next minor
618
+ release, after brignano.io has swapped it out.
619
+ - A mark is still never a button, link, text or state (ADR-0004, ADR-0011).
620
+ Cobalt stays the only colour that means "you can act on this".
621
+
622
+ ### Consequences
623
+
624
+ - The trail is no longer part of the identity; DESIGN.md §1, §3 and §5 and
625
+ the comments in `tokens.css` drop it when the build lands.
626
+ - `components.css` gains `.eyebrow`, `.num`, `.display`, `.stamp` and
627
+ `.rule`; `tokens.css` gains the `data-mark` rules. `product-page.css`
628
+ reads the same variable, so `.pp[data-mark]` keeps working.
629
+ - `--display` stays as a token name, so nothing breaks by name when the
630
+ Silkscreen override and font file go.
631
+ - brignano.io, driftwood, guidebook and sites each get an issue: the first to
632
+ swap Silkscreen, the others to set `data-mark`.
633
+
634
+ ---
635
+
636
+ ## ADR-0015 — A white label on cobalt in both themes; controls answer a press and a switch
637
+
638
+ **Status:** accepted · 2026-11-12 · #136
639
+ **Amends:** ADR-0001 (the dark steps of cobalt), ADR-0013 (what may move)
640
+
641
+ ### Context
642
+
643
+ A review of the whole system found three things that made the components
644
+ read as a default kit. In dark the primary button was a pale blue with a dark
645
+ label, and its hover and pressed steps were paler still, so the most
646
+ important control on a screen looked washed out. Buttons, inputs, cards and
647
+ dialogs shared corners that didn't say which was nested in which (a 12px
648
+ button in a 12px card, beside a 6px input). And a control gave no feedback
649
+ beyond a colour step, while switching a tab was an instant swap.
650
+
651
+ ### Decision
652
+
653
+ - **The cobalt fill takes a white label in both themes.** Dark `--i` is a
654
+ saturated mid-cobalt (hue 256°, as light as a white label allows at 4.5:1),
655
+ and `--i-hover` and `--i-pressed` step darker, as they do in light. `--i-ink`
656
+ is unchanged, so in dark the fill and the ink are now different steps.
657
+ `--on-i` is white everywhere; a `--danger` fill gets its own `--on-danger`,
658
+ because rust still lifts to a pale fill with a dark label in dark.
659
+ - **Controls have their own radius.** `--radius-control` (8px) for buttons,
660
+ inputs, selects, the segmented control and menu items, between
661
+ `--radius-sm` (chips, pills) and `--radius` (cards).
662
+ - **A control may answer the person who used it.** A button settles by 2%
663
+ while pressed, and a switch of view (a tab, a segment) may cross-fade
664
+ through `document.startViewTransition()`, at the browser's default 250ms.
665
+ The package styles nothing on the transition, so it can't change a site's
666
+ own. Both are only ever started by the person, and neither happens under
667
+ `prefers-reduced-motion`.
668
+
669
+ ### Consequences
670
+
671
+ - Everything drawn in `--i` in dark gets more saturated and darker: the
672
+ checked checkbox and switch, the selected segment, the current page number,
673
+ progress bars, the info dot, and the washes (`--i-surface`, `--i-line`,
674
+ `--i-selection`), which mix the fill. All still clear their floors.
675
+ - The danger button in dark keeps its pale fill and dark label. Bringing it
676
+ in line means moving a state hue, which is a separate decision.
677
+ - §7's list of what may move gains a third entry. Entrance, hover and scroll
678
+ animation are still out.
679
+ - Sheets and dialogs already move under ADR-0013 and get nothing new.
680
+
681
+ ---
682
+
683
+ ## ADR-0016 — The danger button has its own fills; the state hue doesn't move
684
+
685
+ **Status:** accepted · 2026-11-12 · #147
686
+ **Follows:** ADR-0015, which left the dark danger button as it was
687
+
688
+ ### Context
689
+
690
+ After ADR-0015 the primary button in dark is a deep cobalt with a white
691
+ label. The danger button still filled with the state hue `--danger`, which in
692
+ dark is a pale rust chosen to be read as text and marks on dark surfaces, so
693
+ the button carried a dark label and went lighter on hover. Beside the primary
694
+ the destructive action looked the softer of the two. Deepening `--danger`
695
+ itself would have darkened every message, pill and field error with it.
696
+
697
+ ### Decision
698
+
699
+ A destructive button fills with tokens of its own: `--danger-fill`,
700
+ `--danger-fill-hover` and `--danger-fill-pressed`, under a white
701
+ `--on-danger` label in both themes. In light they are `--danger` and
702
+ `--danger-ink`, so nothing changes there, and `npm run check` holds them to
703
+ those. In dark they sit at rust's hue and chroma, as light as a white label
704
+ allows at 4.5:1, stepping darker on hover and press: the method ADR-0015 used
705
+ for cobalt.
706
+
707
+ ### Consequences
708
+
709
+ - `--danger`, `--danger-ink` and the danger washes are untouched, so
710
+ messages, pills, toasts, field errors and diagram states look as before.
711
+ - "Fill" and "state" are now separate roles for danger, as `--i` and `--i-ink`
712
+ are for cobalt. Success and attention have no filled control, so they get
713
+ no fill tokens until something needs one.
714
+
package/DESIGN.md CHANGED
@@ -18,6 +18,11 @@ colour used so sparingly that when it appears you look at it.
18
18
  Nothing here should read as a developer-portfolio template, and nothing should
19
19
  read as a toy.
20
20
 
21
+ What makes a screen recognisably one of these (ADR-0014): a **mono voice** (a
22
+ small uppercase mono label opens every screen, and every number, date and code
23
+ is set in mono), the product's own mark on its glyph, and one heavy, tight
24
+ Geist moment where a screen has something big to say. §5 has the classes.
25
+
21
26
  ## 2. Two tiers, one foundation
22
27
 
23
28
  The professional site should be more polished than a private trip planner. That
@@ -31,7 +36,7 @@ family, motion and shape are identical; what changes is how much room things get
31
36
  | Section rhythm | `--s9` (96px) | `--s6` (32px) |
32
37
  | Measure | 68ch | 780px |
33
38
  | Display face | Silkscreen — monogram, hero eyebrows | none (aliases to `--sans`) |
34
- | Motion | the trail, scroll reveal, overlays opening and closing (ADR-0013) | none, except overlays opening and closing (ADR-0013) |
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) |
35
40
  | Density | whitespace carries the layout | scanning beats reading |
36
41
 
37
42
  ## 3. Colour — one hue, one meaning
@@ -63,17 +68,36 @@ system coherent across a marketing site and an operational tool.
63
68
 
64
69
  ### Identity is not a fill
65
70
 
66
- `--mark` inks a **graphic**: the trail line, the `A|B` monogram, a hero rule.
71
+ `--mark` inks a **graphic**: a product's glyph, the `A|B` monogram, a hero rule.
67
72
  That is its entire permitted use. It is never a button, chip, badge, wash, border,
68
73
  or link.
69
74
 
70
75
  This is the resolution of a real problem. Amber used to be both the brand colour
71
76
  and the warning colour, kept apart by a rule about scale — and rules enforced by
72
77
  remembering get forgotten. Identity moved to the things that were always carrying
73
- it (the trail, the monogram, the type, restraint), so amber in UI chrome now only
78
+ it (the monogram, the type, restraint; ADR-0014), so amber in UI chrome now only
74
79
  ever means *attention*. If you're reaching for `--mark` to tint an interface
75
80
  element, the answer is a neutral or a state colour.
76
81
 
82
+ ### A product's mark follows it
83
+
84
+ Each product has one mark colour (`--mark-teal`, `--mark-violet`,
85
+ `--mark-magenta`; §13), and it is the same on its marketing page, inside its
86
+ app and on its error pages (ADR-0014). Set it once:
87
+
88
+ ```html
89
+ <html data-mark="teal">
90
+ ```
91
+
92
+ `data-mark` sets `--mark-current` for everything inside the element. The brand
93
+ glyph in `.site-brand` and `.error-page-mark` (an inline SVG in `currentColor`)
94
+ and `.rule` draw in it; the name beside the glyph stays `--ink`. With no
95
+ attribute the mark is the family amber, so personal tools share it. A product
96
+ gets its own hue when it gets a product page, not before.
97
+
98
+ The contract is `--mark`'s: a graphic only. Buttons and links stay cobalt on
99
+ every product, so "you can act on this" looks the same everywhere.
100
+
77
101
  ### Colour is a surface, not text
78
102
 
79
103
  A wash (12% light / 20% dark via `color-mix`) behind an element with the text kept
@@ -109,7 +133,13 @@ type is already carried by a text label. Nor `idea`, `planning`, `someday`, or
109
133
 
110
134
  The part that makes an interface feel built rather than styled.
111
135
 
112
- - `--i` fill, `--i-hover`, `--i-pressed`, `--i-ink` for links/icons/focus.
136
+ - `--i` fill, `--i-hover`, `--i-pressed`, `--i-ink` for links/icons/focus. The
137
+ fill is a saturated cobalt with a white label (`--on-i`) in both themes, and
138
+ hover and pressed step darker in both. In dark the fill and the ink are
139
+ different steps: fill a surface with `--i`, write or draw on a surface with
140
+ `--i-ink`, and a hovered link takes `--i-ink-hover`, never the fill's hover. A destructive button fills with `--danger-fill` (and its
141
+ `-hover` and `-pressed` steps) under a white `--on-danger` label, not with
142
+ the state hue `--danger`, which in dark is a pale rust for reading.
113
143
  - **Disabled is neutral, never hued** (`--i-disabled-bg` / `--i-disabled-ink`). A
114
144
  greyed-out control must stop signalling "click me". Its low contrast is allowed
115
145
  only because WCAG 1.4.3 exempts *inactive* controls, so the state must be real:
@@ -142,15 +172,72 @@ Three roles, no more:
142
172
 
143
173
  No serif. Abstract over literal — no mascots, clip-art, or stock scenery.
144
174
 
175
+ **The voice** (ADR-0014) is these three roles used the same way everywhere:
176
+
177
+ - **One eyebrow per screen.** `.eyebrow` is a small uppercase mono label above
178
+ the screen's heading that says where you are ("Production" above
179
+ "Services"). One, not one per card. Written in sentence case; the CSS
180
+ uppercases it (§15).
181
+ - **Numbers in mono.** A number, date, time or code a person might compare or
182
+ copy takes `.num` (mono, tabular figures). A table's numeric column and a
183
+ stat's value already do.
184
+ - **One heavy moment.** `.display` sets an error code or a single headline
185
+ figure in Geist at `--weight-heavy` (800), tight and large; `.stamp` sets the
186
+ `A|B` monogram at the same weight, spaced open (`--tracking-caps`) so the bar
187
+ doesn't read as an I, for a footer or an about page. This is the
188
+ display treatment, in both tiers. It is the one use of a weight above 600,
189
+ and at most once a screen. `.rule` is the short bar in the mark in force (`--mark-current`, §3)
190
+ above a hero heading. (`--display` still names Silkscreen on the marketing tier until
191
+ #142 removes it.)
192
+
193
+ Sizes change with the tier (`--text-xs` … `--text-4xl`); weight, leading and
194
+ tracking don't:
195
+
196
+ | Token | Value | For |
197
+ |---|---|---|
198
+ | `--weight-regular` / `-medium` / `-semibold` | 400 / 500 / 600 | text / controls and labels / headings. Nothing lighter or bolder. |
199
+ | `--weight-heavy` | 800 | `.display` and `.stamp` only |
200
+ | `--leading-display` | 1.15 | display headings |
201
+ | `--leading-title` | 1.3 | titles |
202
+ | `--leading-ui` | 1.4 | interface text |
203
+ | `--leading-body` | 1.6 | paragraphs |
204
+ | `--tracking-title` / `--tracking-display` | -0.01em / -0.025em | headings / large display headings |
205
+ | `--tracking-caps` | 0.08em | uppercase mono eyebrows; the `.stamp` monogram |
206
+
207
+ They are named by role because Tailwind already owns `--leading-tight`,
208
+ `--tracking-tight` and the rest; the bridge adds `leading-display`,
209
+ `tracking-title` and so on and leaves Tailwind's own utilities alone.
210
+
211
+ A heading or title balances its lines (`text-wrap: balance`) and running text
212
+ avoids a one-word last line (`pretty`). On a touch screen the tool tier's
213
+ `--text-xs` rises from 11px to 12px.
214
+
145
215
  ## 6. Space, shape, elevation
146
216
 
147
- 4px base (`--s1` … `--s9`). Radius: `--radius-sm` for chips and pills, `--radius`
148
- for cards, `--radius-lg` for hero surfaces.
217
+ 4px base (`--s1` … `--s9`). Radius steps by what the thing is, so a control
218
+ inside a card reads as nested rather than as a smaller card: `--radius-sm`
219
+ (6px) for chips and pills, `--radius-control` (8px) for buttons, inputs,
220
+ selects, the segmented control and menu items, `--radius` (12px) for cards,
221
+ messages, popovers and code blocks, `--radius-lg` (18px) for dialogs and
222
+ hero surfaces.
149
223
 
150
224
  **Elevation differs by theme.** Light mode separates surfaces with a hairline plus
151
225
  a shadow (`--shadow-1/2/3`). Dark mode does not use borders — surfaces get
152
226
  *lighter* with elevation. This is why `--line` can stay nearly invisible in dark.
153
227
 
228
+ **Stacking** is named, not numbered: `--z-raised` (a control above its card's
229
+ stretched link), `--z-sticky` (a header), `--z-float` (a floating label),
230
+ `--z-skip` (the skip link), `--z-toast`. Dialogs, popovers and sheets sit in the
231
+ browser's top layer and need none.
232
+
233
+ **Breakpoints are a short list, not tokens**, because a CSS variable can't be
234
+ used in a media query. Components and templates size to their own container
235
+ (`@container`) wherever they can, so the same markup works in a narrow column
236
+ and a wide page. The steps in use: 30rem (480px) and 35rem (560px) for a
237
+ phone, 48rem (768px) where a second column appears, 60rem (960px) for a
238
+ desktop layout, 75rem (1200px) where a third column appears. Reach for one of
239
+ these before adding another.
240
+
154
241
  **Sticky chrome** — a header or toolbar that content scrolls under — is
155
242
  `--surface-sticky` with `backdrop-filter: blur(8px)`: 92% of the card in light,
156
243
  of the page ground in dark, so it reads as the surface it sits on, not a new layer.
@@ -188,6 +275,27 @@ shown, so a browser without `@starting-style` shows it at once; and under
188
275
  already open when the page loads doesn't animate. That is the whole
189
276
  exception: content on the page itself still never animates in.
190
277
 
278
+ **The third: a control may answer the person who used it** (ADR-0015). Two
279
+ cases, both only ever started by the person:
280
+
281
+ - **A press.** A `.btn` settles by 2% over `--dur-fast` while it is held down. Not when it is
282
+ disabled or busy.
283
+ - **A switch of view.** When someone picks a tab or a segment, the script that
284
+ swaps the content may wrap the swap in `document.startViewTransition()`, and
285
+ the old view cross-fades to the new one at the browser's default, 250ms
286
+ (the same as `--dur`). The package sets nothing on the transition, so a
287
+ site that already uses view transitions is not affected. Opt in per switch;
288
+ a browser without the API swaps at once.
289
+
290
+ Under `prefers-reduced-motion` neither happens. Nothing here runs on load, on
291
+ hover or on scroll.
292
+
293
+ **Print is the light theme.** `tokens.css` forces `color-scheme: light` on
294
+ paper whatever the screen was showing, and `components.css` drops sticky
295
+ chrome, shadows, popovers, sheets and controls that do nothing on paper, keeps cards and table
296
+ rows whole across a page break, and writes an outside link's address after it
297
+ in `.prose`.
298
+
191
299
  ## 8. Charts
192
300
 
193
301
  The one place the restraint rule does **not** apply: a categorical chart needs
@@ -281,7 +389,7 @@ not just `<html>`.** A dark hero band on a light marketing page is
281
389
  Two consequences for code that touches tokens directly:
282
390
 
283
391
  - **Don't read a token's value with `getPropertyValue`.** It returns the
284
- declaration text, `light-dark(#076bd3, #6ba5f3)`, not a colour. To get the
392
+ declaration text, `light-dark(#076bd3, #0371e0)`, not a colour. To get the
285
393
  colour a chart library needs, resolve it on an element in the right subtree:
286
394
  set `el.style.color = 'var(--chart-1)'` and read `getComputedStyle(el).color`.
287
395
  Re-read it when the theme changes.
@@ -309,7 +417,7 @@ alone. In the consumer's `package.json`:
309
417
  ```
310
418
 
311
419
  Verified with Lightning CSS: older targets lower the tokens; these targets
312
- pass `light-dark(#076bd3, #6ba5f3)` through untouched.
420
+ pass `light-dark(#076bd3, #0371e0)` through untouched.
313
421
 
314
422
  ### Tailwind
315
423
 
@@ -439,7 +547,8 @@ Shared structure is what makes a page fast to build; shared looks is what made
439
547
  Driftwood, Guidebook and Sites read as one page with the words swapped. Each
440
548
  product makes three choices, and **no two products make all three the same**:
441
549
 
442
- - **A mark** (`data-mark` on `.pp`: `teal`, `violet` or `magenta`; tokens
550
+ - **A mark** (`data-mark` on `.pp` or on `<html>`, the same attribute its app
551
+ uses, §3: `teal`, `violet` or `magenta`; tokens
443
552
  `--mark-teal` and so on). It inks the product's glyph (an inline SVG in
444
553
  `currentColor`), the hero rule above the thesis, the **stage** (a faint field
445
554
  behind the hero proof), the clip's current step and the how-it-works
@@ -630,8 +739,159 @@ and in what order: [`proposals/component-layer.md`](./proposals/component-layer.
630
739
  edge check because they are never a control's edge.
631
740
  - **Every class is shown.** A class in `components.css` or a template that no
632
741
  preview page uses fails the check: if it isn't shown, it isn't reviewed.
742
+ - **Every preview is its docs page.** A component or template page carries
743
+ `data-status` on `<html>` (`stable`, `beta` or `planned`; the header shows it
744
+ and the index card repeats it) and, under its live examples, a `.docs` block
745
+ with four sections tagged `data-doc`: **Use it** (`usage`, a copy-paste
746
+ snippet), **Use when** (`use-when`), **Don't use when** (`dont-use`, naming
747
+ the better choice) and **Accessibility** (`a11y`: keyboard, screen reader,
748
+ required attributes). Other sections (variants, states, behaviour your script
749
+ owns) sit between them. `npm run check` fails on a missing section or a status
750
+ the index disagrees with. Planned components are listed on the index with a
751
+ link to their issue.
752
+ - **One icon set.** `icons/` holds the only icons a surface uses: outline
753
+ icons from Lucide (ISC, `icons/LICENSE`) on a 24px grid at a 2px stroke, in
754
+ `currentColor`, so pasted inline they take their text's colour (through
755
+ `<img>` they draw black). Size them with `.icon-sm`,
756
+ `.icon` or `.icon-lg` (1.25× the text beside them). Decorative icons are
757
+ `aria-hidden`; an icon-only button carries an `aria-label`. Need one that
758
+ isn't there? Add it from Lucide in a PR; don't draw one or pull in another
759
+ set. Brand logos are the exception and stay with their brands.
633
760
  - **Switch or checkbox.** A switch (`.switch`, `role="switch"`) is only for a
634
761
  setting that takes effect the moment it flips. Anything sent with a form's
635
762
  submit button is a checkbox, because a switch promises an effect the form
636
763
  hasn't made yet.
637
764
 
765
+
766
+ ## 15. Content
767
+
768
+ Words are part of the interface. A product that labels one button "Save" and
769
+ the next "Submit changes" reads as inconsistent as one with two greys. These
770
+ rules cover the words inside a product: controls, messages, data. Marketing copy
771
+ follows the brief in §13. English only for now.
772
+
773
+ Each rule has one do and one don't. The live page is
774
+ [`previews/writing.html`](./previews/writing.html); `npm run check` fails when
775
+ a rule here has no section there.
776
+
777
+ ### Voice
778
+
779
+ Competent, calm, plain words. Say what happened and what to do next, the way a
780
+ colleague who knows the system would. No hype, no jokes, no apology theatre.
781
+
782
+ - Do: "Changes saved."
783
+ - Don't: "Awesome! Your changes have been successfully saved!"
784
+
785
+ ### Sentence case
786
+
787
+ Everything is in sentence case: buttons, headings, labels, menu items, tabs,
788
+ page titles. Capitalise only the first word and proper nouns. An eyebrow can be
789
+ uppercase through CSS, but it is written in sentence case.
790
+
791
+ - Do: "Account settings", "Sign in with GitHub"
792
+ - Don't: "Account Settings", "SIGN IN"
793
+
794
+ ### Buttons and links
795
+
796
+ A button is a verb and its object, so it still makes sense read on its own. A
797
+ link names where it goes. The button that confirms an action repeats that
798
+ action's verb.
799
+
800
+ - Do: "Delete trip", "Read the release notes"
801
+ - Don't: "OK", "Click here"
802
+
803
+ ### Form labels
804
+
805
+ A label is a short noun phrase above its field, never a placeholder. Mark the
806
+ optional fields with "(optional)", not the required ones, and put formats in
807
+ the hint below.
808
+
809
+ - Do: "Phone (optional)", with the hint "We only call about bookings."
810
+ - Don't: "Phone*", or "Please enter your phone number" as the placeholder
811
+
812
+ ### Errors
813
+
814
+ Say what happened and how to fix it, in that order, next to the thing that
815
+ went wrong. Name the field or the action, never the person. No codes unless
816
+ someone will search for them, and then in mono after the words.
817
+
818
+ - Do: "That date has passed. Pick today or later."
819
+ - Don't: "Invalid input.", "You entered a wrong date."
820
+
821
+ ### Empty states
822
+
823
+ Say what will be here and give the one action that fills it. If the person
824
+ can't fill it (no results, nothing assigned yet), say why it's empty and what
825
+ would change that.
826
+
827
+ - Do: "No trips yet", then "Plan one and it shows up here." and a "Plan a trip" button
828
+ - Don't: "Nothing to see here!"
829
+
830
+ ### Confirmations
831
+
832
+ Ask only before something that can't be undone. The title names the action and
833
+ the object, the body says what goes with it, and the buttons are the verb and
834
+ a way out ("Cancel", or "Keep trip" when that reads better). Where an action
835
+ can be undone, do it and offer Undo instead of asking.
836
+
837
+ - Do: "Delete Lisbon 2027?" / "Its 12 photos go with it. This can't be undone." / "Delete trip", "Keep trip"
838
+ - Don't: "Are you sure?" / "Yes", "No"
839
+
840
+ ### Success messages
841
+
842
+ Past tense, the object first, and Undo when there is one. A success message
843
+ is quiet: a toast or an inline line, never a dialog.
844
+
845
+ - Do: "Trip deleted", with Undo
846
+ - Don't: "Success!"
847
+
848
+ ### Dates
849
+
850
+ In the interface a date is day, short month, year: "7 Nov 2026", with the
851
+ weekday first when it helps planning ("Sat 7 Nov 2026"). Drop the year inside
852
+ the current year when nothing is ambiguous. Data a person might copy, sort or
853
+ search (logs, IDs, exports, timestamps in a table) uses ISO 8601 in `--mono`.
854
+
855
+ - Do: "7 Nov 2026" in a sentence, `2026-11-07` in a log row
856
+ - Don't: "11/07/2026", "November 7th, 2026"
857
+
858
+ ### Times
859
+
860
+ Twelve-hour, with a space and capital AM or PM; drop ":00" on the hour in prose.
861
+ Add the zone when the reader might be elsewhere. 24-hour time is not used,
862
+ except inside ISO 8601 data in mono (`2026-11-07T21:30Z` in a log). For
863
+ something in the last day, a relative time ("5 min ago") is fine, with the full
864
+ date and time in a tooltip or `title`.
865
+
866
+ - Do: "9:30 AM", "3 PM ET", "2–3 AM UTC"
867
+ - Don't: "21:30", "9:30am"
868
+
869
+ ### Numbers
870
+
871
+ Numerals for every number, a comma every three digits, and a space before a
872
+ unit except %. Compact durations in tables and mono data ("2h 11m", "150ms")
873
+ can drop the space. Words a person typed, like a quoted message, stay as
874
+ written. Figures that line up in a column use tabular figures, which the
875
+ type tokens already set.
876
+
877
+ - Do: "3 trips · 10,482 photos · 64 GB · 64%"
878
+ - Don't: "three trips · 10482 photos · 64GB · 64 %"
879
+
880
+ ### Currency
881
+
882
+ The symbol before the number with no space. Whole amounts drop ".00" in prose;
883
+ a table of prices shows two decimals on every row so they line up. Name the
884
+ currency ("US$", "€") only when the reader could mistake it.
885
+
886
+ - Do: "$1,240", "$12.50"
887
+ - Don't: "$1240.00", "12.5 USD"
888
+
889
+ ### What never appears
890
+
891
+ These don't appear in a product's interface: exclamation marks; "simply",
892
+ "just" or "easy" when they play a task down (they blame the person when it
893
+ isn't); "Oops" or "Uh-oh"; emoji as words; ALL CAPS typed into the text; and,
894
+ on marketing pages, jargon the reader has to look up.
895
+
896
+ - Do: "Couldn't load your trips. Try again."
897
+ - Don't: "Oops! Something went wrong!! Simply refresh."
package/README.md CHANGED
@@ -11,14 +11,15 @@ The shared design system for every brignano surface — `brignano.io`, `life`,
11
11
  | [`tokens.chart.css`](./tokens.chart.css) | Validated categorical palette for data viz. |
12
12
  | [`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
13
  | [`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; a product mark, hero layout and proof frame so each product looks like itself. DESIGN.md §13; skeleton in `previews/product-page.html`, worked example in `previews/product-page-example.html`, first-screen check in `scripts/fold.mjs`. |
14
- | [`templates/`](./templates) | Page templates built on `components.css`: `article.css` (posts and docs), `changelog.css`, `legal.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`. |
14
+ | [`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`. |
15
+ | [`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. |
15
16
  | [`previews/`](./previews) | Live swatches. Open one in a browser to see the tokens render. |
16
17
 
17
18
  ## The shape of it
18
19
 
19
20
  Three layers, so no colour does two jobs:
20
21
 
21
- - **`--mark`** — identity. Larch amber. Inks the trail and the monogram. Never a control.
22
+ - **`--mark`** — identity. Larch amber. Inks a product's glyph, the monogram and a hero rule. Never a control.
22
23
  - **`--i-*`** — affordance. Cobalt. Links, buttons, focus, selection. Semantically inert.
23
24
  - **`--success / --attention / --danger`** — state. Conventional hues, always with an icon and a word.
24
25