@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.
- package/DECISIONS.md +126 -0
- package/DESIGN.md +269 -9
- package/README.md +3 -2
- package/components.css +175 -61
- package/icons/LICENSE +43 -0
- package/icons/arrow-down.svg +15 -0
- package/icons/arrow-left.svg +15 -0
- package/icons/arrow-right.svg +15 -0
- package/icons/arrow-up-down.svg +17 -0
- package/icons/arrow-up.svg +15 -0
- package/icons/bell.svg +15 -0
- package/icons/calendar.svg +17 -0
- package/icons/check.svg +14 -0
- package/icons/chevron-down.svg +14 -0
- package/icons/chevron-left.svg +14 -0
- package/icons/chevron-right.svg +14 -0
- package/icons/chevron-up.svg +14 -0
- package/icons/circle-check.svg +15 -0
- package/icons/circle-help.svg +16 -0
- package/icons/circle-x.svg +16 -0
- package/icons/clock.svg +15 -0
- package/icons/copy.svg +15 -0
- package/icons/download.svg +16 -0
- package/icons/ellipsis-vertical.svg +16 -0
- package/icons/ellipsis.svg +16 -0
- package/icons/external-link.svg +16 -0
- package/icons/eye-off.svg +17 -0
- package/icons/eye.svg +15 -0
- package/icons/funnel.svg +14 -0
- package/icons/house.svg +15 -0
- package/icons/info.svg +16 -0
- package/icons/link.svg +15 -0
- package/icons/lock.svg +15 -0
- package/icons/log-out.svg +16 -0
- package/icons/map-pin.svg +15 -0
- package/icons/menu.svg +16 -0
- package/icons/minus.svg +14 -0
- package/icons/monitor.svg +16 -0
- package/icons/moon.svg +14 -0
- package/icons/pencil.svg +15 -0
- package/icons/plus.svg +15 -0
- package/icons/refresh-cw.svg +17 -0
- package/icons/search.svg +15 -0
- package/icons/settings.svg +15 -0
- package/icons/sun.svg +22 -0
- package/icons/trash-2.svg +18 -0
- package/icons/triangle-alert.svg +16 -0
- package/icons/undo-2.svg +15 -0
- package/icons/upload.svg +16 -0
- package/icons/user.svg +15 -0
- package/icons/x.svg +15 -0
- package/package.json +3 -1
- package/product-page.css +31 -28
- package/tailwind.css +21 -0
- package/templates/app-shell.css +346 -0
- package/templates/article.css +7 -7
- package/templates/changelog.css +2 -2
- package/templates/error.css +81 -0
- package/templates/legal.css +3 -3
- package/templates/settings.css +95 -0
- package/tokens.css +123 -14
package/tokens.css
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
2. IDENTITY IS NOT A FILL. Amber used to be the brand colour AND the
|
|
29
29
|
warning colour, managed by a rule about scale. Rules enforced by
|
|
30
30
|
remembering get forgotten. So identity moved to the thing that was
|
|
31
|
-
always carrying it — the
|
|
31
|
+
always carrying it — the monogram, the type, restraint — and --mark
|
|
32
32
|
exists only to ink a graphic. It is never a button, chip, wash, or
|
|
33
33
|
border. The naming is the enforcement.
|
|
34
34
|
|
|
@@ -154,23 +154,48 @@
|
|
|
154
154
|
chroma. It is deliberately NOT Tailwind's blue-600 (263°, a touch
|
|
155
155
|
violet and electric): same affordance, our own colour (ADR-0008).
|
|
156
156
|
|
|
157
|
-
--i fill 5.18:1 /
|
|
157
|
+
--i fill 5.18:1 / 3.78:1 (label 5.18 / 4.73)
|
|
158
158
|
--i-ink link/icon/focus 6.78:1 / 7.07:1
|
|
159
|
-
--i-hover hover fill 8.65:1 /
|
|
160
|
-
--i-
|
|
161
|
-
|
|
162
|
-
|
|
159
|
+
--i-hover hover fill label 8.65:1 / 5.88:1
|
|
160
|
+
--i-ink-hover hovered link 8.65:1 / 9.95:1 on --card
|
|
161
|
+
--i-pressed pressed fill label 10.44:1 / 7.52:1
|
|
162
|
+
|
|
163
|
+
The fill is a saturated mid-cobalt with a WHITE label in both themes,
|
|
164
|
+
and hover and pressed step darker in both. Dark used to lift the fill
|
|
165
|
+
to the ink's pale blue with a dark label, which read as washed out on
|
|
166
|
+
the most important control on the screen. So in dark the fill and the
|
|
167
|
+
ink are now different steps: --i fills, --i-ink is what you read
|
|
168
|
+
(links, icons, the focus ring). The dark fill is as light as a white
|
|
169
|
+
label allows (4.5:1), which is what keeps it 3:1 as a mark on --card,
|
|
170
|
+
--bg and its own wash.
|
|
163
171
|
|
|
164
172
|
DISABLED IS NEUTRAL, NEVER HUED — a greyed-out control must stop
|
|
165
173
|
signalling "click me". */
|
|
166
|
-
--i: light-dark(#076bd3, #
|
|
174
|
+
--i: light-dark(#076bd3, #0371e0);
|
|
167
175
|
--i-ink: light-dark(#0159b5, #6ba5f3);
|
|
168
|
-
--i-hover: light-dark(#014a97, #
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
--i-
|
|
172
|
-
--i-
|
|
173
|
-
--
|
|
176
|
+
--i-hover: light-dark(#014a97, #0062c7);
|
|
177
|
+
/* A hovered link is TEXT, so it follows the ink, not the fill: in dark the
|
|
178
|
+
fill's hover is too deep to read on a dark page (about 3.3:1). */
|
|
179
|
+
--i-ink-hover: light-dark(#014a97, #98c4ff);
|
|
180
|
+
--i-pressed: light-dark(#003e82, #0553a6);
|
|
181
|
+
--i-surface: light-dark(color-mix(in srgb, #076bd3 12%, transparent), color-mix(in srgb, #0371e0 20%, transparent));
|
|
182
|
+
--i-line: light-dark(color-mix(in srgb, #076bd3 32%, transparent), color-mix(in srgb, #0371e0 44%, transparent));
|
|
183
|
+
--i-selection: light-dark(color-mix(in srgb, #076bd3 26%, transparent), color-mix(in srgb, #0371e0 30%, transparent));
|
|
184
|
+
--on-i: light-dark(#ffffff, #ffffff);
|
|
185
|
+
/* A button filled with danger (.btn-danger), and its label. Its own
|
|
186
|
+
tokens so the state hue --danger can stay a pale, readable rust in dark
|
|
187
|
+
(messages, pills, field errors) while the button is as deep as the
|
|
188
|
+
primary beside it: as light as a white label allows, stepping darker on
|
|
189
|
+
hover and press (ADR-0015). In light the fills ARE --danger and
|
|
190
|
+
--danger-ink; `npm run check` holds them to those.
|
|
191
|
+
|
|
192
|
+
--danger-fill label 6.10:1 / 4.58:1 on --card 3.91:1 in dark
|
|
193
|
+
--danger-fill-hover label 7.92:1 / 5.65:1
|
|
194
|
+
--danger-fill-pressed label 7.92:1 / 6.96:1 */
|
|
195
|
+
--danger-fill: light-dark(#a4442c, #be563c);
|
|
196
|
+
--danger-fill-hover: light-dark(#8a3722, #ad472e);
|
|
197
|
+
--danger-fill-pressed: light-dark(#8a3722, #9d381e);
|
|
198
|
+
--on-danger: light-dark(#ffffff, #ffffff);
|
|
174
199
|
--i-disabled-bg: var(--n-200);
|
|
175
200
|
--i-disabled-ink: var(--n-400);
|
|
176
201
|
|
|
@@ -244,7 +269,7 @@
|
|
|
244
269
|
--code-highlight: var(--i-surface);
|
|
245
270
|
|
|
246
271
|
/* ── Mark — identity ──────────────────────────────────────────────────
|
|
247
|
-
Inks a GRAPHIC:
|
|
272
|
+
Inks a GRAPHIC: a product's glyph, the A|B monogram, a hero rule. That is
|
|
248
273
|
the entire permitted use.
|
|
249
274
|
|
|
250
275
|
It is NOT a button, chip, badge, wash, border, or link. If you are
|
|
@@ -270,6 +295,12 @@
|
|
|
270
295
|
--mark-teal: light-dark(#0e7c86, #4cc0cb);
|
|
271
296
|
--mark-violet: light-dark(#7148c9, #a990f2);
|
|
272
297
|
--mark-magenta: light-dark(#b1366f, #ea7fb0);
|
|
298
|
+
/* The mark in force here (ADR-0014): the family amber until `data-mark`
|
|
299
|
+
on an ancestor, usually <html>, names a product's. A brand glyph and
|
|
300
|
+
.rule draw in this, so a product's colour follows it from its marketing
|
|
301
|
+
page into its app and onto its error pages. The [data-mark] rules below
|
|
302
|
+
only point it at a token above; they declare no colour of their own. */
|
|
303
|
+
--mark-current: var(--mark);
|
|
273
304
|
|
|
274
305
|
/* ── Legacy aliases ───────────────────────────────────────────────────
|
|
275
306
|
Kept so existing `life` components keep compiling. Do not use in new
|
|
@@ -299,6 +330,45 @@
|
|
|
299
330
|
--mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
|
|
300
331
|
--display: var(--sans);
|
|
301
332
|
|
|
333
|
+
/* Weight, leading and tracking. Sizes are per tier (below); these are
|
|
334
|
+
not. Three weights, and nothing lighter or bolder.
|
|
335
|
+
(--weight-heavy is the one exception: the display treatment, .display
|
|
336
|
+
and .stamp, ADR-0014.) Leading is unitless
|
|
337
|
+
so it scales with the text: display for large headings, title for
|
|
338
|
+
titles, ui for interface text, body for paragraphs. Tracking
|
|
339
|
+
only ever tightens a heading or opens an uppercase mono eyebrow
|
|
340
|
+
(and the .stamp monogram, whose bar closes up otherwise).
|
|
341
|
+
|
|
342
|
+
Named by role, not tight/snug/normal: Tailwind owns those names
|
|
343
|
+
(--leading-tight, --tracking-tight) and an unlayered token here would
|
|
344
|
+
silently change what its utilities do in every consumer. */
|
|
345
|
+
--weight-regular: 400;
|
|
346
|
+
--weight-medium: 500;
|
|
347
|
+
--weight-semibold: 600;
|
|
348
|
+
--weight-heavy: 800;
|
|
349
|
+
--leading-display: 1.15;
|
|
350
|
+
--leading-title: 1.3;
|
|
351
|
+
--leading-ui: 1.4;
|
|
352
|
+
--leading-body: 1.6;
|
|
353
|
+
--tracking-title: -0.01em;
|
|
354
|
+
--tracking-display: -0.025em;
|
|
355
|
+
--tracking-caps: 0.08em;
|
|
356
|
+
|
|
357
|
+
/* ── Stacking ─────────────────────────────────────────────────────────
|
|
358
|
+
Named by what sits above what. Dialogs, popovers and sheets use the
|
|
359
|
+
browser's top layer and need none of these.
|
|
360
|
+
|
|
361
|
+
--z-raised a control above its card's stretched link, a sticky th
|
|
362
|
+
--z-sticky a header content scrolls under
|
|
363
|
+
--z-float a label floating over the page (the rail's tooltip)
|
|
364
|
+
--z-skip the skip link, above the header it skips
|
|
365
|
+
--z-toast toasts, above everything not in the top layer */
|
|
366
|
+
--z-raised: 1;
|
|
367
|
+
--z-sticky: 10;
|
|
368
|
+
--z-float: 20;
|
|
369
|
+
--z-skip: 30;
|
|
370
|
+
--z-toast: 40;
|
|
371
|
+
|
|
302
372
|
/* ── Space ── 4px base. Tiers differ by which steps they reach for. */
|
|
303
373
|
--s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
|
|
304
374
|
--s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
|
|
@@ -311,6 +381,7 @@
|
|
|
311
381
|
differs. So shadows 2 and 3 carry one layer per theme, with the other
|
|
312
382
|
theme's layer transparent — it draws nothing. */
|
|
313
383
|
--radius-sm: 6px;
|
|
384
|
+
--radius-control: 8px; /* buttons, inputs, selects, the segmented control, menu items */
|
|
314
385
|
--radius: 12px;
|
|
315
386
|
--radius-lg: 18px;
|
|
316
387
|
--shadow-1: 0 1px 2px light-dark(rgba(17, 17, 17, 0.04), rgba(0, 0, 0, 0.45));
|
|
@@ -351,6 +422,15 @@
|
|
|
351
422
|
--measure: 780px;
|
|
352
423
|
}
|
|
353
424
|
|
|
425
|
+
/* On a phone the tool tier's smallest step rises from 11px to 12px: fine
|
|
426
|
+
beside a mouse, too small at arm's length. The marketing tier's is
|
|
427
|
+
already 12px. */
|
|
428
|
+
@media (pointer: coarse) {
|
|
429
|
+
:root:not(.tier-marketing) {
|
|
430
|
+
--text-xs: 0.75rem;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
354
434
|
/* ── Marketing tier ─────────────────────────────────────────────────────
|
|
355
435
|
`class="tier-marketing"` on <html> (brignano.io). Unlocks the display
|
|
356
436
|
face and opens the type scale. COLOUR IS IDENTICAL ACROSS TIERS — that
|
|
@@ -369,6 +449,19 @@
|
|
|
369
449
|
--measure: 68ch;
|
|
370
450
|
}
|
|
371
451
|
|
|
452
|
+
/* ── A product's mark, wherever the product is ──────────────────────────
|
|
453
|
+
One attribute per product: <html data-mark="teal">. Works on any element,
|
|
454
|
+
so a page that shows two products can mark each one's section. */
|
|
455
|
+
[data-mark='teal'] {
|
|
456
|
+
--mark-current: var(--mark-teal);
|
|
457
|
+
}
|
|
458
|
+
[data-mark='violet'] {
|
|
459
|
+
--mark-current: var(--mark-violet);
|
|
460
|
+
}
|
|
461
|
+
[data-mark='magenta'] {
|
|
462
|
+
--mark-current: var(--mark-magenta);
|
|
463
|
+
}
|
|
464
|
+
|
|
372
465
|
::selection {
|
|
373
466
|
background: var(--i-selection);
|
|
374
467
|
}
|
|
@@ -379,6 +472,16 @@
|
|
|
379
472
|
accent-color: var(--i);
|
|
380
473
|
}
|
|
381
474
|
|
|
475
|
+
/* Paper is light. Printing a dark page spends ink on the background and
|
|
476
|
+
most browsers drop backgrounds anyway, leaving pale text on white. After
|
|
477
|
+
the [data-theme] rules above so it wins over an in-app dark choice. */
|
|
478
|
+
@media print {
|
|
479
|
+
:root,
|
|
480
|
+
[data-theme] {
|
|
481
|
+
color-scheme: light;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
382
485
|
/* Ships here so no surface can forget it. */
|
|
383
486
|
@media (prefers-reduced-motion: reduce) {
|
|
384
487
|
*,
|
|
@@ -389,4 +492,10 @@
|
|
|
389
492
|
transition-duration: 0.01ms !important;
|
|
390
493
|
scroll-behavior: auto !important;
|
|
391
494
|
}
|
|
495
|
+
/* View transitions live on pseudo-elements the rule above can't reach. */
|
|
496
|
+
::view-transition-group(*),
|
|
497
|
+
::view-transition-old(*),
|
|
498
|
+
::view-transition-new(*) {
|
|
499
|
+
animation: none !important;
|
|
500
|
+
}
|
|
392
501
|
}
|