@filipgutica/design-system 1.0.6 → 1.0.7

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.
@@ -131,7 +131,7 @@ Controls use quiet depth and familiar shapes: borderless surfaces with one tight
131
131
  | --- | --- | --- | --- |
132
132
  | Acts, or sets a value in place with every option shown, on one line | Pill | `--radius-control` | Buttons other than the labelled contents trigger and its no-JavaScript summary, quiet actions other than the project-menu trigger, and segmented controls with their thumbs |
133
133
  | Small state mark | Pill | `--radius-pill` | Status badges, switch tracks and knobs, slider and progress tracks, score pips, and the in-page location pip |
134
- | A place, or a row you pick | 6px | `--radius-inline` | Navigation rows outside a floating menu, group labels, breadcrumb links, tabs, list rows, checkboxes, and keyboard keys |
134
+ | A place, or a row you pick | 6px | `--radius-inline` | Navigation rows outside a floating menu, group labels, breadcrumb links, the site name link, tabs, list rows, checkboxes, and keyboard keys |
135
135
  | Something you type in, a control whose label wraps, or a one-line control that is not an action | 10px | `--radius-field` | Inputs, textareas, search fields, toggle cards, pager links, and one-line controls that are not actions: the select, the project-menu trigger, the labelled contents trigger and its no-JavaScript summary, and the skip link |
136
136
  | Holds other things | 16px | `--radius-panel` | Wells, plates, panels, cards, radio cards, alerts, code blocks, example frames, and floating layers |
137
137
 
@@ -182,7 +182,7 @@ Each depth tier has one token. [`tokens.css`](tokens.css) holds every shadow val
182
182
  | Local | Which page of this site? | Section rail, or a navigation strip of 6 links or fewer | `aria-current="page"`: the lifted fill |
183
183
  | In-page | Where am I on this page? | Section rail rows that point to `#id` | `aria-current="location"`: the lifted fill in a rail, a pip in strips and contents lists |
184
184
  | Sequential | What comes next? | Pager | `rel="prev"` and `rel="next"` |
185
- | Path | How do I get back up? | Breadcrumbs, only at depth 3 or more, or for a page outside its site's shell | The current page as text with `aria-current="page"` |
185
+ | Path | How do I get back up? | Breadcrumbs above the page title, on every page below the site's home page; never in the header | The current page as text with `aria-current="page"` |
186
186
  | Find | Where is X? | Find field that filters the rail | A live match count |
187
187
 
188
188
  - **`aria-current`.**
@@ -237,7 +237,7 @@ The personal sites are terminal tools that read Markdown and paths, so their ide
237
237
  - **Mono identity.** `--font-mono` (IBM Plex Mono) sets identity, the page titles and section headings of documentation, CLI tool, article, and product pages, navigation rails, metadata, captions, and the footer. `@filipgutica/ui` self-hosts IBM Plex; elsewhere the tokens fall back to the system stack.
238
238
  - **Headings.** Documentation, CLI tool, article, and product page titles are mono; application titles are `--font-ui`. Page-level section headings (h2) on documentation, CLI tool, article, and product pages are mono, start with a `##` mark in `--color-accent` (decorative, so screen readers skip it), and have a `--color-border-subtle` rule above the section. Application and inline-visualization section headings, and every h3 or lower, are plain `--font-ui` with no mark. Product pages and tool homes may use a mono `--text-display` title, stepping down to `--text-display-sm` on phones; keep a short heading measure, place supporting copy and the primary action nearby, and let the first product image enter the initial desktop viewport.
239
239
  - **Hue marks.** The hue also draws the `~/` header mark, the `##` mark on documentation, CLI tool, article, and product section headings, step numbers, and the `$` prompt.
240
- - **Header.** Personal product sites share a compact static header: a mono `~/name` identity with the `~/` in `--color-accent`, a project switcher, useful page links, appearance controls, and a solid `--color-text` rule below. Use the shared project registry for names, order, and destinations. Keep a gallery's existing application navigation structure.
240
+ - **Header.** Personal product sites share a compact static header: a mono `~/name` identity with the `~/` in `--color-accent`, a project switcher, useful page links, appearance controls, and a solid `--color-text` rule below. Use the shared project registry for names, order, and destinations. The identity is the same on every page, and the links sit at the same x on every page; the page's path goes in [breadcrumbs](components.md#breadcrumbs) above its title. Keep a gallery's existing application navigation structure.
241
241
  - **Appearance.** Personal pages share the built-in System/Light/Dark choice, through the header's picker. An explicitly selected custom gallery theme overrides that choice until the reader selects a built-in appearance. Preserve installed themes.
242
242
  - **Terminal plates.** Commands sit on a dark plate tinted with the project hue (`--color-command-bg`), in both themes. A shell command gets a `$` prompt in `--color-project-dark`, drawn by CSS so it never enters copied or accessible text. Short commands use a headerless compact row with an accessible Copy control. Terminal captures keep the neutral `--color-terminal` plate, with a mono status-line caption below the screen; tabs on a capture switch to mono.
243
243
  - **Steps.** A real sequence is an ordered list with mono numbers in `--color-accent` on a ruled leading column, an h3 title per step, and an optional result note on the last step.
@@ -372,9 +372,19 @@
372
372
  /* Inset: the rail list scrolls. */
373
373
  .group-toggle:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
374
374
  /* Horizontal strip: the same rows in one line that scrolls sideways. The padding keeps the current row's shadow whole.
375
- A clipped edge fades over 24px, as tabs do; the script names the clipped ends in data-clip. */
376
- .navlist.strip { display: flex; width: auto; max-width: 100%; overflow-x: auto; padding: 0.125rem; }
375
+ A clipped edge fades over 24px, as tabs do; the script names the clipped ends in data-clip, and scrolls a
376
+ focused row clear of the fades (scroll-padding). The fade shows the overflow, so no scrollbar shows. */
377
+ .navlist.strip { display: flex; width: auto; max-width: 100%; overflow-x: auto; scroll-padding-inline: 24px; scrollbar-width: none; padding: 0.125rem; }
377
378
  .navlist.strip a { flex: none; white-space: nowrap; }
379
+ /* Each row is as wide as its label at the current row's weight, so becoming current moves nothing. A
380
+ hidden copy of the label (data-label, with empty alternative text) takes the row's width at that weight
381
+ and overlaps the label's own line by -1lh, so the row keeps one line's height and its text-box trim.
382
+ Without text-box the row is a flex column, so the copy stacks on the label rather than beside it.
383
+ Without lh there is no copy, so the label stays in place and only the width can change. */
384
+ @supports (margin-top: -1lh) {
385
+ .navlist.strip a[data-label] { flex-direction: column; align-items: stretch; justify-content: center; }
386
+ .navlist.strip a[data-label]::after { content: attr(data-label) / ""; display: block; margin-top: -1lh; font-weight: var(--weight-medium); visibility: hidden; }
387
+ }
378
388
  .navlist.strip[data-clip="start"] { mask-image: linear-gradient(to right, transparent, #000 24px); }
379
389
  .navlist.strip[data-clip="end"] { mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
380
390
  .navlist.strip[data-clip="start end"] { mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
@@ -406,23 +416,30 @@
406
416
  .find-empty .btn.text { margin-inline-start: calc(-1 * var(--space-1)); }
407
417
  .find-count { color: var(--color-muted); font-size: var(--text-xs); }
408
418
 
409
- /* Breadcrumbs. The separator is drawn by CSS, so it is not read. */
419
+ /* Breadcrumbs. The separators and the phone back mark are chevrons drawn with two borders of a turned
420
+ box, so there is no text to read. */
410
421
  .crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-2); margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); }
411
422
  .crumbs li { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; }
412
- .crumbs li + li::before { content: "/" / ""; color: var(--color-muted); }
423
+ .crumbs li + li::before, .crumbs li:nth-last-child(2) a::before { width: 0.375rem; height: 0.375rem; border: solid currentColor; border-width: 1.5px 1.5px 0 0; }
424
+ /* Turned 45°, the chevron's ink sits right of its box's centre; the margins even out the gaps beside it. */
425
+ .crumbs li + li::before { content: ""; flex: none; margin-inline: -0.125rem 0.125rem; color: var(--color-muted); transform: rotate(45deg); }
413
426
  .crumbs a { display: inline-flex; align-items: center; min-height: var(--control-sm); border-radius: var(--radius-inline); color: var(--color-muted); text-decoration: none; }
414
427
  .crumbs a.is-hover { color: var(--color-text); text-decoration: underline; text-underline-offset: 0.2em; }
415
428
  @media (hover: hover) { .crumbs a:hover { color: var(--color-text); text-decoration: underline; text-underline-offset: 0.2em; } }
416
429
  .crumbs [aria-current="page"] { color: var(--color-text); font-weight: var(--weight-medium); overflow-wrap: anywhere; }
417
- /* Crumbs share the header row with the strip, so they centre on the cap height too. */
430
+ /* Crumbs centre their labels on the cap height, as navigation rows do. */
418
431
  @supports (text-box: trim-both cap alphabetic) {
419
432
  .crumbs a:not(:has(> *)) { display: block; align-content: center; padding-block: var(--space-2); text-box: trim-both cap alphabetic; }
420
- .crumbs [aria-current="page"], .crumbs li + li::before { text-box: trim-both cap alphabetic; }
433
+ .crumbs [aria-current="page"] { text-box: trim-both cap alphabetic; }
421
434
  }
422
- /* Phones show only the parent, as a back link; .is-back pins that for the specimen. */
435
+ /* A page-level trail sits on its text, not on its links' touch boxes: it moves up by half the room the
436
+ box adds around the line, and takes the same room back below, so the h1 does not move. */
437
+ .intro > .crumbs > ol { margin-block: calc((1lh - var(--control-sm)) / 2) calc((var(--control-sm) - 1lh) / 2); }
438
+ /* Phones show only the parent of a trail of three or more, as a back link; .is-back pins that for the specimen. */
423
439
  .crumbs.is-back li:not(:nth-last-child(2)) { display: none; }
424
440
  .crumbs.is-back li::before { content: none; }
425
- .crumbs.is-back li:nth-last-child(2) a::before { content: "‹\a0" / ""; }
441
+ .crumbs.is-back li:nth-last-child(2) a { position: relative; padding-inline-start: 0.875rem; }
442
+ .crumbs.is-back li:nth-last-child(2) a::before { content: ""; position: absolute; inset-inline-start: 0.25rem; top: 50%; transform: translateY(-50%) rotate(-135deg); }
426
443
 
427
444
  /* Pager: previous at the start, next always at the end. */
428
445
  .pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); width: 100%; padding-top: var(--space-6); border-top: 1px solid var(--color-border-subtle); }
@@ -636,10 +653,11 @@
636
653
  :is(.switch[aria-checked="true"] .switch-track, .toggle[aria-pressed="true"] .toggle-track)::after { background: HighlightText; }
637
654
  /* Fills and shadows drop. The current page takes a system border; the in-page location keeps
638
655
  its pip, redrawn in the system highlight, so the two still differ. */
639
- .navlist a[aria-current="page"] { border-inline-start: 2px solid Highlight; }
656
+ /* The padding absorbs each border, so a row keeps its width and its label does not move. */
657
+ .navlist a[aria-current="page"] { border-inline-start: 2px solid Highlight; padding-inline-start: calc(var(--space-3) - 2px); }
640
658
  .navlist a[aria-current="location"]::before { forced-color-adjust: none; background: Highlight; }
641
659
  /* A rail's current section has no pip, so it takes the current page's system border. */
642
- :is(.rail, .rail-specimen) a[aria-current="location"] { border-inline-start: 2px solid Highlight; }
660
+ :is(.rail, .rail-specimen) a[aria-current="location"] { border-inline-start: 2px solid Highlight; padding-inline-start: calc(var(--space-3) - 2px); }
643
661
  .key { border-color: CanvasText; }
644
662
  /* The tone dot is a fill, so it opts out of adjustment and takes the label's system colour. */
645
663
  .badge:is(.success, .warning, .danger, .info)::before { forced-color-adjust: none; background: CanvasText; }
@@ -659,9 +677,18 @@
659
677
  /* One scroll offset for every in-page jump; sections set no scroll-margin-top. The location tracker reads the same value. */
660
678
  html { scroll-padding-top: var(--space-4); }
661
679
  .frame { width: min(calc(var(--page-max) + var(--sidebar)), calc(100% - var(--space-12))); margin-inline: auto; }
662
- /* Header: the site name, the design system's pages as a navigation strip, and the appearance control. */
680
+ /* Header: the site name, the design system's pages as a navigation strip, and the appearance control.
681
+ The site name is the same on every page, in the project-menu trigger's type, with a ~/ mark one
682
+ character wide before it. As a link it is a place, so it takes the 6px corner. */
663
683
  .page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-6); min-height: var(--space-16); border-bottom: 1px solid var(--color-border-subtle); }
664
- .site-name { margin: 0 auto 0 0; font: var(--weight-semibold) var(--text-sm) / 1 var(--font-mono); }
684
+ .site-name { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--control-sm); margin: 0 auto 0 0; border-radius: var(--radius-inline); color: var(--color-text); font: var(--weight-semibold) var(--text-sm) / 1 var(--font-mono); text-decoration: none; }
685
+ .site-name::before { content: "~/" / ""; color: var(--color-accent); }
686
+ @media (hover: hover) { a.site-name:hover { text-decoration: underline; text-underline-offset: 0.2em; } }
687
+ /* Desktop: the strip starts right after the site name, so its links sit at the same x on every page. */
688
+ @media (min-width: 801px) {
689
+ .page-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--space-8); }
690
+ .page-head > .strip { justify-self: start; }
691
+ }
665
692
  /* Header links are navigation rows at the site header's 44px. The strip's label shows only in the drawer. */
666
693
  .page-head .strip a { min-height: var(--control-lg); }
667
694
  .navlist.strip > .group-label { display: none; }
@@ -734,7 +761,9 @@
734
761
  .drawer .rail-find { position: sticky; top: calc(-1 * var(--space-4)); z-index: 1; margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) 0; padding: var(--space-4); background: var(--color-surface-raised); }
735
762
  .drawer .navlist.strip { display: grid; overflow: visible; margin-bottom: var(--space-4); padding: 0; }
736
763
  .drawer .navlist.strip > .group-label { display: block; }
764
+ /* A wrapped label and its hidden copy can wrap differently, and the drawer's rows need no reserved width. */
737
765
  .drawer .navlist.strip a { white-space: normal; }
766
+ .drawer .navlist.strip a::after { content: none; }
738
767
  .drawer-appearance { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); padding-bottom: var(--space-4); border-bottom: 1px solid var(--color-border-subtle); }
739
768
  .drawer-appearance > .group-label { padding-inline: var(--space-3); color: var(--color-muted); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
740
769
  .drawer-appearance > .segmented { justify-self: start; max-width: 100%; }
@@ -748,7 +777,9 @@
748
777
  html { scroll-padding-top: calc(var(--head-inset) + var(--space-4)); }
749
778
  .page-head { padding-block: var(--space-3); }
750
779
  .page-head:has(> .section-bar) { position: sticky; top: 0; z-index: 5; flex-wrap: nowrap; background: var(--color-bg); }
751
- .page-head:has(> .section-bar) > .site-name { min-width: 0; }
780
+ /* The site name is a touch target on one line; the bar's Clear gives way to it. */
781
+ .page-head > .site-name { min-height: var(--control-lg); white-space: nowrap; }
782
+ .page-head:has(> .section-bar) > .site-name { flex: none; }
752
783
  /* The buttons sit inside the scroll inset, so they cancel it; otherwise focusing one scrolls the page. */
753
784
  .page-head > .section-bar > * { scroll-margin-top: calc(-1 * (var(--head-inset) + var(--space-4))); }
754
785
  /* Without the script, the links take a second row and the rail stays in place above the content. */
@@ -769,15 +800,17 @@
769
800
  .check:not([data-size]), .switch:not([data-size]), .toggle:not([data-size]) { min-height: var(--control-lg); }
770
801
  .copy-link { width: var(--control-lg); height: var(--control-lg); }
771
802
  .crumbs a, .group-toggle { min-height: var(--control-lg); }
803
+ .intro > .crumbs > ol { margin-block: calc((1lh - var(--control-lg)) / 2) calc((var(--control-lg) - 1lh) / 2); }
772
804
  .folio-display { font-size: var(--text-display-sm); }
773
805
  }
774
806
  @media (max-width: 640px) {
775
807
  /* Phones: a dialog becomes a bottom sheet with rounded top corners. */
776
808
  dialog.dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--radius-panel) var(--radius-panel) 0 0; }
777
- /* Breadcrumbs show only the parent, as a back link. */
778
- .crumbs li:not(:nth-last-child(2)) { display: none; }
779
- .crumbs li::before { content: none; }
780
- .crumbs li:nth-last-child(2) a::before { content: "‹\a0" / ""; }
809
+ /* A trail of three or more crumbs shows only the parent, as a back link; a two-crumb trail fits in full. */
810
+ .crumbs ol:has(> li:nth-child(3)) > li:not(:nth-last-child(2)) { display: none; }
811
+ .crumbs ol:has(> li:nth-child(3)) > li::before { content: none; }
812
+ .crumbs ol:has(> li:nth-child(3)) > li:nth-last-child(2) a { position: relative; padding-inline-start: 0.875rem; }
813
+ .crumbs ol:has(> li:nth-child(3)) > li:nth-last-child(2) a::before { content: ""; position: absolute; inset-inline-start: 0.25rem; top: 50%; transform: translateY(-50%) rotate(-135deg); }
781
814
  .pager { grid-template-columns: minmax(0, 1fr); }
782
815
  .pager a[rel="next"] { grid-column: 1; }
783
816
  .definitions { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-1); }
@@ -819,7 +852,7 @@
819
852
  <div class="frame">
820
853
  <header class="page-head">
821
854
  <p class="site-name">Design system</p>
822
- <nav class="navlist strip" aria-label="Pages"><span class="group-label" aria-hidden="true">Pages</span><a href="reference.html#foundations">Foundations</a><a href="components.html" aria-current="page">Components</a><a href="reference.html">Application example</a><a href="docs.html">Documentation example</a><a href="product.html">Product page example</a></nav>
855
+ <nav class="navlist strip" aria-label="Pages"><span class="group-label" aria-hidden="true">Pages</span><a href="reference.html#foundations" data-label="Foundations">Foundations</a><a href="components.html" aria-current="page" data-label="Components">Components</a><a href="reference.html" data-label="Application example">Application example</a><a href="docs.html" data-label="Documentation example">Documentation example</a><a href="product.html" data-label="Product page example">Product page example</a></nav>
823
856
  <div class="segmented" role="group" aria-label="Appearance" data-live hidden>
824
857
  <button type="button" data-theme-choice="system" aria-pressed="true">System</button>
825
858
  <button type="button" data-theme-choice="light" aria-pressed="false">Light</button>
@@ -1312,11 +1345,11 @@
1312
1345
  <section class="component" id="breadcrumbs" data-layer="Core" aria-labelledby="breadcrumbs-title">
1313
1346
  <header><h3 id="breadcrumbs-title">Breadcrumbs</h3><span class="badge">Core</span><a href="components.md#breadcrumbs">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="breadcrumbs" aria-label="Copy link to Breadcrumbs" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1314
1347
  <p class="purpose">The path from the site to this page.</p>
1315
- <dl class="guidance"><dt>Do</dt><dd>Use breadcrumbs only at depth 3 or more, or on a page outside its site’s shell.</dd><dt>Don’t</dt><dd>A trail whose only crumb repeats the page’s h1.</dd></dl>
1348
+ <dl class="guidance"><dt>Do</dt><dd>Put the trail above the page’s h1 on every page below the site’s home page, and keep the site name in the header.</dd><dt>Don’t</dt><dd>A trail in the site header in place of the site name: the header changes from page to page, and the path reads as the page title.</dd></dl>
1316
1349
  <div class="row"><h4>Trail</h4><div class="states">
1317
1350
  <div class="state"><nav class="crumbs" aria-label="Breadcrumb, specimen"><ol><li><a href="#breadcrumbs">Design system</a></li><li><a href="#breadcrumbs">Components</a></li><li><span aria-current="page">Navigation</span></li></ol></nav><span class="caption">Rest, live; the current page is text</span></div>
1318
1351
  <div class="state" inert><nav class="crumbs" aria-label="Breadcrumb, pinned"><ol><li><a href="#breadcrumbs" class="is-hover">Design system</a></li><li><a href="#breadcrumbs" class="is-focus">Components</a></li><li><span aria-current="page">Navigation</span></li></ol></nav><span class="caption">Hover on Design system, focus visible on Components</span></div>
1319
- <div class="state" inert><nav class="crumbs is-back" aria-label="Breadcrumb, phone"><ol><li><a href="#breadcrumbs">Design system</a></li><li><a href="#breadcrumbs">Components</a></li><li><span aria-current="page">Navigation</span></li></ol></nav><span class="caption">Phone: the parent only, as a back link</span></div>
1352
+ <div class="state" inert><nav class="crumbs is-back" aria-label="Breadcrumb, phone"><ol><li><a href="#breadcrumbs">Design system</a></li><li><a href="#breadcrumbs">Components</a></li><li><span aria-current="page">Navigation</span></li></ol></nav><span class="caption">Phone, three or more crumbs: the parent only, as a back link</span></div>
1320
1353
  </div></div>
1321
1354
  </section>
1322
1355
 
@@ -1422,7 +1455,7 @@
1422
1455
  <div class="row"><h4>Closed</h4><div class="states">
1423
1456
  <div class="state wide"><div class="site-header">
1424
1457
  <details class="projects"><summary class="quiet-action" aria-label="Project: filip-stack"><span>filip-stack</span><svg class="icon" aria-hidden="true"><use href="#i-chevron-down"/></svg></summary><nav class="navlist" aria-label="Projects"><a href="#site-header">annoterm</a><a href="components.html" aria-current="page">filip-stack</a><a href="#site-header">ui</a></nav></details>
1425
- <div class="site-end"><nav class="navlist strip site-links" aria-label="Site links"><a href="components.html" aria-current="page">Docs</a><a href="#site-header">GitHub</a></nav>
1458
+ <div class="site-end"><nav class="navlist strip site-links" aria-label="Site links"><a href="components.html" aria-current="page" data-label="Docs">Docs</a><a href="#site-header" data-label="GitHub">GitHub</a></nav>
1426
1459
  <div class="segmented" role="group" aria-label="Color theme, sample" data-size="lg" data-icon-only><button type="button" aria-pressed="true" aria-label="System" title="System"><svg class="icon" aria-hidden="true" viewBox="0 0 16 16"><rect x="2" y="2.5" width="12" height="8.5" rx="1.5"/><path d="M5.5 14h5M8 11v3"/></svg></button><button type="button" aria-pressed="false" aria-label="Light" title="Light"><svg class="icon" aria-hidden="true" viewBox="0 0 16 16"><circle cx="8" cy="8" r="3"/><path d="M8 1.5v1.5M8 13v1.5M1.5 8H3M13 8h1.5M3.4 3.4l1 1M11.6 11.6l1 1M3.4 12.6l1-1M11.6 4.4l1-1"/></svg></button><button type="button" aria-pressed="false" aria-label="Dark" title="Dark"><svg class="icon" aria-hidden="true" viewBox="0 0 16 16"><path d="M13 9.5A5.5 5.5 0 0 1 6.5 3a5.5 5.5 0 1 0 6.5 6.5z"/></svg></button></div>
1427
1460
  </div>
1428
1461
  </div><span class="caption">Live: the project switcher opens, and Docs is the current page; the picker is a sample</span></div>
@@ -1574,14 +1607,17 @@
1574
1607
  if (value) value.value = `${r.value}%`;
1575
1608
  }));
1576
1609
 
1577
- // A list that scrolls sideways names its clipped ends in data-clip, so CSS fades only those edges.
1610
+ // A list that scrolls sideways names its clipped ends in data-clip, so CSS fades only those edges. An
1611
+ // edge with 12px or less hidden is not faded, because the fade would cover more than it hides. A focused
1612
+ // item scrolls clear of the fades, which the list's scroll-padding reserves.
1578
1613
  const trackClip = (list) => {
1579
1614
  const clip = () => {
1580
1615
  const hidden = list.scrollWidth - list.clientWidth;
1581
- const ends = [list.scrollLeft > 1 && 'start', list.scrollLeft < hidden - 1 && 'end'].filter(Boolean).join(' ');
1616
+ const ends = [list.scrollLeft > 12 && 'start', hidden - list.scrollLeft > 12 && 'end'].filter(Boolean).join(' ');
1582
1617
  if (ends) list.dataset.clip = ends; else delete list.dataset.clip;
1583
1618
  };
1584
1619
  list.addEventListener('scroll', clip, { passive: true });
1620
+ list.addEventListener('focusin', (e) => e.target.scrollIntoView({ block: 'nearest', inline: 'nearest' }));
1585
1621
  new ResizeObserver(clip).observe(list);
1586
1622
  };
1587
1623
 
@@ -306,10 +306,10 @@ Layer: Core. The mono font on rail rows is identity. ui: the rows in `UiSiteNav`
306
306
  - **Do.** Label a page link with the destination page's title, and an in-page link with its destination section's heading.
307
307
  - **Don't.** Actions such as Delete or Sign out in a navigation list. Every row is a link to a place; an action is a button.
308
308
  - **Phone triggers.** Two triggers open a navigation drawer, and each has its place. The site shell uses the header's icon-only Menu button: at tablet width its [section rail](#section-rail) moves into that drawer. A page-level contents drawer, such as a docs page's "On this page", keeps a labelled trigger: a secondary button at `--control-lg` with a three-line menu glyph (14×10, 1.5px lines) before the label. It shows the page's contents and does not act, so it takes the 10px field corner (`--radius-field`), at rest and pressed. The icon-only Menu button stays round. A page with the site shell's Menu does not add a second, labelled trigger. Without JavaScript the list opens in place, so the trigger is a `<details>` summary with the secondary button classes and a chevron after the label. It takes the same 10px field corner. Only the chevron is local.
309
- - **Horizontal strip.** A row of 6 links or fewer; beyond that, use a drawer. It uses these rows and states unchanged: the current page takes the lifted fill, and a location keeps its pip. It scrolls sideways with 2px padding, so the current row's shadow stays whole, and a clipped edge fades over 24px, as [tabs](#tabs) do.
309
+ - **Horizontal strip.** A row of 6 links or fewer; beyond that, use a drawer. It uses these rows and states unchanged: the current page takes the lifted fill, and a location keeps its pip. It scrolls sideways with 2px padding, so the current row's shadow stays whole, and a clipped edge fades over 24px, as [tabs](#tabs) do. An edge with 12px or less hidden does not fade. A focused row scrolls into view clear of the fades (`scroll-padding-inline: 24px`), and the strip shows no scrollbar (`scrollbar-width: none`), because the fade shows the overflow. Becoming current changes no row's width: each link carries its label in `data-label`, and a hidden copy of it at the current row's medium weight (`::after`, with empty alternative text and `margin-top: -1lh`, so it shares the label's line) sets the row's width. A strip in a drawer, where labels wrap, drops the copy, and so does a browser without the `lh` unit.
310
310
  - **Keyboard and screen reader.** Plain links in Tab order.
311
311
  - **Motion.** Fill, colour, and shadow change over `--duration-fast` with `--ease-out`.
312
- - **Forced colors.** Fills and shadows drop. The current page (`aria-current="page"`), and a rail's current section, take a 2px `Highlight` border on the leading edge. The location pip keeps its shape with `forced-color-adjust: none` and a `Highlight` fill, so page and location still differ.
312
+ - **Forced colors.** Fills and shadows drop. The current page (`aria-current="page"`), and a rail's current section, take a 2px `Highlight` border on the leading edge, and their leading padding gives up 2px for it, so the row keeps its width. The location pip keeps its shape with `forced-color-adjust: none` and a `Highlight` fill, so page and location still differ.
313
313
  - **List selection.** A selected row in a list or table (`aria-selected="true"`) takes the current-page recipe: `--color-nav-current` fill, `--shadow-nav-current`, medium weight, and its primary text in `--color-nav-current-text`, with no accent bar. Hover keeps that fill. Rows keep their own radius. Dividers between rows are straight 1px `--color-border-subtle` lines inset by the row's inline padding, drawn on the row, not as a shadow, and hidden next to a filled (hovered or selected) row. Forced colors: the fill and shadow drop, and the selected row takes a 2px `Highlight` border on its leading edge, as the current page does.
314
314
 
315
315
  ## Section rail
@@ -320,7 +320,7 @@ Layer: Core. ui: `UiSiteNav`.
320
320
  - **States.** Rows take the navigation list states. The current section keeps `aria-current="location"` but takes the current-page look: `--color-nav-current` fill, `--shadow-nav-current`, and `--color-nav-current-text` in medium weight, with no pip. When the location changes, the rail scrolls its own list, never the page, to centre the current row if it is out of view. It leaves the list alone while the pointer is over the rail or focus is inside it.
321
321
  - **Do.** Use a rail for the sections of a long page, or for a site's pages. A site's pages may take a navigation strip of 6 links or fewer instead.
322
322
  - **Don't.** A rail beside a strip or a contents list that holds the same links. Each level has one list.
323
- - **Tablet and phone.** At `max-width: 800px`, with JavaScript, the page header becomes one sticky row on `--color-bg`: the site name or a back link, then two icon-only secondary buttons at `--control-lg`, Find (a search icon) and Menu (a menu icon). Menu opens a [drawer](#drawer) titled "Menu" that holds, in order, the find field, the site's pages, the appearance control, and the rail's groups. Find opens the same drawer with the field focused. Both buttons set a negative `scroll-margin-top` equal to the page's scroll offset, so focusing one does not scroll the page. Without JavaScript nothing moves: the header keeps its links, and the rail stays in place above `main` with every row shown and the find field hidden.
323
+ - **Tablet and phone.** At `max-width: 800px`, with JavaScript, the page header becomes one sticky row on `--color-bg`: the site name, then two icon-only secondary buttons at `--control-lg`, Find (a search icon) and Menu (a menu icon). Menu opens a [drawer](#drawer) titled "Menu" that holds, in order, the find field, the site's pages, the appearance control, and the rail's groups. Find opens the same drawer with the field focused. Both buttons set a negative `scroll-margin-top` equal to the page's scroll offset, so focusing one does not scroll the page. Without JavaScript nothing moves: the header keeps its links, and the rail stays in place above `main` with every row shown and the find field hidden.
324
324
  - **Keyboard and screen reader.** Both buttons have `aria-haspopup="dialog"` and an `aria-label` ("Find a component", "Menu"). Location changes are not announced. The current section follows the [location tracking rule](DESIGN.md#navigation).
325
325
  - **Motion.** The rail scrolls its list at once. Rows change as in the navigation list.
326
326
  - **Forced colors.** The current section's fill and shadow drop, and it takes a 2px `Highlight` border on its leading edge, as the current page does.
@@ -343,11 +343,12 @@ Layer: Core. ui: none yet.
343
343
 
344
344
  Layer: Core. ui: none yet.
345
345
 
346
- - **Anatomy.** `<nav aria-label="Breadcrumb">` holding an `<ol>` in `--text-sm`. Separators are a `--color-muted` `/` drawn with `content: "/" / ""`, so they are not read. The crumbs, separators included, centre on the cap height like navigation rows, so they line up with the header strip. Ancestors are `--color-muted` links with no underline, at least `--control-sm` tall (`--control-lg` at tablet width), with `--radius-inline` corners. The current page is plain text with `aria-current="page"`, in `--color-text` and medium weight. On folio sites the trail is mono (identity).
346
+ - **Anatomy.** `<nav aria-label="Breadcrumb">` holding an `<ol>` in `--text-sm`, right above the page's h1. Separators are `--color-muted` chevrons, a 6px box (`0.375rem`) with 1.5px top and right borders turned 45°, so they hold no text to read. The labels centre on the cap height like navigation rows, and the chevrons centre on the row. Ancestors are `--color-muted` links with no underline, at least `--control-sm` tall (`--control-lg` at tablet width), with `--radius-inline` corners. The current page is plain text with `aria-current="page"`, in `--color-text` and medium weight. On folio sites the trail is mono (identity).
347
347
  - **States.** Hover: `--color-text` and an underline. Focus-visible: the focus ring.
348
- - **Do.** Use breadcrumbs only at depth 3 or more, or on a page outside its site's shell.
349
- - **Don't.** A trail whose only crumb repeats the page's h1.
350
- - **Phone.** At `max-width: 640px` only the parent shows, as a back link: "‹ Parent".
348
+ - **Do.** Put the trail above the page's h1 on every page below the site's home page, and keep the site name in the header.
349
+ - **Don't.** A trail in the site header in place of the site name: the header changes from page to page, and the path reads as the page title.
350
+ - **Placement.** A page-level trail sits on its text, not on its links' boxes: it moves up by half the room the box adds around the line, `calc((1lh - var(--control-sm)) / 2)` (`--control-lg` at tablet width), and takes the same room back below, so the h1 does not move.
351
+ - **Phone.** At `max-width: 640px` a trail of two crumbs shows in full. A trail of three or more shows only the parent, as a back link: the parent's name after a chevron that points back, drawn the same way, inside the link.
351
352
  - **Keyboard and screen reader.** Ancestors are links in Tab order. The current page is text, so it takes no Tab stop.
352
353
  - **Motion.** None: hover changes the colour and underline at once.
353
354
  - **Forced colors.** No change: links and text take the system colours.
@@ -467,10 +468,11 @@ Layer: Identity. ui: `UiCapture`.
467
468
  Layer: Identity. ui: `UiSiteHeader`, `UiSiteAppearancePicker`.
468
469
 
469
470
  - **Anatomy.** A static header at least 64px tall on `--color-bg` with a solid 1px `--color-text` rule below it. At the start is the project switcher: a `<details>` whose summary, a [quiet action](#quiet-action), shows the mono, semibold project name after a `~/` mark in `--color-project` (drawn by CSS, so it is not read), then a chevron. It keeps the quiet-action tint, but it opens a menu and does not act, so it takes the 10px field corner (`--radius-field`), as a select does. Its menu is a floating layer, with the dialog's tokens, listing the shared project registry in the order it defines, as navigation rows with concentric 12px corners (`calc(var(--radius-panel) - var(--space-1))`), with the current project marked `aria-current="page"`. At the end are the site links and the appearance picker: an icon-only segmented control at `lg`. The site links are a [navigation strip](#navigation-list) of rows 44px tall (`--control-lg`). A link to a page inside the site takes `aria-current="page"` on that page, with the current-page recipe.
471
+ - **Position.** The identity at the start is the same on every page: never a breadcrumb or a page title, which go above the page's h1 as [breadcrumbs](#breadcrumbs). The links sit at the same x on every page, and the current link is as wide as it is on other pages (see the [horizontal strip](#navigation-list)). A header that puts its links right after the identity, as this design system's site does with the site name `~/ Design system` linked to its home page (a `--control-sm` row with 6px corners, `--control-lg` at tablet width, underlined on hover), is a grid at `min-width: 801px` (`auto minmax(0, 1fr) auto`), so where the links start never depends on the page.
470
472
  - **States.** The project menu is closed or open; while open, its summary keeps the quiet action's hover tint. Site links take the navigation row states.
471
473
  - **Do.** Keep the same header and site links, six at most and in one order, on every page of a personal product site.
472
474
  - **Don't.** The site header on an application screen. An application keeps its own navigation.
473
- - **Phone.** The first row holds the identity and the picker. With three or more links, the links take a second row. A long identity becomes a [breadcrumb](#breadcrumbs) back link.
475
+ - **Phone.** The first row holds the identity and the picker. With three or more links, the links take a second row.
474
476
  - **Keyboard and screen reader.** The summary is named "Project: <name>". Escape closes the menu and returns focus to the summary; moving focus out of it closes it.
475
477
  - **Motion.** The chevron turns 180° while the menu is open, over `--duration-fast` with `--ease-out`. The menu itself opens at once.
476
478
  - **Forced colors.** The rule below the header takes the system text colour, and the menu and the site links follow the navigation list rules.
@@ -26,16 +26,18 @@ Each entry records a choice this language made, the options it rejected, and why
26
26
  | Navigation row corners | Core | Navigation rows, header and strip rows, list-selection rows, collapsible group labels, and tabs take 6px corners (`--radius-inline`), except rows inside a floating menu (see Floating-menu rows). The owner chose the more rectangular rows from the Gate M mockup (2026-11-09). | 10px (`--radius-field`), the previous corners, shared with fields. | 6px 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" |
27
27
  | Floating-menu rows | Core | Rows inside a floating menu, such as the project menu, are concentric with the 16px menu: `calc(var(--radius-panel) - var(--space-1))`, 12px, as select picker rows are. The owner approved it from the DS-3b comparison. | 6px like rail rows: a 6px row inside a 16px panel looks pinched. | 12px corners: `tests/catalogue/catalogue.spec.ts` "each component renders the corner radius of its role, and no other part has one" |
28
28
  | One-line non-action controls | Core | A one-line control that is not an action takes the 10px field corner (`--radius-field`), as a select does: the select, the project-menu trigger, the labelled contents trigger and its no-JavaScript summary ("On this page"), and the skip link. The project trigger keeps the quiet-action tint. The icon-only Menu button stays round. The owner chose it on 2026-11-10. | The pill (`--radius-control`): a pill means an action, and these controls open a menu or list, pick a value, or move focus. 16px (`--radius-panel`), like the menu and other floating layers: on a one-line control 40 to 44px tall it reads almost as a pill. | 10px corners: `tests/catalogue/catalogue.spec.ts` "each component renders the corner radius of its role, and no other part has one" |
29
- | Optical label centring | Core | A text-only navigation row and the breadcrumb centre their label on the cap height with `text-box: trim-both cap alphabetic`, inside `@supports`; a row becomes a block with `align-content: center` for it, and `--space-2` block padding keeps a wrapped label clear of its fill's edges. Browsers without `text-box` keep the flex centring of the line box. Buttons, tabs, and segmented options already centre their ink within 0.5px, so they are unchanged; Chromium does not trim a button's label in any case. | Centring the line box alone: it keeps descender room, so a label without descenders, such as "Overview", sat 1.25px above centre in the 44px header row (15.75px above the ink, 18.25px below). `text-box` on the flex row itself: Chromium trims only block containers, and the label's anonymous flex item does not inherit the trim. A fixed nudge in em: it depends on the font's metrics, which an identity can change. | label inside the fill, and level with the strip: `tests/site/site.spec.ts` "a wrapped navigation row or crumb keeps its label inside the fill and focus ring in ${colorScheme}", "the breadcrumb's labels sit level with the header strip in ${colorScheme}" |
29
+ | Optical label centring | Core | A text-only navigation row and the breadcrumb centre their label on the cap height with `text-box: trim-both cap alphabetic`, inside `@supports`; a row becomes a block with `align-content: center` for it, and `--space-2` block padding keeps a wrapped label clear of its fill's edges. Browsers without `text-box` keep the flex centring of the line box. Buttons, tabs, and segmented options already centre their ink within 0.5px, so they are unchanged; Chromium does not trim a button's label in any case. | Centring the line box alone: it keeps descender room, so a label without descenders, such as "Overview", sat 1.25px above centre in the 44px header row (15.75px above the ink, 18.25px below). `text-box` on the flex row itself: Chromium trims only block containers, and the label's anonymous flex item does not inherit the trim. A fixed nudge in em: it depends on the font's metrics, which an identity can change. | label inside the fill, and centred: `tests/site/site.spec.ts` "a wrapped navigation row or crumb keeps its label inside the fill and focus ring in ${colorScheme}", "the breadcrumb centres its link's ink in ${colorScheme}" |
30
30
  | 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 |
31
31
  | 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" |
32
32
  | Segmented touch size | Core | At tablet width an unsized segmented control sets `--item` to `--control-lg`. | 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 |
33
- | Phone header | Core | Option A: at tablet width, with JavaScript, the header is one sticky row with the site name or a back link, then Find and Menu icon buttons. The Menu drawer holds Find, the pages, the appearance control, and the page's sections. The buttons cancel the scroll offset with a negative `scroll-margin-top`, so focusing one does not scroll the page. Without JavaScript nothing moves. The owner chose it at Gate M. | The proposal's first design, a second sticky bar under the header with a "<Label>: <current row>" trigger and a Find button: the owner chose the single row instead. | drawer and header buttons: `tests/catalogue/catalogue.spec.ts` "Menu opens the drawer on the current row, and a link closes it and focuses the target", "opening the drawer or focusing a header button does not scroll the page"; header layout: no test yet |
33
+ | Phone header | Core | Option A: at tablet width, with JavaScript, the header is one sticky row with the site name, then Find and Menu icon buttons. The Menu drawer holds Find, the pages, the appearance control, and the page's sections. The buttons cancel the scroll offset with a negative `scroll-margin-top`, so focusing one does not scroll the page. Without JavaScript nothing moves. The owner chose it at Gate M. | The proposal's first design, a second sticky bar under the header with a "<Label>: <current row>" trigger and a Find button: the owner chose the single row instead. | drawer and header buttons: `tests/catalogue/catalogue.spec.ts` "Menu opens the drawer on the current row, and a link closes it and focuses the target", "opening the drawer or focusing a header button does not scroll the page"; header layout: no test yet |
34
34
  | 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, the pages, and the appearance control between the page and the drawer"; six-link strip limit: no test yet |
35
35
  | Purpose groups | Core | The catalogue and `components.md` group components by purpose (Actions, Selection, Inputs, Feedback and status, Containers and overlays, Navigation, Code and examples, then Identity). Each section keeps its Core or Identity badge, and the heading ids stay unchanged, so old deep links still work. | Core, then Identity, in build order: a reader had to know a component's layer to find it. Splitting the catalogue into pages: agents copy from and grep one file, and the hosts serve a fixed list of files. | No test yet |
36
36
  | Find and its shortcut | Core | A find field filters the rail; `/` focuses it. A saved switch in the rail footer turns single-key shortcuts off (WCAG 2.1.4), and the shortcut is ignored in editable elements and while a modal dialog is open. | No shortcut: Find is a long Tab away. A shortcut with no off switch: it fails WCAG 2.1.4 for speech and switch users. | shortcut and its switch: `tests/catalogue/catalogue.spec.ts` "/ focuses Find, types normally in a field, and does nothing once shortcuts are off" |
37
37
  | No command palette | Core | Find, which filters the rail, and no command palette. Revisit when a site has more than one searchable index. | A command palette: Find already covers a single-page catalogue and a site of about 25 skills. | No test yet |
38
38
  | One pager per page | Core | One pager at the end of `main`, for the sequence of pages. | A pager per component: on one page with a sticky rail it adds 26 repeated blocks. | No test yet |
39
+ | Header that stays still | Core | Option A: the design system's site header is the same on every page. The site name `~/ Design system` (mono, semibold, `~/` in `--color-accent`, as the project-menu trigger) links to Overview; the Pages strip follows it, and Appearance sits at the end. At `min-width: 801px` the header is a grid (`auto minmax(0, 1fr) auto`), so the links start at the same x on every page. Each strip link reserves its width at the current row's weight (a hidden `data-label` copy on the label's line), so becoming current moves nothing; under forced colors the current row's padding gives up 2px for its border. A link reached with Tab scrolls clear of the strip's fades. The owner chose it on 2026-11-11. | The flex row that centred the strip between the start item and Appearance: the start item was a breadcrumb that changed width from page to page, so the links started at x=674 on Overview and 451 to 465 elsewhere, and the current link's medium weight added 1–2px. Option B, the strip at the end beside Appearance: the owner chose A. A hidden copy in a 0-height block or a float: the block ended the label's text-box trim, so the label sat 3.4px high, and a float added its width to the label's. | `tests/site/site.spec.ts` "the header links sit at the same x on every page, and the current link keeps its width, with forced colors ${forcedColors}"; `tests/catalogue/catalogue.spec.ts` "a header link reached with Tab scrolls clear of the strip’s faded edges" |
40
+ | Breadcrumb above the title | Core | Every site page but the home page has a breadcrumb right above its h1, and the header keeps the site name. Separators, and the phone back mark, are chevrons drawn with two borders of a turned box. The trail sits on its text line, level with the Find field at 1280px, and shows in full on phones when it has two crumbs, as in the approved mock. The owner chose it with header option A on 2026-11-11. | The breadcrumb as the header's start item: it read as the page title and moved the strip. The depth-3 rule it replaces kept trails off a two-level site, which then had only the header to show the way back. A `/` or `‹` glyph with empty alternative text: the owner chose chevrons, and a chevron drawn with borders holds no text in any engine. | `tests/site/site.spec.ts` "the breadcrumb sits above the h1 on every page but Overview, with no separator text", "the breadcrumb lines up with Find, and shows both crumbs on phones" |
39
41
  | Header current page | Core | Header links are navigation rows 44px tall, and a link to the current page takes `aria-current="page"` with the current-page recipe. | Muted text links with no current state: the header did not show which page the reader was on. | No test yet |
40
42
  | One scroll offset | Core | `html { scroll-padding-top }` is the only offset: any sticky bar plus `--space-4`. The location tracker reads the same value. | `scroll-margin-top` on each section: every page set its own value, and the tracker needs one inset to compare against. | No test yet |
41
43
  | Specimen captions | Core | Every catalogue specimen has a caption that names its state, such as "Disabled" or "Rest, live". The owner chose it at Gate M. | Captions only on some specimens: a disabled or static specimen with no caption could read as broken. | every specimen captioned: `tests/catalogue/catalogue.spec.ts` "every specimen has a caption" |
@@ -26,7 +26,7 @@
26
26
  :is(.rail, .rail-specimen) a[aria-current="location"]::before { content: none; }
27
27
  /* Fills and shadows drop. The current page and the rail's current section take a system border; a
28
28
  location outside a rail keeps its pip, redrawn in the system highlight. */
29
- @media (forced-colors: active) { .navlist a[aria-current="page"] { border-inline-start: 2px solid Highlight; } .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; } }
29
+ @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); } }
30
30
  main { min-width: 0; display: grid; gap: var(--space-12); padding-block: var(--space-8) var(--space-16); }
31
31
  section { display: grid; gap: var(--space-4); min-width: 0; }
32
32
  h1, h2 { font-family: var(--font-mono); }
@@ -35,7 +35,7 @@
35
35
  /* Fills and shadows drop. The current page takes a system border; the in-page location keeps
36
36
  its pip, redrawn in the system highlight, so the two still differ. */
37
37
  @media (forced-colors: active) {
38
- .navlist a[aria-current="page"], .nav-current-sample { border-inline-start: 2px solid Highlight; }
38
+ .navlist a[aria-current="page"], .nav-current-sample { border-inline-start: 2px solid Highlight; padding-inline-start: calc(var(--space-3) - 2px); }
39
39
  .navlist a[aria-current="location"]::before, .pip-sample::before { forced-color-adjust: none; background: Highlight; }
40
40
  }
41
41
  .sidebar .navlist a { gap: var(--space-2); }
@@ -388,6 +388,8 @@
388
388
  /* The pip and current-row samples take their state from the navigation row rules above. */
389
389
  .pip-sample { position: relative; display: inline-flex; align-items: center; min-height: var(--row); padding: 0 var(--space-3); font-size: var(--text-sm); }
390
390
  .nav-current-sample { display: inline-flex; align-items: center; min-height: var(--row); padding: 0 var(--space-3); border-radius: var(--radius-inline); font-size: var(--text-sm); }
391
+ /* The sample's padding above resets the forced-colors trade made with the row rules, so it is made again here. */
392
+ @media (forced-colors: active) { .nav-current-sample { padding-inline-start: calc(var(--space-3) - 2px); } }
391
393
  .header-rule { display: block; height: 0; border-top: 1px solid var(--color-text); }
392
394
  .elevation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); padding: var(--space-6); border-radius: var(--radius-panel); background: var(--color-bg); }
393
395
  .elevation > div { display: grid; gap: var(--space-1); padding: var(--space-4); border-radius: var(--radius-panel); background: var(--color-surface-raised); font-size: var(--text-sm); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@filipgutica/design-system",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Filip's design language, tokens, and component catalogue for any framework",
5
5
  "type": "module",
6
6
  "sideEffects": [