@filipgutica/design-system 1.0.37 → 1.0.39

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 (43) hide show
  1. package/README.md +9 -8
  2. package/dist/theme-inputs.json +75 -0
  3. package/dist/themes/catppuccin.css +29 -2
  4. package/dist/themes/copper.css +7 -2
  5. package/dist/themes/fern.css +7 -2
  6. package/dist/themes/github.css +27 -0
  7. package/dist/themes/graphite-indigo.css +3 -2
  8. package/dist/themes/iris.css +7 -2
  9. package/dist/themes/lagoon.css +7 -2
  10. package/dist/themes/lapis.css +7 -2
  11. package/dist/tokens.d.ts +2 -1
  12. package/dist/tokens.js +92 -76
  13. package/dist/tokens.json +92 -76
  14. package/fonts/{OFL-IBM-Plex-Sans.txt → OFL-Inter.txt} +1 -1
  15. package/fonts/{OFL-IBM-Plex-Mono.txt → OFL-JetBrains-Mono.txt} +1 -1
  16. package/fonts/fonts.css +13 -13
  17. package/fonts/inter-latin-400-normal.woff2 +0 -0
  18. package/fonts/inter-latin-500-normal.woff2 +0 -0
  19. package/fonts/inter-latin-600-normal.woff2 +0 -0
  20. package/fonts/jetbrains-mono-latin-400-normal.woff2 +0 -0
  21. package/fonts/jetbrains-mono-latin-500-normal.woff2 +0 -0
  22. package/fonts/jetbrains-mono-latin-600-normal.woff2 +0 -0
  23. package/language/DESIGN.md +10 -9
  24. package/language/components.html +49 -28
  25. package/language/components.md +12 -11
  26. package/language/decisions.md +11 -6
  27. package/language/docs.html +7 -10
  28. package/language/product.html +0 -3
  29. package/language/reference.html +42 -22
  30. package/language/tokens.css +151 -13
  31. package/language/ui-sdk.css +2 -2
  32. package/package.json +2 -1
  33. package/theme-mapper/core.js +9 -8
  34. package/theme-mapper/engine.d.ts +37 -2
  35. package/theme-mapper/engine.js +49 -4
  36. package/theme-mapper/index.d.ts +5 -0
  37. package/theme-mapper/index.js +15 -0
  38. package/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
  39. package/fonts/ibm-plex-mono-latin-500-normal.woff2 +0 -0
  40. package/fonts/ibm-plex-mono-latin-600-normal.woff2 +0 -0
  41. package/fonts/ibm-plex-sans-latin-400-normal.woff2 +0 -0
  42. package/fonts/ibm-plex-sans-latin-500-normal.woff2 +0 -0
  43. package/fonts/ibm-plex-sans-latin-600-normal.woff2 +0 -0
@@ -227,7 +227,7 @@
227
227
  .segmented[data-size="sm"] button { padding: 0 var(--space-2); }
228
228
  .segmented[data-size="lg"] { --item: var(--control-lg); font-size: var(--text-lg); }
229
229
  /* Line height 1 comes after the font shorthand, which would reset it: the label then sits centred in the option. */
230
- .segmented button { --depth: none; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: calc(var(--item) - 2 * var(--inset)); padding: 0 var(--space-3); border: 0; border-radius: calc(var(--radius-control) - var(--inset)); background: transparent; color: var(--color-muted); font: inherit; line-height: 1; cursor: pointer; }
230
+ .segmented button { --depth: none; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: calc(var(--item) - 2 * var(--inset)); padding: 0 var(--space-3); border: 0; border-radius: calc(var(--radius-control) - var(--inset)); background: transparent; color: var(--color-muted); font: inherit; line-height: normal; cursor: pointer; }
231
231
  .segmented[data-icon-only] button { width: calc(var(--item) - 2 * var(--inset)); padding: 0; }
232
232
  /* Icon-only: a pill track with round options, concentric with it. A px radius keeps the thumb a pill while it glides. */
233
233
  .segmented[data-icon-only] { border-radius: var(--radius-pill); }
@@ -365,7 +365,7 @@
365
365
  .dialog-foot { justify-content: flex-end; gap: var(--space-2); border-top: 1px solid var(--color-border-subtle); background: var(--color-surface); }
366
366
  /* The close button is a quiet action; this sets its size only. */
367
367
  .close { flex: none; width: var(--control-md); min-height: var(--control-md); padding: 0; color: var(--color-muted); }
368
- .drawer { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(calc(var(--sidebar) + var(--space-12)), 100%); height: 260px; overflow: hidden; padding: 0; border: 1px solid transparent; background: var(--color-surface-raised); color: var(--color-text); box-shadow: var(--shadow-dialog); }
368
+ .drawer { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(calc(var(--sidebar-width) + var(--space-12)), 100%); height: 260px; overflow: hidden; padding: 0; border: 1px solid transparent; background: var(--color-surface-raised); color: var(--color-text); box-shadow: var(--shadow-dialog); }
369
369
  dialog.drawer { position: fixed; inset: 0 auto 0 0; height: 100dvh; max-height: none; margin: 0; }
370
370
  dialog.drawer::backdrop { background: var(--color-overlay); }
371
371
  /* The page behind an open drawer does not scroll, through the slide out too. Hiding the root's overflow keeps the
@@ -636,19 +636,31 @@
636
636
  .code-head .lang { color: var(--color-muted); }
637
637
  /* Copy is a quiet action; this sets its size and place. */
638
638
  .copy { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; min-width: var(--control-md); min-height: var(--control-md); margin-left: auto; padding: 0 0.375rem; color: inherit; }
639
- /* Copy is muted at rest. The code block has its own palette, so on hover and while the tick shows it takes the block's text colour. */
640
- .code .copy { color: var(--color-muted); }
641
- .code .copy[data-copied] { color: var(--color-code-text); }
642
- .code .copy.is-hover:where(:not(:disabled)) { color: var(--color-code-text); }
643
- @media (hover: hover) { .code .copy:hover:where(:not(:disabled)) { color: var(--color-code-text); } }
639
+ /* Copy and Wrap lines are muted at rest. The code block has its own palette, so on hover, while the tick
640
+ shows, and while Wrap lines is on they take the block's text colour. */
641
+ .code :is(.copy, .wrap-toggle) { color: var(--color-muted); }
642
+ .code :is(.copy[data-copied], .wrap-toggle[aria-pressed="true"]) { color: var(--color-code-text); }
643
+ .code :is(.copy, .wrap-toggle).is-hover:where(:not(:disabled)) { color: var(--color-code-text); }
644
+ @media (hover: hover) { .code :is(.copy, .wrap-toggle):hover:where(:not(:disabled)) { color: var(--color-code-text); } }
645
+ /* The block's actions sit together at the end of the header, or in the corner beside the source. */
646
+ .code-actions { display: flex; align-items: center; gap: var(--space-1); margin-left: auto; }
647
+ .code-actions > .copy { margin-left: 0; }
648
+ /* Wrap lines is an icon-only quiet action and a toggle: while on it keeps the open-menu tint. */
649
+ .wrap-toggle { flex: none; width: var(--control-md); min-height: var(--control-md); padding: 0; }
650
+ :where(.wrap-toggle[aria-pressed="true"]) { background: color-mix(in srgb, currentColor 6%, transparent); }
651
+ /* Forced colors: a Highlight border and icon mark it on, at rest and on hover. */
652
+ @media (forced-colors: active) { .code .wrap-toggle[aria-pressed="true"] { border-color: Highlight; } .wrap-toggle[aria-pressed="true"] .icon { color: Highlight; } }
644
653
  /* Inset: the code block clips its content. */
645
654
  .code pre:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
646
- .code .copy.quiet-action:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
655
+ .code :is(.copy, .wrap-toggle).quiet-action:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
647
656
  /* The source is an inset panel. It sits --space-1 inside the frame, so its corners are concentric with the frame's. */
648
657
  .code pre { margin: 0; padding: var(--space-4); overflow: auto; max-height: 32rem; border: 1px solid transparent; border-radius: calc(var(--radius-panel) - var(--space-1)); background: var(--color-code); font-size: var(--text-code); line-height: 1.65; tab-size: 2; }
649
658
  /* Each line is a baseline-aligned row, so a prompt or line number sits on the text's baseline. */
650
659
  .code .line { display: flex; align-items: baseline; min-height: 1.65em; }
651
660
  .code .line > span { white-space: pre; }
661
+ /* With Wrap lines on, each line breaks inside the panel, long words and URLs included, and nothing scrolls
662
+ sideways. The line number stays on the first visual line. */
663
+ .code[data-wrap] .line > span:not(.ln) { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
652
664
  .code .ln { min-width: 2.5em; padding-right: 1em; flex: none; text-align: right; color: var(--color-muted); user-select: none; }
653
665
  .code .k { color: var(--color-syntax-keyword); } .code .s { color: var(--color-syntax-string); } .code .n { color: var(--color-syntax-number); } .code .c { color: var(--color-syntax-comment); }
654
666
  .code .f { color: var(--color-syntax-function); } .code .t { color: var(--color-syntax-type); } .code .v { color: var(--color-syntax-variable); } .code .o { color: var(--color-syntax-operator); } .code .p { color: var(--color-syntax-punctuation); } .code .g { color: var(--color-syntax-tag); } .code .a { color: var(--color-syntax-attribute); }
@@ -667,7 +679,7 @@
667
679
  Copy comes first in DOM order and is placed in the source's top right corner. */
668
680
  .example > .code { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; max-width: none; padding: 0; border-width: 1px 0 0; border-radius: 0; background: var(--color-code); box-shadow: none; }
669
681
  .example > .code > pre { grid-row: 1; grid-column: 1; border: 0; border-radius: 0; }
670
- .example > .code > .copy { grid-row: 1; grid-column: 2; margin: var(--space-1); }
682
+ .example > .code > :is(.copy, .code-actions) { grid-row: 1; grid-column: 2; margin: var(--space-1); }
671
683
 
672
684
  /* ================= Identity: terminal folio ================= */
673
685
 
@@ -755,9 +767,8 @@
755
767
  .site-links a { min-height: var(--control-md); }
756
768
 
757
769
  /* Page type and helpers */
758
- .folio-h2 { font: var(--weight-semibold) var(--text-xl) / var(--leading-tight) var(--font-mono); letter-spacing: var(--tracking-tight); }
759
- .folio-h2::before { content: "## " / ""; color: var(--color-accent); }
760
- .folio-display { font: var(--weight-semibold) var(--text-display) / 1.08 var(--font-mono); letter-spacing: var(--tracking-tight); overflow-wrap: anywhere; }
770
+ .section-title { font: var(--weight-semibold) var(--text-xl) / var(--leading-tight) var(--font-ui); letter-spacing: var(--tracking-tight); }
771
+ .display-title { font: var(--weight-semibold) var(--text-display) / 1.08 var(--font-ui); letter-spacing: var(--tracking-tight); overflow-wrap: anywhere; }
761
772
  .steps { display: grid; gap: var(--space-5); max-width: var(--measure); margin: 0; padding: 0; list-style: none; counter-reset: step; }
762
773
  .steps li { position: relative; display: grid; gap: var(--space-1); padding-left: var(--space-12); counter-increment: step; }
763
774
  .steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: var(--space-8); font: var(--weight-semibold) var(--text-lg) / var(--leading-tight) var(--font-mono); color: var(--color-accent); text-align: right; }
@@ -854,7 +865,7 @@
854
865
  /* ---------- Catalogue page ---------- */
855
866
  /* One scroll offset for every in-page jump; sections set no scroll-margin-top. The location tracker reads the same value. */
856
867
  html { scroll-padding-top: var(--space-4); }
857
- .frame { width: min(calc(var(--page-max) + var(--sidebar)), calc(100% - var(--space-12))); margin-inline: auto; }
868
+ .frame { width: min(calc(var(--page-max) + var(--sidebar-width)), calc(100% - var(--space-12))); margin-inline: auto; }
858
869
  /* Header: the identity, the design system's pages as a navigation strip, and the appearance control.
859
870
  On the site the identity is the project switcher. This package copy has no project registry, so it
860
871
  shows the site name as text, in the switcher's type, with a ~/ mark one character wide before it. */
@@ -868,16 +879,15 @@
868
879
  }
869
880
  /* Header links are navigation rows at the control height; they grow to --control-touch at tablet width. */
870
881
  .page-head .strip a { min-height: var(--control-md); }
871
- .layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); gap: var(--space-8); }
882
+ .layout { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); gap: var(--space-8); }
872
883
  /* One column that may shrink below its content, so a long title or specimen cannot widen the page.
873
884
  A short page, such as one left by a find with no matches, keeps its rows at the top. */
874
885
  main { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: var(--space-12); min-width: 0; padding-block: var(--space-8) var(--space-16); }
875
886
  .intro { display: grid; gap: var(--space-3); }
876
- .intro h1 { font: var(--weight-semibold) var(--text-3xl) / 1.08 var(--font-mono); letter-spacing: var(--tracking-tight); overflow-wrap: anywhere; }
887
+ .intro h1 { font: var(--weight-semibold) var(--text-3xl) / 1.08 var(--font-ui); letter-spacing: var(--tracking-tight); overflow-wrap: anywhere; }
877
888
  .intro p { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-reading); }
878
889
  .layer-head { display: grid; gap: var(--space-2); padding-top: var(--space-6); border-top: 1px solid var(--color-border-subtle); }
879
- :is(.layer-head, .index) > h2 { font: var(--weight-semibold) var(--text-xl) / var(--leading-tight) var(--font-mono); }
880
- :is(.layer-head, .index) > h2::before { content: "## " / ""; color: var(--color-accent); }
890
+ :is(.layer-head, .index) > h2 { font: var(--weight-semibold) var(--text-xl) / var(--leading-tight) var(--font-ui); }
881
891
  .layer-head p { max-width: var(--measure); color: var(--color-muted); }
882
892
  .component { display: grid; gap: var(--space-3); min-width: 0; }
883
893
  .component > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); }
@@ -985,7 +995,8 @@
985
995
  /* Quiet actions in docs components: 32px on desktop, 44px here. */
986
996
  .close { width: var(--control-touch); }
987
997
  .copy { min-width: var(--control-touch); }
988
- .close, .copy, .full, .projects > summary, .page-head .strip a { min-height: var(--control-touch); }
998
+ .wrap-toggle { width: var(--control-touch); }
999
+ .close, .copy, .full, .projects > summary, .page-head .strip a, .wrap-toggle { min-height: var(--control-touch); }
989
1000
  .chip { min-height: var(--control-touch); }
990
1001
  /* Touch: the hover toolbar never shows; a tap opens the thread, whose header holds More. */
991
1002
  .msg-tools { display: none; }
@@ -996,12 +1007,12 @@
996
1007
  .pane-resize { display: none; }
997
1008
  .crumbs a, .group-toggle { min-height: var(--control-touch); }
998
1009
  .intro > .crumbs > ol { margin-block: calc((1lh - var(--control-touch)) / 2) calc((var(--control-touch) - 1lh) / 2); }
999
- .folio-display { font-size: var(--text-display-sm); }
1010
+ .display-title { font-size: var(--text-display-sm); }
1000
1011
  }
1001
- /* On the narrowest phones the strip clips a link. Rows with 6px side padding keep at least 16px of it in
1012
+ /* On the narrowest phones the strip clips a link. Rows with 4px side padding keep at least 16px of it in
1002
1013
  view under the 24px fade, so the clip shows. The strip queries its own width, since only the strip changes. */
1003
1014
  @container pages (max-width: 340px) {
1004
- .page-head .strip a { padding-inline: 0.375rem; }
1015
+ .page-head .strip a { padding-inline: var(--space-1); }
1005
1016
  }
1006
1017
  @media (max-width: 640px) {
1007
1018
  /* Phones: a dialog becomes a bottom sheet with rounded top corners. */
@@ -1032,6 +1043,7 @@
1032
1043
  <symbol id="i-close" viewBox="0 0 16 16"><path d="M4 4l8 8M12 4l-8 8"/></symbol>
1033
1044
  <symbol id="i-plus" viewBox="0 0 16 16"><path d="M8 3.5v9M3.5 8h9"/></symbol>
1034
1045
  <symbol id="i-copy" viewBox="0 0 16 16"><rect x="5.5" y="5.5" width="8" height="8" rx="1.5"/><path d="M10.5 5.5V3.5a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2"/></symbol>
1046
+ <symbol id="i-wrap" viewBox="0 0 16 16"><path d="M2.5 4h11M2.5 8h9a2 2 0 0 1 0 4H8.5M10 10.5 8.5 12l1.5 1.5M2.5 12h3"/></symbol>
1035
1047
  <symbol id="i-chevron-down" viewBox="0 0 16 16"><path d="m4 6 4 4 4-4"/></symbol>
1036
1048
  <symbol id="i-help" viewBox="0 0 16 16"><circle cx="8" cy="8" r="5.5"/><path d="M6.6 6.4a1.5 1.5 0 1 1 2 1.4c-.4.2-.6.5-.6.9M8 10.8v.2"/></symbol>
1037
1049
  <symbol id="i-alert" viewBox="0 0 16 16"><circle cx="8" cy="8" r="5.5"/><path d="M8 5v3.5M8 10.8v.2"/></symbol>
@@ -1773,11 +1785,14 @@ I’ll open a ticket for it.</textarea><button class="btn" type="button" data-si
1773
1785
  <p class="purpose">Source code with an optional header and Copy, and a live example above it.</p>
1774
1786
  <dl class="guidance"><dt>Do</dt><dd>Use a code block for source with no live result. When the reader should see the result too, use the variant with a live example.</dd><dt>Don’t</dt><dd>The same language label on every block of a page. Put useful setup context above the block instead.</dd></dl>
1775
1787
  <div class="row"><h4>Source well</h4><div class="states">
1776
- <div class="state wide"><div class="code"><div class="code-head"><b>monitor.ts</b><span class="lang">TypeScript</span><button class="quiet-action copy" type="button" data-copy="code-src"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg>Copy</button></div><pre tabindex="0" role="region" aria-label="monitor.ts"><code id="code-src"><span class="line"><span class="ln">1</span><span><span class="k">const</span> <span class="v">threshold</span> <span class="o">=</span> <span class="n">300</span> <span class="c">// ms at p95</span></span></span><span class="line"><span class="ln">2</span><span><span class="k">export const</span> <span class="v">name</span> <span class="o">=</span> <span class="s">'API p95 latency'</span></span></span><span class="line"><span class="ln">3</span><span><span class="k">export function</span> <span class="f">breached</span><span class="p">(</span><span class="v">p95</span><span class="p">:</span> <span class="t">number</span><span class="p">)</span> <span class="p">{</span> <span class="k">return</span> <span class="v">p95</span> <span class="o">&gt;</span> <span class="v">threshold</span> <span class="p">}</span></span></span></code></pre></div><span class="caption">Header, line numbers, and Copy, live</span></div>
1788
+ <div class="state wide"><div class="code"><div class="code-head"><b>monitor.ts</b><span class="lang">TypeScript</span><div class="code-actions"><button class="quiet-action wrap-toggle" type="button" data-wrap-toggle aria-pressed="false" aria-label="Wrap lines" title="Wrap lines"><svg class="icon" aria-hidden="true"><use href="#i-wrap"/></svg></button><button class="quiet-action copy" type="button" data-copy="code-src"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg>Copy</button></div></div><pre tabindex="0" role="region" aria-label="monitor.ts"><code id="code-src"><span class="line"><span class="ln">1</span><span><span class="k">const</span> <span class="v">threshold</span> <span class="o">=</span> <span class="n">300</span> <span class="c">// ms at p95</span></span></span><span class="line"><span class="ln">2</span><span><span class="k">export const</span> <span class="v">name</span> <span class="o">=</span> <span class="s">'API p95 latency'</span></span></span><span class="line"><span class="ln">3</span><span><span class="k">export function</span> <span class="f">breached</span><span class="p">(</span><span class="v">p95</span><span class="p">:</span> <span class="t">number</span><span class="p">)</span> <span class="p">{</span> <span class="k">return</span> <span class="v">p95</span> <span class="o">&gt;</span> <span class="v">threshold</span> <span class="p">}</span></span></span></code></pre></div><span class="caption">Header, line numbers, and Copy, live</span></div>
1777
1789
  <div class="state wide" inert><div class="code compact"><pre><code><span class="line"><span>import { threshold } from './monitor'</span></span></code></pre><button class="quiet-action copy is-focus" type="button" aria-label="Copy import"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></div><span class="caption">Compact, with focus visible on Copy</span></div>
1778
1790
  </div></div>
1791
+ <div class="row"><h4>Wrap lines</h4><div class="states">
1792
+ <div class="state wide"><div class="code"><div class="code-head"><b>alert.ts</b><span class="lang">TypeScript</span><div class="code-actions"><button class="quiet-action wrap-toggle" type="button" data-wrap-toggle aria-pressed="false" aria-label="Wrap lines" title="Wrap lines"><svg class="icon" aria-hidden="true"><use href="#i-wrap"/></svg></button><button class="quiet-action copy" type="button" data-copy="code-wrap-src"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg>Copy</button></div></div><pre tabindex="0" role="region" aria-label="alert.ts"><code id="code-wrap-src"><span class="line"><span class="ln">1</span><span><span class="k">export const</span> <span class="v">runbook</span> <span class="o">=</span> <span class="s">'https://docs.example.com/runbooks/api-latency/p95-breach-escalation-and-rollback-steps'</span></span></span><span class="line"><span class="ln">2</span><span><span class="k">export const</span> <span class="v">message</span> <span class="o">=</span> <span class="s">'API p95 latency stayed above the threshold for five minutes, so the on-call engineer is paged'</span></span></span></code></pre></div><span class="caption">Long lines, live: off by default, so they scroll; Wrap lines breaks them inside the panel</span></div>
1793
+ </div></div>
1779
1794
  <div class="row"><h4>With a live example</h4><div class="states">
1780
- <div class="state wide"><figure class="example"><div class="example-stage"><div style="display:flex;gap:var(--space-2);flex-wrap:wrap"><button class="btn secondary" type="button">Cancel</button><button class="btn" type="button">Save monitor</button></div></div><div class="code"><button class="quiet-action copy" type="button" data-copy="example-src" aria-label="Copy code" title="Copy code"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button><pre tabindex="0" role="region" aria-label="Example source"><code id="example-src"><span class="line"><span>&lt;<span class="g">button</span> <span class="a">class</span>=<span class="s">"btn secondary"</span> <span class="a">type</span>=<span class="s">"button"</span>&gt;Cancel&lt;/<span class="g">button</span>&gt;</span></span><span class="line"><span>&lt;<span class="g">button</span> <span class="a">class</span>=<span class="s">"btn"</span> <span class="a">type</span>=<span class="s">"button"</span>&gt;Save monitor&lt;/<span class="g">button</span>&gt;</span></span></code></pre></div></figure><span class="caption">Live: the stage on the page background, the source below one hairline, and Copy in its corner</span></div>
1795
+ <div class="state wide"><figure class="example"><div class="example-stage"><div style="display:flex;gap:var(--space-2);flex-wrap:wrap"><button class="btn secondary" type="button">Cancel</button><button class="btn" type="button">Save monitor</button></div></div><div class="code"><div class="code-actions"><button class="quiet-action wrap-toggle" type="button" data-wrap-toggle aria-pressed="false" aria-label="Wrap lines" title="Wrap lines"><svg class="icon" aria-hidden="true"><use href="#i-wrap"/></svg></button><button class="quiet-action copy" type="button" data-copy="example-src" aria-label="Copy code" title="Copy code"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></div><pre tabindex="0" role="region" aria-label="Example source"><code id="example-src"><span class="line"><span>&lt;<span class="g">button</span> <span class="a">class</span>=<span class="s">"btn secondary"</span> <span class="a">type</span>=<span class="s">"button"</span>&gt;Cancel&lt;/<span class="g">button</span>&gt;</span></span><span class="line"><span>&lt;<span class="g">button</span> <span class="a">class</span>=<span class="s">"btn"</span> <span class="a">type</span>=<span class="s">"button"</span>&gt;Save monitor&lt;/<span class="g">button</span>&gt;</span></span></code></pre></div></figure><span class="caption">Live: the stage on the page background, the source below one hairline, and Copy in its corner</span></div>
1781
1796
  </div></div>
1782
1797
  <p class="sr-only" role="status" id="copy-status"></p>
1783
1798
  </section>
@@ -1793,7 +1808,7 @@ I’ll open a ticket for it.</textarea><button class="btn" type="button" data-si
1793
1808
  <dl class="guidance"><dt>Do</dt><dd>Use it for a shell command the reader runs, one command per line.</dd><dt>Don’t</dt><dd>A <code>$</code> typed into the command. CSS draws the prompt; a typed one is copied with the command.</dd></dl>
1794
1809
  <div class="row"><h4>Commands</h4><div class="states">
1795
1810
  <div class="state wide"><div class="code command compact"><pre tabindex="0" role="region" aria-label="Install command"><code id="cmd-install"><span class="line"><span>brew install filipgutica/tap/filip-stack</span></span></code></pre><button class="quiet-action copy" type="button" data-copy="cmd-install" aria-label="Copy install command"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></div><span class="caption">Compact, live; the <code>$</code> is drawn by CSS</span></div>
1796
- <div class="state wide"><div class="code command"><div class="code-head"><b>Set up</b><button class="quiet-action copy" type="button" data-copy="cmd-setup"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg>Copy</button></div><pre tabindex="0" role="region" aria-label="Set up commands"><code id="cmd-setup"><span class="line"><span>pnpm install --frozen-lockfile</span></span><span class="line"><span>pnpm check</span></span></code></pre></div><span class="caption">With a header, two lines</span></div>
1811
+ <div class="state wide"><div class="code command"><div class="code-head"><b>Set up</b><div class="code-actions"><button class="quiet-action wrap-toggle" type="button" data-wrap-toggle aria-pressed="false" aria-label="Wrap lines" title="Wrap lines"><svg class="icon" aria-hidden="true"><use href="#i-wrap"/></svg></button><button class="quiet-action copy" type="button" data-copy="cmd-setup"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg>Copy</button></div></div><pre tabindex="0" role="region" aria-label="Set up commands"><code id="cmd-setup"><span class="line"><span>pnpm install --frozen-lockfile</span></span><span class="line"><span>pnpm check</span></span></code></pre></div><span class="caption">With a header, two lines</span></div>
1797
1812
  <div class="state wide" inert><div class="code command compact"><pre><code><span class="line"><span>filip-stack apply</span></span></code></pre><button class="quiet-action copy is-focus" type="button" aria-label="Copy apply command"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></div><span class="caption">Focus visible on Copy, in <code>--color-focus</code></span></div>
1798
1813
  </div></div>
1799
1814
  </section>
@@ -1834,11 +1849,11 @@ I’ll open a ticket for it.</textarea><button class="btn" type="button" data-si
1834
1849
 
1835
1850
  <section class="component" id="page-type-and-helpers" data-layer="Identity" aria-labelledby="page-type-title">
1836
1851
  <header><h3 id="page-type-title">Page type and helpers</h3><span class="badge">Identity</span><a href="components.md#page-type-and-helpers">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="page-type-and-helpers" aria-label="Copy link to Page type and helpers" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1837
- <p class="purpose">Mono headings, steps, definitions, facts, and the footer.</p>
1838
- <dl class="guidance"><dt>Do</dt><dd>Use steps for a sequence the reader follows in order, definitions for terms with short meanings, and facts for short labels and values.</dd><dt>Don’t</dt><dd>The <code>##</code> mark on an application screen, or on h3 and lower.</dd></dl>
1852
+ <p class="purpose">Headings, steps, definitions, facts, and the footer.</p>
1853
+ <dl class="guidance"><dt>Do</dt><dd>Use steps for a sequence the reader follows in order, definitions for terms with short meanings, and facts for short labels and values.</dd><dt>Don’t</dt><dd>Mono, or a mark such as <code>##</code>, on a heading.</dd></dl>
1839
1854
  <div class="row"><h4>Headings</h4><div class="states">
1840
- <div class="state wide"><p class="folio-display">~/annoterm</p><span class="caption">Display title, mono</span></div>
1841
- <div class="state wide"><p class="folio-h2">Install</p><span class="caption">Section heading with its <code>##</code> mark</span></div>
1855
+ <div class="state wide"><p class="display-title">Annotate the terminal</p><span class="caption">Display title</span></div>
1856
+ <div class="state wide"><p class="section-title">Install</p><span class="caption">Section heading</span></div>
1842
1857
  </div></div>
1843
1858
  <div class="row"><h4>Steps</h4><div class="states">
1844
1859
  <div class="state wide"><ol class="steps"><li><h4>Install the CLI</h4><p>Homebrew installs the launcher.</p></li><li><h4>Apply host config</h4><p>It copies the guidance and the design system.</p></li></ol><span class="caption">Rest: two steps</span></div>
@@ -2109,6 +2124,12 @@ I’ll open a ticket for it.</textarea><button class="btn" type="button" data-si
2109
2124
  button.dataset.copied = '';
2110
2125
  ticks.set(button, setTimeout(restore, 1500));
2111
2126
  };
2127
+ // Wrap lines: a toggle on each multi-line code block. It keeps its name; aria-pressed carries the state.
2128
+ document.querySelectorAll('[data-wrap-toggle]').forEach((button) => button.addEventListener('click', () => {
2129
+ const on = button.getAttribute('aria-pressed') !== 'true';
2130
+ button.setAttribute('aria-pressed', String(on));
2131
+ button.closest('.code').toggleAttribute('data-wrap', on);
2132
+ }));
2112
2133
  document.querySelectorAll('[data-copy]').forEach((button) => button.addEventListener('click', async () => {
2113
2134
  const text = copyText(document.getElementById(button.dataset.copy));
2114
2135
  let ok = true;
@@ -9,9 +9,9 @@ Each section has these parts: anatomy, states, then Do and Don't, keyboard and s
9
9
  | Layer | What it holds | A new project |
10
10
  | --- | --- | --- |
11
11
  | Core | Tokens, depth, controls and their states, focus, motion, accessibility, forced colors | Adopts it as is |
12
- | Identity | The terminal folio look: the `~/name` header, the project registry, mono display headings, `##` section marks, terminal plates, captures, and the mono section rail | Replaces it with its own |
12
+ | Identity | The terminal folio look: the `~/name` header, the project registry, terminal plates, captures, and the section rail | Replaces it with its own |
13
13
 
14
- The identity layer reads only the identity tokens (`--color-project`, `--color-project-dark`, `--font-ui`, `--font-mono`) and the terminal tokens. A core component never depends on an identity component.
14
+ The identity layer reads only the identity tokens (`--color-project`, `--color-project-dark`, `--font-ui`, `--font-mono`, `--radius-base`) and the terminal tokens. A core component never depends on an identity component.
15
15
 
16
16
  ## Groups
17
17
 
@@ -326,7 +326,7 @@ Layer: Core.
326
326
 
327
327
  Layer: Core.
328
328
 
329
- - **Anatomy.** A dialog fixed to the edge its trigger sits on, full height, `min(--sidebar + 48px, 100vw - 48px)` wide, with a header (title and close button) and a body that scrolls on its own. It is a floating layer with square corners: `--color-surface-raised`, a transparent 1px border, and `--shadow-dialog`. The close button is a [quiet action](#quiet-action). The family's navigation triggers sit at the start, so navigation drawers open from the left.
329
+ - **Anatomy.** A dialog fixed to the edge its trigger sits on, full height, `min(--sidebar-width + 48px, 100vw - 48px)` wide, with a header (title and close button) and a body that scrolls on its own. It is a floating layer with square corners: `--color-surface-raised`, a transparent 1px border, and `--shadow-dialog`. The close button is a [quiet action](#quiet-action). The family's navigation triggers sit at the start, so navigation drawers open from the left.
330
330
  - **Navigation drawer.** A drawer that holds navigation opens on the current row, scrolled to the centre of the body. A keyboard open moves focus to that row; a tap moves focus to the body, so no ring shows and no on-screen keyboard opens. An open with the `/` shortcut moves focus to the [find field](#find-field), which stays pinned at the top of the body while the list scrolls under it.
331
331
  - **States.** Closed, open, and closing: `data-closing` keeps it open while it slides out.
332
332
  - **Do.** Use a drawer for navigation or supporting detail that slides in from the side its trigger sits on, such as phone navigation, and open it from a named button.
@@ -537,16 +537,17 @@ Layer: Core.
537
537
 
538
538
  - **Anatomy.** A frame that holds an optional header and the source panel.
539
539
  - **Frame.** `--color-surface-raised`, a 1px `--color-border-subtle` border, `--radius-panel`, and `--shadow-surface`. Its padding is `0 var(--space-1) var(--space-1)` under a header, and `var(--space-1)` on every side without one.
540
- - **Header.** At least 40px and `--text-xs`, on the frame with no fill and no rule below. It holds the title in semibold, the language in muted text, and a Copy button.
540
+ - **Header.** At least 40px and `--text-xs`, on the frame with no fill and no rule below. It holds the title in semibold, the language in muted text, and, at the end, Wrap lines then Copy, 4px (`--space-1`) apart.
541
541
  - **Source panel.** The `<pre>`: `--color-code`, a transparent 1px border, and `calc(var(--radius-panel) - var(--space-1))` corners (8px), so its curve is concentric with the frame's. It has `--space-4` padding, scrolls in both directions, is at most 32rem tall, and sets `--font-mono` at `--text-code` with a line height of 1.65. Line numbers are muted and right-aligned. Syntax uses the `--color-syntax-*` tokens.
542
542
  - **Compact.** The panel and the Copy button share one row, with no header, and a `--space-1` column gap. The panel fills the row's height, so it sits `--space-1` from the frame and from Copy on every side, and centres its line. Copy centres on the row.
543
+ - **Wrap lines.** Every block with a header, and every live example's source, has a Wrap lines toggle before Copy: an icon-only [quiet action](#quiet-action) (`#i-wrap`), 32×32 (`--control-md`) and 44×44 at tablet width, named "Wrap lines", with `aria-pressed` for its state; the name and title never change. It is off by default, so lines keep their shape and the panel scrolls sideways. On, the block takes `data-wrap`: each line's text breaks inside the panel (`white-space: pre-wrap`, `overflow-wrap: anywhere`, so long words and URLs break too), the line number stays on the first visual line, and Copy still copies the original lines. While on it takes `--color-code-text` and the quiet action's 6% open-menu tint; in forced colors a `Highlight` border and icon mark it, at rest and on hover. A compact block holds one line and has no toggle. The state is per block and is not saved.
543
544
  - **Phone text.** Set `text-size-adjust: 100%` (and `-webkit-text-size-adjust`) on the block, and align each line's items to the baseline, so iOS Safari does not enlarge one line.
544
545
  - **Copy.** Copies the code text only: no line numbers or prompts, and one line per row joined with newlines. A [quiet action](#quiet-action) at least 32×32 (`--control-md`), and 44×44 at tablet width, with an accessible name. It is `--color-muted` at rest (7.09:1 on the frame in light, 6.63:1 in dark), and `--color-code-text` on hover and while the tick shows, which the script marks with `data-copied`. Announce the result in a polite live region; in the compact variant the success message is visually hidden.
545
546
  - **Copy feedback.** This applies to every copy action: the code block's Copy, a token's Copy, and Copy link. On success, the icon turns into a plain tick (`#i-tick`) for 1.5s and then turns back. A second click within the 1.5s restarts the wait. The visible label, such as Copy, and the accessible name do not change, and no "Copied" text appears. The polite live region announces "Copied." or the failure. On failure, the icon does not change and the failure shows as before: a token's Copy shows "Copy failed" in place of its icon. Under reduced motion nothing changes, because the swap has no animation.
546
- - **States.** Rest, and focus-visible on Copy and on the `<pre>` when it scrolls. Copy takes the quiet action states, shows the tick after a copy, and announces "Copied." or a failure.
547
+ - **States.** Rest, Wrap lines on, and focus-visible on Copy, on Wrap lines, and on the `<pre>` when it scrolls. Copy takes the quiet action states, shows the tick after a copy, and announces "Copied." or a failure.
547
548
  - **Do.** Use a code block for source with no live result. When the reader should see the result too, use the variant with a live example.
548
549
  - **Don't.** The same language label on every block of a page. Put useful setup context above the block instead.
549
- - **Keyboard and screen reader.** The `<pre>` is focusable when it scrolls. Its focus ring and the Copy button's ring are inset, because the block clips its content. The `<pre>` ring follows the panel's 8px corners.
550
+ - **Keyboard and screen reader.** The `<pre>` is focusable when it scrolls. With a header, Tab order is Wrap lines, then Copy, then the `<pre>`; a compact block puts the `<pre>` before Copy. The focus rings on Wrap lines, Copy, and the `<pre>` are inset, because the block clips its content. The `<pre>` ring follows the panel's 8px corners.
550
551
  - **Motion.** None: the block is static, and Copy changes as a quiet action does.
551
552
  - **Forced colors.** The shadow drops, and the frame's border and the panel's transparent border draw as system edges. Syntax colours take the system text colour, so code reads as plain text.
552
553
 
@@ -556,9 +557,9 @@ Layer: Core.
556
557
  - **Tokens.** Frame edge `--color-border-subtle` and corners `--radius-panel`. Stage `--color-bg`. Hairline `--color-border-subtle`.
557
558
  - **Stage.** The stage sits on the page background, not in a well or a panel. This is a named exception to the container [depth](DESIGN.md#depth) tier: a preview shows each component on the surface it sits on in a page; see [decisions](decisions.md).
558
559
  - **Source.** Inside the frame the code block has no radius, border, padding, or shadow of its own, and it spans the frame's full width, not `--measure`. It takes `--color-code`, and its panel is flush with no corners, so the source fills the frame below the hairline.
559
- - **Copy.** Icon-only and named "Copy code", in the source's top right corner. It comes before the `<pre>` in DOM order, so the reader reaches it before the code.
560
+ - **Copy.** Icon-only and named "Copy code", in the source's top right corner, after Wrap lines. It comes before the `<pre>` in DOM order, so the reader reaches it before the code.
560
561
  - **States.** The frame has no states. Components on the stage show their own states.
561
- - **Keyboard and screen reader.** Tab order is the stage's controls, then Copy, then the `<pre>`. Name the `<pre>` for its role, for example "Example source", when it scrolls. Focus rings on Copy and the `<pre>` are inset, because the frame clips its content.
562
+ - **Keyboard and screen reader.** Tab order is the stage's controls, then Wrap lines, then Copy, then the `<pre>`. Name the `<pre>` for its role, for example "Example source", when it scrolls. Focus rings on Wrap lines, Copy, and the `<pre>` are inset, because the frame clips its content.
562
563
  - **Motion.** None of its own.
563
564
  - **Responsive.** The frame takes its container's width. The stage stays above the source at every width. On phones the stage padding is `--space-6` by `--space-4`. Wide content scrolls inside the stage or the `<pre>`, never the page.
564
565
  - **Forced colors.** The frame edge and the hairline draw in the system colour.
@@ -610,7 +611,7 @@ Layer: Identity.
610
611
  Layer: Identity.
611
612
 
612
613
  - **Anatomy.** Type and layout helpers for identity pages: headings, steps, definitions, facts, a command list, and the footer, each below.
613
- - **Headings.** Documentation, CLI tool, article, and product page titles (`--text-3xl`) use `--font-mono`; application titles use `--font-ui` at `--text-2xl` or smaller. On documentation, CLI tool, article, and product pages, a page-level section heading (h2) uses `--font-mono` at `--text-xl` (a product page may set it larger, up to `--text-3xl`), starts with a `## ` mark in `--color-accent`, drawn with `content: "## " / ""`, and has a `--color-border-subtle` rule above the section. Application and inline-visualization section headings use `--font-ui`, semibold, at `--text-xl` or smaller, with no mark and no rule; h3 and lower never take the mark. A product page or tool home may use a mono `--text-display` title (`--text-display-sm` on phones).
614
+ - **Headings.** Every page title and section heading uses `--font-ui`, semibold, with no mark before it. Documentation, CLI tool, article, and product page titles use `--text-3xl`; application titles use `--text-2xl` or smaller. On documentation, CLI tool, article, and product pages, a page-level section heading (h2) uses `--text-xl` (a product page may set it larger, up to `--text-3xl`) and has a `--color-border-subtle` rule above the section. Application and inline-visualization section headings use `--text-xl` or smaller, with no rule. A product page or tool home may use a `--text-display` title (`--text-display-sm` on phones).
614
615
  - **Steps.** An ordered list in which each step hangs from a mono number in `--color-accent` on a ruled leading column, with an h3 title per step.
615
616
  - **Definitions.** A definition list of terms and short meanings: medium-weight terms and muted meanings in two columns, one column on phones. Flags such as `--all` do not break.
616
617
  - **Facts.** A mono definition list of short labels and values, such as a repository path. Values wrap anywhere.
@@ -618,7 +619,7 @@ Layer: Identity.
618
619
  - **Footer.** Mono, with an attribution link at the start and project links at the end.
619
620
  - **States.** None: the helpers are static type. The command list's Copy takes the quiet action states.
620
621
  - **Do.** Use steps for a sequence the reader follows in order, definitions for terms with short meanings, and facts for short labels and values.
621
- - **Don't.** The `##` mark on an application screen, or on h3 and lower.
622
- - **Keyboard and screen reader.** Headings keep their outline levels, and the `## ` mark has empty alternative text, so it is not read. Steps are an ordered list; definitions and facts are definition lists.
622
+ - **Don't.** Mono, or a mark such as `##`, on a heading.
623
+ - **Keyboard and screen reader.** Headings keep their outline levels. Steps are an ordered list; definitions and facts are definition lists.
623
624
  - **Motion.** None: the helpers are static.
624
625
  - **Forced colors.** No change: text, rules, and marks take the system colours.
@@ -19,8 +19,8 @@ Each entry records a choice this language made, the options it rejected, and why
19
19
  | Faint uncertainty | Core | In a chart, every point, line, and label stays at full strength; the intervals of the points that are not selected fade to about 20% opacity, and the selected point keeps strong intervals and an accent ring. Matrix cells show a value and an icon, with the verdict word only on cells with a clear result and the full words in every accessible name, and one key line under the chart. Taken from the PluginBench Results scatter and overview grid. | Strong intervals on every point: with three efforts and two packages, six pairs of intervals crossed and hid the selected one. Fading whole points: the data the reader compares would drop below non-text contrast. Hiding unselected intervals: it removes the uncertainty a reader needs to judge any point. A verdict word and a border on every cell: six boxes and six repeated words where only the clear results needed a word. | No test yet |
20
20
  | Deliberate generated-page signs | Core | Two choices match the Signs of a templated interface in `interface-design`'s craft rules, and they stay. The one meta line joined with " · " comes from [Minimal by default](DESIGN.md#minimal-by-default): one muted line replaces a row of labelled fields or badges. The default theme's graphite neutrals, its tinted near-black text and dark background included, come from [Character](DESIGN.md#character), which asks for neutral paper and graphite backgrounds. The text belongs to the same neutral set, which a theme replaces as a whole (see Themes), so the exemption covers every theme that keeps the default neutrals, and not Catppuccin or GitHub. A review treats both as deliberate. | Dropping them because Anthropic's [frontend-design](https://github.com/anthropics/skills/tree/main/skills/frontend-design) skill lists them as signs: that skill lets a direction its brief pins down win, and this language is that brief. | No direct test. The `interface-design` scenario `deliberate-sign-not-finding` in filip-stack covers the general rule that a recorded deliberate use is not a finding. |
21
21
  | Identity from the subject | Core | A project chooses its identity inputs once, from its subject: the materials, vernacular, and audience of its world. When the subject is unclear, the agent proposes one and the owner confirms it. An identity the owner set for a family of projects, such as the folio, stays as it is, and personal work keeps the shared type family and neutrals ([Scope and precedence](DESIGN.md#scope-and-precedence)), so its subject sets only the hue and the identity marks. Within those limits, the choice is checked against what any similar project would get, and any part picked whatever the subject is revised. Adapted from Anthropic's [frontend-design](https://github.com/anthropics/skills/tree/main/skills/frontend-design) skill. | A palette, typefaces, and layout for each page or brief, as frontend-design directs: pages of one project would stop reading as one product, and the core already carries hierarchy and states. A generated default palette chosen because it looks current rather than because the subject calls for it: it appears whatever the subject. | No test yet |
22
- | Folio signs | Identity | The terminal folio takes its `~/`, `##`, and `$` marks, its mono face, and its near-black capture plate (`--color-terminal`) from the terminal and Markdown tools its sites present, so its mono metadata, mono captions, and that plate are deliberate, not Signs of a templated interface. A project that replaces the identity does not inherit them. | Flagging them as signs to remove: the folio's [Mono identity](DESIGN.md#identity-layer-terminal-folio) rule assigns mono to metadata and captions because its sites present terminal tools. | `interface-design` scenarios in filip-stack: `deliberate-sign-not-finding`, modelled on the folio's mono captions, and `replaced-identity-mono` for a project that replaced the identity |
23
- | Section mark | Identity | The `##` mark goes only on the page-level section headings (h2) of documentation, CLI tool, article, and product pages, which are mono with a `--color-border-subtle` rule above. Application and inline-visualization section headings are plain `--font-ui` semibold at `--text-xl` or smaller, with no mark and no rule. h3 and lower never take it. | The mark on every section heading: on a dense screen, such as a metrics dashboard with six sections, it repeated down the page and competed with the data. The mark on h2 and h3: deeper levels repeat more often. A per-page opt-out class: every application page would need to remember it. Dropping the mark: reading pages lose the folio identity that ties them to the `~/name` header. Mono application section headings without the mark: the mono face alone still reads as a document heading among compact sans rows. | No test yet |
22
+ | Folio signs | Identity | The terminal folio takes its `~/` and `$` marks, its mono face, and its near-black capture plate (`--color-terminal`) from the terminal and Markdown tools its sites present, so its mono metadata, mono captions, and that plate are deliberate, not Signs of a templated interface. A project that replaces the identity does not inherit them. Since 2026-11-24 the folio has no `##` mark and no mono headings (see Headings). | Flagging them as signs to remove: the folio's [Mono identity](DESIGN.md#identity-layer-terminal-folio) rule assigns mono to metadata and captions because its sites present terminal tools. | `interface-design` scenarios in filip-stack: `deliberate-sign-not-finding`, modelled on the folio's mono captions, and `replaced-identity-mono` for a project that replaced the identity |
23
+ | Headings | Identity | Owner decision, 2026-11-24: every page title and section heading is `--font-ui`, semibold, with no mark before it. Page-level section headings (h2) of documentation, CLI tool, article, and product pages keep a `--color-border-subtle` rule above. Mono stays for code, identifiers, keys, and terminal captures, and for the folio's small marks (the `~/name` header, metadata facts, step numbers, and the footer). This replaces the section mark rule, under which those h2s and page titles were mono and the h2s started with a `##` mark in `--color-accent`. | Mono titles and section headings with the `##` mark on reading pages, the rule before: the owner dropped the terminal folio's typography from the default look, so a heading reads as a heading in every theme. Rejected under that earlier rule: the mark on every section heading: on a dense screen, such as a metrics dashboard with six sections, it repeated down the page and competed with the data. The mark on h2 and h3: deeper levels repeat more often. A per-page opt-out class: every application page would need to remember it. Dropping the mark: reading pages lose the folio identity that ties them to the `~/name` header. Mono application section headings without the mark: the mono face alone still reads as a document heading among compact sans rows. | `tests/design-foundations.test.mjs` "no page or site page sets an h1 to h6 or title rule in mono, or draws a ## mark" |
24
24
  | Command plate | Identity | Owner decision, 2026-11-15: a shell command uses the normal code block and its source well in light and dark, with a CSS-drawn `$ ` prompt in `--color-accent`. Header, Copy, compact layout, and focus follow the code block. Keep `--color-command-bg` and `--color-command-border` as compatibility aliases for `--color-code` and `--color-border-subtle`. Terminal captures stay unchanged. | A: the dark, hue-tinted plate in both modes. On a light page it was the darkest element and looked mismatched beside light source blocks; the owner noticed it on every site. B: a pale hue-tinted plate in light mode. It followed the mode but added a second tinted surface and still differed from source code; the owner preferred one consistent code surface (option C). | `tests/catalogue/catalogue.spec.ts`: "contrast: shell command text on the code well reaches 4.5:1", "contrast: the accent shell prompt on the code well reaches 3:1"; compatibility aliases and DS-1 exceptions: `tests/token-values.test.mjs`; shared code recipes: `tests/design-foundations.test.mjs`; imported-theme failures: `tests/theme-mapper.test.mjs` |
25
25
  | Terminal colours | Identity | Owner decision, 2026-11-14: the 16 ANSI colours that terminal captures use are design-system tokens, `--color-terminal-ansi-0` to `-15`, plus `--color-terminal-ansi-4-bg` for a blue background that terminal text reads on. They keep the values `@filipgutica/ui` drew before, so no capture changes. Colours 1 to 15 reach 4.5:1 on `--color-terminal`; black (colour 0) is a background only, and dim text reads colour 8. | Literal defaults in `@filipgutica/ui`: colour data outside the design system, which breaks the rule that the design system owns colours and component libraries only apply them. One token per colour role, such as a success green: terminal programs choose the slot, so the palette must name slots. | contrast: the core `ansi` check in `theme-mapper/engine.js`, which `tests/site/site.spec.ts` "Themes: every contrast check passes" runs for every theme; parity with the 1.x token set: `tests/token-values.test.mjs` |
26
26
  | Navigation current row | Core | A quiet lifted fill (`--color-nav-current`, `--shadow-nav-current`) with the row corner (`--radius-inline`, 8px since radius scale B; 6px before) and accent text. In-page location is a 3×14 accent pip with no fill in strips and contents lists; a section rail's current section takes the current-page fill instead (see Rail current section). In forced colors the current page and a rail's current section take a `Highlight` edge, and the pip redraws in `Highlight`. | A raised pill looked odd. The old 2px inset bar curved away on rounded rows and disappeared in the dark drawer. | accent text contrast: `tests/design-foundations.test.mjs` "accent text on the selected fill reaches 4.5:1 on every surface in both themes"; row corners: `tests/catalogue/catalogue.spec.ts` "each component renders the corner radius of its role, and no other part has one"; pip and forced colors: no test yet |
@@ -31,7 +31,7 @@ Each entry records a choice this language made, the options it rejected, and why
31
31
  | Phone drawer trigger | Core | A page-level contents drawer opens from a soft secondary button with a three-line menu glyph and a label. The no-JavaScript fallback keeps a chevron, because it opens in place. The site shell uses the same trigger below its header (see Phone header). | A down chevron promised a dropdown, but the trigger opens a side drawer. | No test yet |
32
32
  | Shape follows role | Core | One corner for each height of thing, after Astryx's radius scale (`meta/astryx@7032abf`, `theme/tokens.stylex.ts`: inner 4, element 8, container 12). Rows, actions, and fields are all 8px: places and picked rows (`--radius-inline`), controls that act or set a value in place with every option shown on one line (`--radius-control`: buttons, quiet actions, chips, and segmented controls), and typed fields, controls whose label wraps, and one-line controls that are not actions (`--radius-field`). A field's `--color-field-edge` border, not its shape, tells it from an action, whose border is transparent. Containers are 12px (`--radius-panel`); rows 4px inside one, such as menu rows, take 12 − 4 = 8px, the row corner. Small marks inside text or a row (checkboxes, keyboard keys, and mentions) are 4px (`--radius-mark`). Small state marks are pills (`--radius-pill`). A pill never holds text that can wrap, and nested rectangles are concentric. The owner chose this scale (option B) on 2026-11-22 from rendered comparisons on the board, after finding the board busy and its mixed corners clashing. The token names predate the rule: they say inline, control, and field, where the uses are rows, actions, and typed fields. The names stay, because a rename breaks every page that uses them. | The previous scale (6px rows, 10px actions and fields, 16px containers, 6px checkboxes and keys; option A): a 6px tab beside a 10px button and field clashed on the board, and 16px containers needed a 12px corner for rows inside them. The same structure at 10px and 14px (option C): on 28px controls and 24px chips, 10px reads as nearly a pill, the action shape the owner rejected; chips would have needed 28px or a 4px corner. Pill actions (`--radius-control` at 999px), the shape until 2026-11-22: the owner found pill buttons ugly. One radius for every role: small state marks lose the pill that sets them apart, and rows and containers lose the corners that tell a place from a holder. A list of components for each token with no reason: a new component had no rule to pick from. | rendered corners by role: `tests/catalogue/catalogue.spec.ts` "each component renders the corner radius of its role, and no other part has one", "the DESIGN.md shape table names each role token with its value"; slider track and thumb, and select picker: `tests/design-foundations.test.mjs` "the slider track, slider thumb, and select picker take their role’s corners"; no literal radius: `tests/design-foundations.test.mjs` "no page or the report stylesheet writes a literal corner radius" |
33
33
  | Shape follows content | Core | Text gets the 8px corner; a lone icon that acts on its own fill gets a circle. An icon-only button (`data-icon-only`: primary, secondary, or danger) is a square box at every size with `--radius-circle` (999px), the composer's send button included. A see-through lone icon is a quiet action, an 8px tile. An icon-only segmented control has a `--radius-pill` track and round options (`calc(var(--radius-pill) - var(--inset))`), as the theme picker had before 2026-11-22, at today's heights. Text segmented controls keep the 8px track. Astryx has no circle: this departs from its one 8px element corner for lone icon actions and the icon-only segmented control. The owner chose this on 2026-11-24 after comparing T3 Code's composer and sidebar footer, where quiet icons are rounded squares and the one filled or edged action is round; a council (Sol 6.2, Opus 5.5, Gemini 4 Neon, with Fable 5.2 ruling) settled the ghost and radius details. | Every icon-only button round, ghost included: a ghost icon and a quiet action look the same at rest and would hover in different shapes. Ghost icon buttons as 8px tiles on `.btn`: two recipes for one look, with different hover fills and press. `50%`, as a literal or a token: an ellipse while the segmented thumb glides, and exempt from the corner guard. Reusing `--radius-pill` for icon buttons: it puts an action back on the state-mark token the owner moved actions off on 2026-11-22. An outlined Update button: the system has no outlined variant; Update is a secondary circle. Pill buttons with text stay rejected (Shape follows role). | round and square: `tests/catalogue/catalogue.spec.ts` "each component renders the corner radius of its role, and no other part has one", "renders control sizes" (an icon-only button and an icon-only option render width equal to height at 1280, 800, and 375px); markup: "marks every icon-only button, and none is ghost or text" |
34
- | Themes | Core | A theme sets only its inputs: a hue for light and for dark, and optionally its two fonts, its neutrals (page, surfaces, hover, edges, and text, as a whole set for both modes), and, for a theme imported at runtime through the mapper, any of its 11 syntax colours (`--color-syntax-*`); theme files do not take syntax colours. Shape, spacing, states, and status colours stay core, so actions keep their 8px corner in every theme. Neutrals are an input so an open palette keeps its own surfaces: Catppuccin and GitHub's Primer ship as themes, each mapped by its palette's own roles and unaltered. Where a hue cannot carry the text on a selected fill at 4.5:1, the build takes the first of the theme's text colour, black, and white that can, as the token roles say. Every theme passes the contrast guards in both modes. Theme files use the W3C Design Tokens format (2025.10) and ship beside the CSS, so design-token tools can read and write them: one file per theme, with a `light` and a `dark` group of sRGB colour tokens. Tools read the two groups as separate tokens (`light.color-bg`, `dark.color-bg`), not as one token with two modes; the Design Tokens Resolver module expresses modes, and it can replace the groups once tools support it. Graphite Indigo is the default. The family sites' own hues ship as themes named for their colour, so a site can load its theme file in place of an inline hue pair: Lagoon (annoterm), Copper (devps), Iris (filip-stack), Lapis (Workbench), and Fern (wtree). Each theme's note names its site. Where a site's light hue falls just short of 4.5:1 as selected-row text, its theme takes the smallest OKLCH lightness step that passes and keeps the hue and chroma, so the selection keeps the hue; the site can adopt the theme's value. A third-party palette is never altered. The theme mapper (`./theme-mapper`, experimental) turns a VS Code colour theme into these inputs for its one mode by selection: each input takes the first of its keys whose colour passes that input's contrast gate, and no colour is changed. What still fails is reported, as a `theme` problem in the theme's colours or a `core` problem in a core link, status, or syntax colour on its fills. Command text and prompts follow the theme’s code text and accent, so their failures belong to the theme’s text and focus checks. The checks are data: every ink on every fill the catalogue draws, hover and pressed states included, so a state axe never renders is still measured. The mapper keeps an imported theme's syntax colours too, from its `tokenColors`: each role takes the rule nearest its scope family. A role the theme leaves out takes its core colour; keyword, string, number, and comment have core colours, and the other 7 follow one of them or the code text. The owner chose this on 2026-11-14 to support open themes as their authors made them: the person who installs a theme owns its contrast, so a failing syntax colour is reported as a `theme` problem, never blocked or replaced. Most imports report one: comments in 5 of 8 popular themes measure 2.4–3.7:1 on their own background. The checks stay at 4.5:1, the WCAG AA minimum for text of this size; 3:1 would clear only 2 of those 5. The build and the mapper share one engine for applying a theme, resolving it, and checking it. | The action shape as a theme input (a pill or another corner): a pill brings back the action shape the owner rejected (see Shape follows role), and a corner of its own breaks the one-corner-per-height scale. Radix Themes and shadcn scale every corner together, and Primer, Carbon, Polaris, and Spectrum keep shape core; revisit it as a whole radius scale when a theme needs one. Linear and OpenAI themes: neither publishes an open palette, and their colours are brand identity. Pine and Mauve, the earlier invented themes: no product used them, and they read as unrelated to the family's sites. A grey-blue quiet theme (Slate): it sat beside the muted text and the info blue, so its selection read as metadata and its primary button looked disabled. Adjusting an imported colour until it passes: the result is no longer the theme, and nothing tells the reader it changed. Syntax colours kept core for imports: an import lost its author's code colours to stay clear of reports. A looser bar for syntax, such as 3:1: it is below AA for code text, and it clears few imports. | Per-theme contrast guards (`tests/design-foundations.test.mjs`), the catalogue's rendered recipes in every theme, the Themes page tests, and the theme mapper's tests (`tests/theme-mapper.test.mjs`, the React smoke test with the mode locked opposite the system's, and the catalogue test that every axe contrast failure is a reported problem) |
34
+ | Themes | Core | A theme sets only its inputs: a hue for light and for dark, and optionally its two fonts, its base radius (`--radius-base`), its neutrals (page, surfaces, hover, edges, and text, as a whole set for both modes), and, for a theme imported at runtime through the mapper, any of its 11 syntax colours (`--color-syntax-*`); theme files do not take syntax colours. Spacing, states, and status colours stay core. The base radius scales every corner but the pill and the circle together, as Radix Themes and shadcn do: rows, actions, and fields take it, small marks half of it, and containers one and a half times it (owner decision, 2026-11-24), so actions keep the field and row corner in every theme. Neutrals are an input so an open palette keeps its own surfaces: Catppuccin and GitHub's Primer ship as themes, each mapped by its palette's own roles and unaltered. Where a hue cannot carry the text on a selected fill at 4.5:1, the build takes the first of the theme's text colour, black, and white that can, as the token roles say. Every theme passes the contrast guards in both modes. Theme files use the W3C Design Tokens format (2025.10) and ship beside the CSS, so design-token tools can read and write them: one file per theme, with a `light` and a `dark` group of sRGB colour tokens. Tools read the two groups as separate tokens (`light.color-bg`, `dark.color-bg`), not as one token with two modes; the Design Tokens Resolver module expresses modes, and it can replace the groups once tools support it. Graphite Indigo is the default. The family sites' own hues ship as themes named for their colour, so a site can load its theme file in place of an inline hue pair: Lagoon (annoterm), Copper (devps), Iris (filip-stack), Lapis (Workbench), and Fern (wtree). Each theme's note names its site. Where a site's light hue falls just short of 4.5:1 as selected-row text, its theme takes the smallest OKLCH lightness step that passes and keeps the hue and chroma, so the selection keeps the hue; the site can adopt the theme's value. A third-party palette is never altered. The theme mapper (`./theme-mapper`, experimental) turns a VS Code colour theme into these inputs for its one mode by selection: each input takes the first of its keys whose colour passes that input's contrast gate, and no colour is changed. What still fails is reported, as a `theme` problem in the theme's colours or a `core` problem in a core link, status, or syntax colour on its fills. Command text and prompts follow the theme’s code text and accent, so their failures belong to the theme’s text and focus checks. The checks are data: every ink on every fill the catalogue draws, hover and pressed states included, so a state axe never renders is still measured. The mapper keeps an imported theme's syntax colours too, from its `tokenColors`: each role takes the rule nearest its scope family. A role the theme leaves out takes its core colour; keyword, string, number, and comment have core colours, and the other 7 follow one of them or the code text. The owner chose this on 2026-11-14 to support open themes as their authors made them: the person who installs a theme owns its contrast, so a failing syntax colour is reported as a `theme` problem, never blocked or replaced. Most imports report one: comments in 5 of 8 popular themes measure 2.4–3.7:1 on their own background. The checks stay at 4.5:1, the WCAG AA minimum for text of this size; 3:1 would clear only 2 of those 5. The build and the mapper share one engine for applying a theme, resolving it, and checking it. | The action shape as a theme input of its own (a pill or another corner): a pill brings back the action shape the owner rejected (see Shape follows role), and a corner of its own breaks the one-corner-per-height scale. Shape kept wholly core, as Primer, Carbon, Polaris, and Spectrum keep it: a theme could not round or square the whole scale. Linear and OpenAI themes: neither publishes an open palette, and their colours are brand identity. Pine and Mauve, the earlier invented themes: no product used them, and they read as unrelated to the family's sites. A grey-blue quiet theme (Slate): it sat beside the muted text and the info blue, so its selection read as metadata and its primary button looked disabled. Adjusting an imported colour until it passes: the result is no longer the theme, and nothing tells the reader it changed. Syntax colours kept core for imports: an import lost its author's code colours to stay clear of reports. A looser bar for syntax, such as 3:1: it is below AA for code text, and it clears few imports. | Per-theme contrast guards (`tests/design-foundations.test.mjs`), the base radius in a theme file (`tests/theme-files.test.mjs`), the catalogue's rendered recipes in every theme, the Themes page tests, and the theme mapper's tests (`tests/theme-mapper.test.mjs`, the React smoke test with the mode locked opposite the system's, and the catalogue test that every axe contrast failure is a reported problem) |
35
35
  | Open VSX theme imports | Core | `./open-vsx` is an experimental, framework-agnostic export for JSONC theme-file parsing and the Open VSX client. It returns VS Code theme data for `./theme-mapper`, with colours unchanged. Includes overlay colours child last and concatenate syntax rules base first, so later rules win. The client keeps the source client’s response, archive, path, checksum, include-depth, and timeout limits. The client reads ZIP headers and caps output from native `DecompressionStream('deflate-raw')`. `jsonc-parser` 3.3.1 reads comments and trailing commas and reports parse locations. It is the only runtime dependency and is pinned, used only by this export; `./theme-mapper` keeps no runtime dependencies. Component libraries own picker UI, persistence, and applying a theme. | Keeping parsing and fetching in a component library: each framework would need its own implementation and safety checks. JSZip at runtime: its synchronous inflation cannot enforce the output cap within a chunk. Handwritten JSONC parsing: more code to maintain for an established format. Making the mapper depend on the client: mapping an already parsed theme would load unused dependencies. | `tests/open-vsx.test.mjs`: offline client imports, JSONC validation, name normalisation, include merging and safety limits; generated declarations checked by `pnpm tokens:check`; package exports checked by `pnpm verify` |
36
36
  | ui-sdk components | Core | Owner decision, 2026-11-16: the design system draws [ui-sdk](https://ui-sdk.dev)'s headless components itself. `ui-sdk.css` styles their `data-slot` and state attributes in `@layer components`, with the values of the `components.html` recipes, for the components DESIGN.md lists; any other ui-sdk component is unsupported until it has a spec and rules. It is experimental and checked against one exact ui-sdk version, because ui-sdk is in beta and renames parts between betas. The design system takes no runtime dependency on ui-sdk; component libraries keep their own components. | ui-sdk's optional `web.css` themed through its `--ui-*` variables: one radius, one spacing unit, and one ring could not draw shape by role, control sizes, depth, or field focus, and its link and focus rules replaced the base's. Shared `:is(.class, [data-slot])` rules: the parts differ in structure from the native recipes, such as a checkbox that is a button with an indicator. | Parity: `tests/react-smoke/ui-sdk.spec.ts` "ui-sdk parts match the catalogue" compares each part with its `components.html` specimen, state by state, in light and dark; rendered parts: "every part ui-sdk.css draws renders from the installed ui-sdk"; pins and tokens: `tests/ui-sdk-css.test.mjs` |
37
37
  | Navigation row corners | Core | Navigation rows, header and strip rows, list-selection rows, collapsible group labels, and tabs take the row corner (`--radius-inline`), as rows inside a floating menu do (see Floating-menu rows). The owner chose the more rectangular rows from the Gate M mockup (2026-11-09), at 6px; since radius scale B (2026-11-22) rows, actions, and fields share 8px. | 10px (`--radius-field`), the previous corners, shared with fields. | row corners: `tests/catalogue/catalogue.spec.ts` "each component renders the corner radius of its role, and no other part has one"; Foundations swatch: `tests/design-foundations.test.mjs` "the Foundations current-row swatch and radius list follow the navigation row radius" |
@@ -41,12 +41,13 @@ Each entry records a choice this language made, the options it rejected, and why
41
41
  | Rail current section | Core | In a section rail the current section takes the current-page look: `--color-nav-current` fill, `--shadow-nav-current`, and `--color-nav-current-text`, with no pip. It keeps `aria-current="location"`. Strips and contents lists keep the pip. In forced colors it takes the current page's 2px `Highlight` leading border. The owner chose it at Gate M, so the rail's place reads like the live site's current page. | The pip in the rail too, as in strips and contents lists: the owner preferred the rail to match the site's current-page look. | rule present on pages: `tests/design-foundations.test.mjs` "example pages copy the state rules of every component variant their markup uses"; recipe: no test yet |
42
42
  | Tab glide | Core | The selected tab's fill is a `::before` layer that glides between tabs like the segmented thumb: `glide-left` and `glide-right`, 260ms leading and 300ms trailing, with CSS `ease`. No glide on first render or under reduced motion, and no layer in forced colors. The owner chose it at Gate M. | The fill jumping from tab to tab, unlike the segmented control beside it. | glide and reduced motion: `tests/catalogue/catalogue.spec.ts` "the tab fill glides to the new tab", "the tab fill moves at once" |
43
43
  | Segmented touch size | Core | At tablet width a segmented control of any size sets `--item` to `--control-touch` (unsized only until 2026-11-23). | Growing only the buttons' `min-height`: `--item` stayed at `--control-md`, so icon-only options were 36×44 ovals (found at Gate M). | No test yet |
44
- | Compact controls | Core | `--control-sm` is 28px (`1.75rem`), Astryx's small element height (`--size-element-sm`). Buttons pad `--space-2` (8px) at `sm` with a 6px icon gap, 10px at `md`, and `--space-3` at `lg`. Badges pad 2px by 6px with a 4px dot gap. A new [chip](components.md#chip) is 24px tall with `--space-2` padding. The owner chose this on 2026-11-22 from a rendered comparison of today's controls, the proposal, and Astryx, after finding the board busy. | Astryx's 12px button padding at every size: the owner asked for narrower controls, and the height cut alone left `sm` buttons as wide as before. Astryx's 12px `sm` label: personal work keeps IBM Plex at `--text-sm` (13px). Astryx's solid status badges: status surfaces are soft tints (DESIGN.md, Theme and color), and solid fills are louder than a busy screen can take. Astryx's semibold pressed option: the thumb and accent text already mark it, and a weight change needs a hidden copy of each label to stop the width from shifting. Astryx's 0.98 press scale: the 1px sink is part of quiet depth. | token value: `tests/token-values.test.mjs` "tokens.css preserves DS-1 values except …"; recipes: `tests/catalogue/catalogue.spec.ts` and the ui-sdk parity test `tests/react-smoke/ui-sdk.spec.ts` "ui-sdk parts match the catalogue" |
44
+ | Compact controls | Core | `--control-sm` is 28px (`1.75rem`), Astryx's small element height (`--size-element-sm`). Buttons pad `--space-2` (8px) at `sm` with a 6px icon gap, 10px at `md`, and `--space-3` at `lg`. Badges pad 2px by 6px with a 4px dot gap. A new [chip](components.md#chip) is 24px tall with `--space-2` padding. The owner chose this on 2026-11-22 from a rendered comparison of today's controls, the proposal, and Astryx, after finding the board busy. | Astryx's 12px button padding at every size: the owner asked for narrower controls, and the height cut alone left `sm` buttons as wide as before. Astryx's 12px `sm` label: personal work keeps the shared type family at `--text-sm` (13px). Astryx's solid status badges: status surfaces are soft tints (DESIGN.md, Theme and color), and solid fills are louder than a busy screen can take. Astryx's semibold pressed option: the thumb and accent text already mark it, and a weight change needs a hidden copy of each label to stop the width from shifting. Astryx's 0.98 press scale: the 1px sink is part of quiet depth. | token value: `tests/token-values.test.mjs` "tokens.css preserves DS-1 values except …"; recipes: `tests/catalogue/catalogue.spec.ts` and the ui-sdk parity test `tests/react-smoke/ui-sdk.spec.ts` "ui-sdk parts match the catalogue" |
45
45
  | Control size scale | Core | `--control-sm`, `--control-md`, and `--control-lg` are 28px, 32px, and 36px (`1.75rem`, `2rem`, `2.25rem`), Astryx's element sizes (`--size-element-sm`, `-md`, `-lg`). A control with no size is `md`. A separate `--control-touch`, 44px (`2.75rem`), is what controls of every size grow to at tablet width; only the catalogue's inert size specimens and the phone header samples keep their sizes there. On desktop, docs-site header links and quiet actions (Copy, close, Full size, the project trigger) are `--control-md`, and terminal-capture tabs take the tab box. The owner chose this on 2026-11-23: 36px `md` felt big beside 28px `sm`. On 2026-11-24 the owner found the 44px desktop links, tabs, and quiet actions too thick. | The 28 / 36 / 44px scale (until 2026-11-23): `md` sat 8px above `sm`, so a medium control stood out in a dense screen, and `lg` doubled as the touch size. Astryx's 32px `md` and 36px `lg` were first rejected on 2026-11-22 because `md` would move every form and `lg` served touch; the owner's feedback on `md`, and a separate touch token, removed both reasons. Making `sm` the default: documentation and product pages would need `md` on every control, and the gap to `md` is now 4px. Growing only unsized controls at tablet width (the rule before): an application screen sets every control at `sm`, so its touch targets would stay 28px, and an explicit `lg` would drop from 44px to 36px. `--control-touch` for docs-site links and icon actions at every width (2026-11-23 to 2026-11-24): on desktop they stood 12px taller than every 32px control beside them. | token values: `tests/token-values.test.mjs` "tokens.css preserves DS-1 values except …"; rendered sizes and touch growth at 1280, 800, and 375px: `tests/catalogue/catalogue.spec.ts` "<page> renders control sizes at <width>px", `tests/site/site.spec.ts` "links and icon actions keep their sizes and hit areas", and `tests/react-smoke/ui-sdk.spec.ts` "ui-sdk parts match the catalogue at 375px" |
46
- | Segmented track inset | Core | The track is the control height and insets its options 2px from its outer edge (its 1px border and 1px of padding), with 2px between options, as Astryx's segmented control does (`SegmentedControl.tsx`: 2px padding and gap; `SegmentedControlItem.tsx`: item height the element height minus 4px, 8px padding at `sm`, 12px at `md` and `lg`). Each option is its own thumb, with `calc(var(--radius-control) - var(--inset))`, 6px, measured from the outer edge because the border is part of the track's visible curve: the one control corner below 8px, a named exception to the row corner. The owner asked for it on 2026-11-22 after the 28px `sm` filter's thumb looked off centre in its 30px track. Options set `line-height: 1`, so the label sits centred: the inherited 1.6 put IBM Plex 1.8px above centre in a 24px `sm` option (Chromium). | A thumb inset 2px inside each full-height option (the rule until 2026-11-22): the track was 2px taller than the control (34px beside a 32px button at `sm`, then 30px beside 28px), and the thumbs sat 4px apart. The mockups' nested 12px track around 8px rows: at 28px tall, a 4px inset leaves a 20px option, which is cramped. Measuring from the padding edge (7px): the visible curve is the border's, so 7px reads as a corner that does not follow the track. | thumb centred and track height equals the same-size button: `tests/catalogue/catalogue.spec.ts`; ui-sdk parity: `tests/react-smoke/ui-sdk.spec.ts` "ui-sdk parts match the catalogue" |
46
+ | Segmented track inset | Core | The track is the control height and insets its options 2px from its outer edge (its 1px border and 1px of padding), with 2px between options, as Astryx's segmented control does (`SegmentedControl.tsx`: 2px padding and gap; `SegmentedControlItem.tsx`: item height the element height minus 4px, 8px padding at `sm`, 12px at `md` and `lg`). Each option is its own thumb, with `calc(var(--radius-control) - var(--inset))`, 6px, measured from the outer edge because the border is part of the track's visible curve: the one control corner below 8px, a named exception to the row corner. The owner asked for it on 2026-11-22 after the 28px `sm` filter's thumb looked off centre in its 30px track. Options set `line-height: normal` after the font shorthand, so the label's line box is its content area and sits centred: the inherited 1.6 put IBM Plex 1.8px above centre in a 24px `sm` option, and `line-height: 1` put Inter 0.5px above centre at `sm` and `md` (Chromium), because its ascent and descent round to an odd total. | A thumb inset 2px inside each full-height option (the rule until 2026-11-22): the track was 2px taller than the control (34px beside a 32px button at `sm`, then 30px beside 28px), and the thumbs sat 4px apart. The mockups' nested 12px track around 8px rows: at 28px tall, a 4px inset leaves a 20px option, which is cramped. Measuring from the padding edge (7px): the visible curve is the border's, so 7px reads as a corner that does not follow the track. | thumb centred and track height equals the same-size button: `tests/catalogue/catalogue.spec.ts`; ui-sdk parity: `tests/react-smoke/ui-sdk.spec.ts` "ui-sdk parts match the catalogue" |
47
47
  | Application density | Core | In an application screen, buttons, fields, and segmented controls are `sm` (28px), the main action included, and chips stay 24px. The main action stands out by its primary fill. The owner dropped the `md` main action on 2026-11-23: `md` felt big beside `sm`. Rows are `--row` tall, with `--text-sm` body text and `--text-xs` metadata. Documentation and product pages keep `md`. At tablet width every touch target grows to `--control-touch`, at every size. The owner chose this on 2026-11-22 from the board mockups. | Toolbar controls alone at `sm`, the rule before: forms and actions inside a pane stayed `md`, so one screen mixed two heights. `md` everywhere: the board read as busy. One `md` main action per screen (the first version of this rule): it felt big next to `sm` controls. | No test yet |
48
48
  | Tab density | Core | A tab has the button's box: at least `--control-md` (32px) tall, 10px inline padding, no block padding, and line height 1; `data-size="sm"` tabs, for app screens, are 28px with 8px padding. Tabs grow to `--control-touch` at tablet width. The list keeps its 4px padding, which keeps the selected tab's shadow whole where the list clips. The owner asked for narrower tabs with less dead space on 2026-11-24. | The tab before: `--space-2` `--space-3` padding with line height 1.6 made a 38px tab, taller than every control beside it, and 84px wide for "Overview". 2px list padding: it clips the selected tab's `--shadow-nav-current`, which reaches 4px below the tab. | heights: `tests/catalogue/catalogue.spec.ts` "renders control sizes" (tabs at their exact control height) |
49
- | Astryx as the reference system | Core | When a value or behaviour is not decided here, start from Astryx's (`meta/astryx`, MIT, read at `7032abf`), and record any departure in this file. Take the idea and the values, never the code. The identity stays this system's: IBM Plex, the theme hues, quiet depth, and the forced-colors rules. The owner chose this on 2026-11-22 so the system stops re-deciding settled questions; the quiet action fill, the focus ring, field focus, the radius scale, and the compact controls already follow Astryx. React apps keep ui-sdk for behaviour: `ui-sdk.css` draws it. | Astryx's React components in React apps, themed with these tokens: it reverses the board's ui-sdk choice, and the Vue library could not use them. Making the design system a wrapper of ui-sdk: `@filipgutica/ui` (Vue) and the static sites use the design system, ui-sdk is React-only here and in beta, and `ui-sdk.css` already draws ui-sdk's parts. Deciding each value from scratch: it re-decided questions Astryx has answered, and the results drifted toward it anyway. | No test: a working rule for authors |
49
+ | Code wrap toggle | Core | Every multi-line code block (one with a header, or a live example's source) has a Wrap lines toggle before Copy: an icon-only quiet action with a fixed name and `aria-pressed`. It is off by default, per block, and not saved. Astryx offers wrapping only as a caller prop (`CodeBlock` spec: "optional wrapping"); this departs from it with a reader control, as T3 Code's code blocks have. The owner asked for it on 2026-11-24. | Wrapping by default: it would reflow every code block on the five sites, and the spec has the panel scroll. A name that flips between Enable and Disable line wrap, as T3 Code's tooltip does: with `aria-pressed` it would announce the state twice. Saving the choice: one more stored setting for a per-block reading aid. A toggle on compact blocks: they hold one line. | toggle, wrapping, and copy: `tests/catalogue/catalogue.spec.ts` "Wrap lines wraps a code block, and Copy still copies its lines" |
50
+ | Astryx as the reference system | Core | When a value or behaviour is not decided here, start from Astryx's (`meta/astryx`, MIT, read at `7032abf`), and record any departure in this file. Take the idea and the values, never the code. The identity stays this system's: its type pair, the theme hues, quiet depth, and the forced-colors rules. The owner chose this on 2026-11-22 so the system stops re-deciding settled questions; the quiet action fill, the focus ring, field focus, the radius scale, and the compact controls already follow Astryx. React apps keep ui-sdk for behaviour: `ui-sdk.css` draws it. | Astryx's React components in React apps, themed with these tokens: it reverses the board's ui-sdk choice, and the Vue library could not use them. Making the design system a wrapper of ui-sdk: `@filipgutica/ui` (Vue) and the static sites use the design system, ui-sdk is React-only here and in beta, and `ui-sdk.css` already draws ui-sdk's parts. Deciding each value from scratch: it re-decided questions Astryx has answered, and the results drifted toward it anyway. | No test: a working rule for authors |
50
51
  | Conversation components | Core | Message row, message group, hover toolbar, thread panel, composer, tool-call disclosure, mention, and chip are specified here before any app builds them, so the board's React code and any later Vue component draw from one spec. They follow the board mockups (2026-11-22) and Slack, T3 Code, and ChatGPT patterns: flat rows with no bubble; one author's messages within about 5 minutes grouped under one avatar; actions in a hover toolbar that is one Tab stop (`role="toolbar"`, arrow keys between its actions) and never shown on touch; tool output collapsed to one line in a native `<details>`; a composer that is one field with an inline send button; a thread in a side pane, resizable from 20rem to 40rem by drag or arrow keys and full width at tablet width. Conversation sits after Navigation, because its parts reuse the selected row and the overflow menu. A message takes one tag style, `--color-nav-current-text` semibold, only on a message that needs the reader. A mention is static text, not a link. | Bubbles or cards around messages: the board read as busy, and Slack, T3 Code, and ChatGPT use flat rows. A row of buttons on every message: it repeats the same actions down the stream. A toolbar as a `role="group"`: three Tab stops for each message in a long stream. A thread in a dialog: it hides the channel the reader is replying about. Building the components in the board app first: the app's code would become the only definition. | rendered corners by role and the conversation keyboard paths: `tests/catalogue/catalogue.spec.ts`; parts, groups, and states agreement: `tests/component-parts.test.mjs` and `tests/design-foundations.test.mjs` |
51
52
  | Phone header | Core | The family shell, option A, which the owner chose on 2026-11-11: the site's header matches the other family sites. At tablet width the static header has two rows, the project switcher and the appearance control, then the Pages strip. Where both do not fit, as at 320px, the appearance control wraps to its own row at the start, as UiSiteHeader does on PluginBench and Filip Stack, and the project name never truncates. The rule below the header is the family's solid `--color-text` line. Just below it, at the start, the labelled trigger ("Components: By purpose") opens the drawer from the left, the side it sits on. The drawer is titled with the rail's name and holds Find and the rail's groups. `/` opens it with Find focused. Without JavaScript nothing moves. | The Gate M single sticky row with the site name, then icon-only Find and Menu buttons, with the pages and appearance in the Menu drawer: the site had no way to the other family sites, and the Menu button sat at the right while the drawer slid in from the left. Option B, keeping that row and sliding the drawer in from the right: it kept the site apart from the other seven family sites. Truncating the project name at 320px so both controls shared row 1: the family wraps the picker instead, and the name should never truncate. | `tests/site/site.spec.ts` "the switcher and appearance share the first row, then the pages, then the trigger", "the switcher and appearance take a row each, then the pages, then the trigger", "every clipped strip link shows at least 16px", "the trigger opens the drawer from the left edge, titled with the rail and holding Find and the rail only", "the trigger label follows the current section as the page scrolls"; `tests/catalogue/catalogue.spec.ts` "the trigger opens the drawer on the current row, and a link closes it and focuses the target" |
52
53
  | Drawer instead of a long strip | Core | A horizontal strip holds 6 links or fewer; a longer list moves into the drawer at tablet width. | The catalogue's 26-link strip on phones: most links sat off screen, and the page broke its own drawer spec. | rail moves into the drawer: `tests/catalogue/catalogue.spec.ts` "resizing moves the rail between the page and the drawer, and the pages and appearance stay in the header"; six-link strip limit: no test yet |
@@ -76,6 +77,10 @@ Each entry records a choice this language made, the options it rejected, and why
76
77
  | Live example stage | Core | The stage sits on the page background (`--color-bg`), not in a well or a panel. It is the named exception to the container depth tier. | A raised or inset stage changes the surface under the preview, so raised controls do not look as they do on a page. | No test yet |
77
78
  | Live example source | Core | Inside the frame, the code block drops its own radius, border, and shadow, and spans the frame's width. The frame draws the one edge. | A rounded well with its own edge and shadow inside the frame is a frame inside a frame. | No test yet |
78
79
  | Token names | Core | One set of names, the design system's own: `--color-*` for colours, `--shadow-*` for shadows, and `--text-*`, `--radius-*`, and `--font-*` for type sizes, radii, and fonts. See [Token names](#token-names). | Two sets, the [1.x short names](#token-names) here and `--color-*` names in ui: every site and agent translated between them through `ui:` comments, and the 1.x control radius used Tailwind's `-md` name for a 999px pill where Tailwind's is 0.375rem. Short names everywhere: about 920 references in 27 files across six repositories, a ui major release, and 18 new names. | no 1.x names: `tests/token-names.test.mjs` "no payload file uses a 1.x token name" |
80
+ | Default fonts | Core | Owner decision, 2026-11-24: Inter for `--font-ui` and JetBrains Mono for `--font-mono`, the industry-standard pairing. Both are self-hosted from `fonts.css` (latin, 400, 500, and 600, under the OFL), so every operating system renders the same faces. A theme may still set its own two stacks. | IBM Plex Sans and Mono, the faces before: the owner chose the standard pairing. The system font stack: it renders a different face on each operating system, so text metrics and the look differ per reader. Figtree: considered and not chosen. | faces load: `tests/react-smoke/smoke.spec.ts` "the Inter and JetBrains Mono faces load from fonts.css" |
81
+ | Subtree themes | Core | Owner decision, 2026-11-24: `data-theme="dark"` or `"light"` on any element below `<html>`, or a `.dark` class on `<html>` or below it, themes that subtree. The token build generates one block per mode (`.dark` or `[data-theme="dark"]`, and `[data-theme="light"]`, each under `:root`; `data-theme="light"` wins over `.dark` on one element) that redeclares every token that differs between the modes or follows one that does, since a custom property resolves where it is declared. Each theme file adds blocks for what it changes there, such as its light hue and its neutrals. The selectors carry `:root`, so they outrank a bare `:root` input, as the root dark rules do. The subtree takes its mode's text colour from the base layer. On `<html>`, `data-theme` and the system preference work as before; `class="dark"` there is new and forces dark unless `data-theme="light"` is also set. | Changed-value blocks only: the derived tokens (accent mixes, wells, shadows) keep the page's mode. A component library's own `.dark` copy of every dark value: it drifts from the build. Moving the dark switch from `--color-project` to `--color-accent`, so a light subtree needs no hue of its own: it changes what `var(--color-project)` reads in dark on `<html>`. | nested subtrees in every theme: `tests/catalogue/subtree-themes.spec.ts` |
82
+ | Theme inputs list | Core | Owner decision, 2026-11-24: the token build publishes `dist/theme-inputs.json` (`./theme-inputs.json`), the names a theme may set by kind: the hue pair, the text on the hue's fills, the two fonts, the base radius, the neutrals, and the syntax colours. It comes from the engine, so it follows the build. A component library's own test reads it and fails when one of its themes sets any other token, so "theme inputs only, never overrides" is checked here, not by convention. `./theme-mapper` also exports `checkTheme(inputs)`, the shipped themes' contrast checks, for themes this package does not ship. | A hand-kept list in the README: it drifts from the engine. A list in each component library: each copy drifts, and none follows a new input. | list and shipped themes: `tests/theme-inputs.test.mjs` "every shipped theme file sets only theme inputs", "the theme mapper sets only theme inputs" |
83
+ | Sidebar width name | Core | Owner decision, 2026-11-24: the sidebar width is `--sidebar-width` (224px). A breaking rename of `--sidebar`. | `--sidebar`: shadcn-based apps define `--sidebar` as a colour, so a page that loads both breaks one of them. | DS-1 parity under the rename: `tests/token-values.test.mjs` "tokens.css keeps the DS-1 declarations except the inherited command aliases" |
79
84
  | Versioning | Core | Releases are 1.0.x patches while the system has no outside users, tagged `ds-v*` from the `ds-v1.0.0` seed. Every release, a breaking one included, is a patch; the release notes name a breaking change written as `!` or a `BREAKING CHANGE:` footer in the commit message. npm already holds 1.1.0 through 2.4.0 from the earlier `v*` series, so leaving 1.0.x means 2.5.0 or 3.0.0. | Semver majors and minors (2.x): the numbers signalled a maturity the system does not have yet. 0.0.x: npm already holds 1.0.0, and a `^0.0.1` range matches only 0.0.1. | patch cap: `tests/release.test.mjs` "the release analyzer caps feat, fix, and breaking changes, from a commit or a PR body, at a patch", "the release analyzer releases nothing for chore-only commits"; tag series: `tests/release.test.mjs` "the site version comes from the latest ds-v tag and ignores the earlier v tags" |
80
85
  | Agent delivery | Core | A Claude and Codex plugin whose root is this repository. Its `design-system` skill reads `language/` in place, and each release stamps its version into the plugin manifests and commits them back, since both hosts cache a plugin by version. A `docs` commit releases a patch, because agents read `language/` as instructions. | filip-stack host config copying the pinned package to `~/design-system`: it tied the design system to filip-stack and needed its own installer. A plugin folder holding a copy of `language/`: plugin caches cannot reach outside the plugin folder, so the copy would need a build step and a staleness check. | skill path: `tests/plugin.test.mjs` "the design-system skill names a DESIGN.md that exists in the plugin"; version stamp: `tests/plugin.test.mjs` "a release stamps its version into every plugin manifest and keeps the other fields"; docs release: `tests/release.test.mjs` "the release analyzer releases a patch for a docs commit, since agents read language/ through the plugin" |
81
86
  | Command-line tool | Core | None yet. A VS Code theme import built on `open-vsx` and `theme-mapper` is the one job no other tool covers; it waits until `@filipgutica/ui` uses the theme mapper, since both APIs are experimental. It would ship as a `bin` in this package, run with `npx`. | A `check` command for off-token values: the `interface-design` skill's `ui-check --tokens` and fallow already find them. A separate Homebrew tool: more release setup than one command needs. | No test yet |
@@ -8,12 +8,12 @@
8
8
  <style>
9
9
  .icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
10
10
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
11
- .frame { width: min(calc(var(--page-max) + var(--sidebar)), calc(100% - var(--space-12))); margin-inline: auto; }
11
+ .frame { width: min(calc(var(--page-max) + var(--sidebar-width)), calc(100% - var(--space-12))); margin-inline: auto; }
12
12
  .header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); min-height: var(--space-16); border-bottom: 1px solid var(--color-border-subtle); }
13
13
  .brand { color: var(--color-text); font-weight: var(--weight-semibold); }
14
14
  .header nav { display: flex; gap: var(--space-6); }
15
15
  .header a { display: inline-flex; align-items: center; min-height: var(--control-md); font-size: var(--text-sm); }
16
- .layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); gap: var(--space-8); }
16
+ .layout { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); gap: var(--space-8); }
17
17
  .sidebar { position: sticky; top: var(--space-6); align-self: start; display: grid; gap: var(--space-1); padding-block: var(--space-6); }
18
18
  /* Navigation rows: components.html#navigation-list, unchanged. Only the rail's placement and spacing are local. */
19
19
  .navlist a { position: relative; display: flex; align-items: center; min-height: var(--row); padding-inline: var(--space-3); border-radius: var(--radius-inline); color: var(--color-muted); font-size: var(--text-sm); text-decoration: none; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
@@ -31,11 +31,8 @@
31
31
  @media (forced-colors: active) { .navlist a[aria-current="page"] { border-inline-start: 2px solid Highlight; padding-inline-start: calc(var(--space-3) - 2px); } .navlist a[aria-current="location"]::before { forced-color-adjust: none; background: Highlight; } :is(.rail, .rail-specimen) a[aria-current="location"] { border-inline-start: 2px solid Highlight; padding-inline-start: calc(var(--space-3) - 2px); } }
32
32
  main { min-width: 0; display: grid; gap: var(--space-12); padding-block: var(--space-8) var(--space-16); }
33
33
  section { display: grid; gap: var(--space-4); min-width: 0; }
34
- h1, h2 { font-family: var(--font-mono); }
35
34
  h1 { font-size: var(--text-3xl); max-width: 24ch; }
36
35
  h2 { font-size: var(--text-xl); }
37
- /* The ## mark goes on page-level section headings only. It is decorative; the empty alternative text keeps it out of the accessible name. */
38
- main > section > h2::before { content: "## " / ""; color: var(--color-accent); }
39
36
  /* The main gap alone separates sections. The rule above each heading belongs to the heading. */
40
37
  main > section > h2 { padding-top: var(--space-4); border-top: 1px solid var(--color-border-subtle); }
41
38
  p { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-reading); }
@@ -44,13 +41,13 @@ p { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-
44
41
  /* Copy is a quiet action; this sets its size and place. */
45
42
  .copy { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; min-width: var(--control-md); min-height: var(--control-md); margin-left: auto; padding: 0 0.375rem; color: inherit; }
46
43
  /* Copy is muted at rest. The code block has its own palette, so on hover and while the tick shows it takes the block's text colour. */
47
- .code .copy { color: var(--color-muted); }
48
- .code .copy[data-copied] { color: var(--color-code-text); }
49
- .code .copy.is-hover:where(:not(:disabled)) { color: var(--color-code-text); }
50
- @media (hover: hover) { .code .copy:hover:where(:not(:disabled)) { color: var(--color-code-text); } }
44
+ .code :is(.copy, .wrap-toggle) { color: var(--color-muted); }
45
+ .code :is(.copy[data-copied], .wrap-toggle[aria-pressed="true"]) { color: var(--color-code-text); }
46
+ .code :is(.copy, .wrap-toggle).is-hover:where(:not(:disabled)) { color: var(--color-code-text); }
47
+ @media (hover: hover) { .code :is(.copy, .wrap-toggle):hover:where(:not(:disabled)) { color: var(--color-code-text); } }
51
48
  /* Inset: the code block clips its content. */
52
49
  .code pre:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
53
- .code .copy.quiet-action:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
50
+ .code :is(.copy, .wrap-toggle).quiet-action:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
54
51
  /* The source is an inset panel. It sits --space-1 inside the frame, so its corners are concentric with the frame's. */
55
52
  .code pre { margin: 0; padding: var(--space-4); overflow: auto; max-height: 32rem; border: 1px solid transparent; border-radius: calc(var(--radius-panel) - var(--space-1)); background: var(--color-code); font-size: var(--text-code); line-height: 1.65; tab-size: 2; }
56
53
  /* Each line is a baseline-aligned row, so a prompt or line number sits on the text's baseline. */
@@ -13,7 +13,6 @@
13
13
  .header a { display: inline-flex; align-items: center; min-height: var(--control-md); font-size: var(--text-sm); }
14
14
  .hero { display: grid; gap: var(--space-8); padding-block: var(--space-12); }
15
15
  .copy { display: grid; justify-items: start; gap: var(--space-4); }
16
- h1, .workflow > h2 { font-family: var(--font-mono); }
17
16
  h1 { max-width: 18ch; font-size: var(--text-display); letter-spacing: var(--tracking-tight); }
18
17
  .lead { max-width: 56ch; font-size: var(--text-reading); color: var(--color-muted); }
19
18
  .actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-6); }
@@ -40,8 +39,6 @@ figure { margin: 0; min-width: 0; }
40
39
  figcaption { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--color-muted); }
41
40
  .workflow { display: grid; gap: var(--space-6); padding-block: var(--space-12); border-top: 1px solid var(--color-border-subtle); }
42
41
  .workflow > h2 { max-width: 24ch; font-size: var(--text-3xl); }
43
- /* Page-level product sections take the decorative ## mark; headings inside the product view do not. */
44
- .workflow > h2::before { content: "## " / ""; color: var(--color-accent); }
45
42
  .workflow > p { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-reading); }
46
43
  .evidence { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-8); align-items: start; }
47
44
  .checks { margin: 0; padding: var(--space-2) var(--space-6); list-style: none; font-size: var(--text-sm); }