@brignano/design 0.12.0 → 0.13.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 +28 -1
- package/README.md +2 -1
- package/controls.css +2251 -0
- package/decisions/0001-cobalt.md +56 -0
- package/decisions/0002-chart-palette.md +48 -0
- package/decisions/0003-one-public-package.md +47 -0
- package/decisions/0004-one-hue-one-meaning.md +50 -0
- package/decisions/0005-diagrams-are-not-charts.md +30 -0
- package/decisions/0006-light-dark.md +55 -0
- package/decisions/0007-neutral-hue-286.md +27 -0
- package/decisions/0008-cobalt-hue-256.md +41 -0
- package/decisions/0009-reader-asked-motion.md +26 -0
- package/decisions/0010-product-pages-show-then-tell.md +39 -0
- package/decisions/0011-product-page-briefs.md +59 -0
- package/decisions/0012-components-in-a-cascade-layer.md +32 -0
- package/decisions/0013-overlay-motion.md +35 -0
- package/decisions/0014-identity.md +41 -0
- package/decisions/0015-white-label-on-cobalt.md +44 -0
- package/decisions/0016-danger-fills.md +31 -0
- package/decisions/0017-product-identity.md +45 -0
- package/decisions/0018-card-stage.md +36 -0
- package/decisions/README.md +28 -0
- package/package.json +6 -3
- package/tokens.css +1 -1
- package/DECISIONS.md +0 -799
package/DESIGN.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
The visual contract for every brignano surface: `brignano.io`, `life`, `homelab`,
|
|
4
4
|
`driftwood`, and whatever comes next. Values live in [`tokens.css`](./tokens.css)
|
|
5
5
|
and [`tokens.chart.css`](./tokens.chart.css); the reasoning is in
|
|
6
|
-
[`
|
|
6
|
+
[`decisions/`](./decisions/README.md), one record per decision.
|
|
7
7
|
|
|
8
8
|
**Read this before styling anything.** An agent asked to build a page in any of
|
|
9
9
|
these repos should use these tokens, not invent a palette.
|
|
@@ -513,6 +513,30 @@ Import order matters — Tailwind first, then tokens, then the bridge:
|
|
|
513
513
|
@import "@brignano/design/tailwind.css";
|
|
514
514
|
```
|
|
515
515
|
|
|
516
|
+
To use the components in a Tailwind site, import **`controls.css`**, not
|
|
517
|
+
`components.css`, and put the design layer below Tailwind's utilities:
|
|
518
|
+
|
|
519
|
+
```css
|
|
520
|
+
@layer theme, base, brignano.components, components, utilities;
|
|
521
|
+
@import "tailwindcss";
|
|
522
|
+
@import "@brignano/design/tokens.css";
|
|
523
|
+
@import "@brignano/design/tailwind.css";
|
|
524
|
+
@import "@brignano/design/controls.css";
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
- `controls.css` is `components.css` without the layout primitives
|
|
528
|
+
(`.container`, `.stack`, `.cluster`, `.grid`, `.section`, `.divider`,
|
|
529
|
+
`.gap-2` … `.gap-6`). Those names are Tailwind utilities too: with
|
|
530
|
+
`components.css`, every `grid` gets auto-fit columns and every `gap-4` moves
|
|
531
|
+
to the `--s` scale. Tailwind keeps the layout; design brings the controls.
|
|
532
|
+
It is generated by `npm run controls` and checked, never edited by hand.
|
|
533
|
+
- The `@layer` line comes first so `brignano.components` sits under
|
|
534
|
+
`utilities`. Without it the layer is declared after Tailwind's and beats
|
|
535
|
+
every utility, so `mt-4` on a `.btn` would lose.
|
|
536
|
+
- `.prose` is a component here and a class of `@tailwindcss/typography`.
|
|
537
|
+
A site that keeps the plugin renames its class (`@plugin
|
|
538
|
+
"@tailwindcss/typography" { className: "tw-prose"; }`) or moves to `.prose`.
|
|
539
|
+
|
|
516
540
|
## 12. The one rule that keeps this true
|
|
517
541
|
|
|
518
542
|
**Never hardcode a hex outside `tokens.css`.**
|
|
@@ -816,6 +840,9 @@ and in what order: [`proposals/component-layer.md`](./proposals/component-layer.
|
|
|
816
840
|
@import '@brignano/design/components.css';
|
|
817
841
|
```
|
|
818
842
|
|
|
843
|
+
A Tailwind site imports `controls.css` instead: the same components without
|
|
844
|
+
the layout primitives whose names Tailwind already uses (§11).
|
|
845
|
+
|
|
819
846
|
- **One layer.** Everything is inside `@layer brignano.components`. A consumer's
|
|
820
847
|
unlayered CSS and Tailwind utilities beat it without `!important`, so a site
|
|
821
848
|
can adjust a component without fighting it.
|
package/README.md
CHANGED
|
@@ -6,10 +6,11 @@ The shared design system for every brignano surface — `brignano.io`, `life`,
|
|
|
6
6
|
| File | What it is |
|
|
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
10
|
| [`tokens.css`](./tokens.css) | Single source of truth for colour, type, space, shape, motion. |
|
|
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
|
+
| [`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. |
|
|
13
14
|
| [`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`. |
|
|
14
15
|
| [`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
16
|
| [`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. |
|