@filipgutica/design-system 1.0.36 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/language/components.html +17 -9
- package/language/components.md +5 -5
- package/language/decisions.md +2 -2
- package/language/docs.html +5 -3
- package/language/product.html +3 -3
- package/language/reference.html +5 -2
- package/language/ui-sdk.css +2 -1
- package/package.json +1 -1
package/language/components.html
CHANGED
|
@@ -364,7 +364,7 @@
|
|
|
364
364
|
.dialog-body { min-height: 0; overflow: auto; padding: var(--space-4); }
|
|
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
|
-
.close { flex: none; width: var(--control-
|
|
367
|
+
.close { flex: none; width: var(--control-md); min-height: var(--control-md); padding: 0; color: var(--color-muted); }
|
|
368
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); }
|
|
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); }
|
|
@@ -635,7 +635,7 @@
|
|
|
635
635
|
.code-head b { font-weight: var(--weight-semibold); }
|
|
636
636
|
.code-head .lang { color: var(--color-muted); }
|
|
637
637
|
/* Copy is a quiet action; this sets its size and place. */
|
|
638
|
-
.copy { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; min-width: var(--control-
|
|
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
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
640
|
.code .copy { color: var(--color-muted); }
|
|
641
641
|
.code .copy[data-copied] { color: var(--color-code-text); }
|
|
@@ -655,6 +655,8 @@
|
|
|
655
655
|
/* The panel fills the row beside Copy, so it sits --space-1 from the frame and from Copy on every side, and centres its line. */
|
|
656
656
|
.code.compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-1); }
|
|
657
657
|
.code.compact pre { align-content: center; padding: var(--space-2) var(--space-3); }
|
|
658
|
+
/* Copy keeps its control height and centres on the panel's line. */
|
|
659
|
+
.code.compact > .copy { align-self: center; }
|
|
658
660
|
|
|
659
661
|
/* Code block with a live example: a live stage over its source, in one frame. */
|
|
660
662
|
.example { width: 100%; min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--color-border-subtle); border-radius: var(--radius-panel); background: var(--color-bg); }
|
|
@@ -689,9 +691,9 @@
|
|
|
689
691
|
}
|
|
690
692
|
.capture-head { display: flex; align-items: center; min-width: 0; }
|
|
691
693
|
.capture .tablist { flex: 1; width: auto; padding-inline: var(--space-2); }
|
|
692
|
-
.capture .tab {
|
|
694
|
+
.capture .tab { font-family: var(--font-mono); font-size: var(--text-sm); }
|
|
693
695
|
/* Full size is a quiet action; this sets its size and place. */
|
|
694
|
-
.full { display: inline-flex; align-items: center; gap: 0.375rem; flex: none; min-height: var(--control-
|
|
696
|
+
.full { display: inline-flex; align-items: center; gap: 0.375rem; flex: none; min-height: var(--control-md); padding: 0 var(--space-3); color: var(--color-muted); font-size: var(--text-sm); }
|
|
695
697
|
/* Inset: the panel clips its content. */
|
|
696
698
|
.capture .full.quiet-action:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
|
|
697
699
|
.capture .tabpanel { padding-top: 0; color: inherit; }
|
|
@@ -736,7 +738,7 @@
|
|
|
736
738
|
.site-header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); min-height: var(--space-16); padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--color-text); background: var(--color-bg); width: 100%; }
|
|
737
739
|
.projects { position: relative; }
|
|
738
740
|
/* The trigger is a quiet action; this sets its size and type. */
|
|
739
|
-
.projects > summary { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-
|
|
741
|
+
.projects > summary { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-md); padding-inline: var(--space-3); border-radius: var(--radius-field); font-family: var(--font-mono); font-weight: var(--weight-semibold); list-style: none; user-select: none; }
|
|
740
742
|
.projects > summary::-webkit-details-marker { display: none; }
|
|
741
743
|
/* The ~/ mark is decorative: the empty alternative text keeps it out of the name. */
|
|
742
744
|
.projects > summary::before { content: "~/" / ""; color: var(--color-project); }
|
|
@@ -749,8 +751,8 @@
|
|
|
749
751
|
/* Rows sit --space-1 inside the menu, so they are concentric with it, as select picker rows are. */
|
|
750
752
|
.projects .navlist a { border-radius: calc(var(--radius-panel) - var(--space-1)); font-family: var(--font-mono); }
|
|
751
753
|
.site-end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-6); margin-left: auto; }
|
|
752
|
-
/* The site links are a navigation strip at the
|
|
753
|
-
.site-links a { min-height: var(--control-
|
|
754
|
+
/* The site links are a navigation strip at the control height; they grow to --control-touch at tablet width. */
|
|
755
|
+
.site-links a { min-height: var(--control-md); }
|
|
754
756
|
|
|
755
757
|
/* Page type and helpers */
|
|
756
758
|
.folio-h2 { font: var(--weight-semibold) var(--text-xl) / var(--leading-tight) var(--font-mono); letter-spacing: var(--tracking-tight); }
|
|
@@ -864,8 +866,8 @@
|
|
|
864
866
|
.page-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--space-8); }
|
|
865
867
|
.page-head > .strip { justify-self: start; }
|
|
866
868
|
}
|
|
867
|
-
/* Header links are navigation rows at the
|
|
868
|
-
.page-head .strip a { min-height: var(--control-
|
|
869
|
+
/* Header links are navigation rows at the control height; they grow to --control-touch at tablet width. */
|
|
870
|
+
.page-head .strip a { min-height: var(--control-md); }
|
|
869
871
|
.layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); gap: var(--space-8); }
|
|
870
872
|
/* One column that may shrink below its content, so a long title or specimen cannot widen the page.
|
|
871
873
|
A short page, such as one left by a find with no matches, keeps its rows at the top. */
|
|
@@ -907,6 +909,8 @@
|
|
|
907
909
|
.rail-specimen { display: grid; gap: var(--space-3); width: 240px; }
|
|
908
910
|
.phone-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); width: min(100%, 360px); padding-block: var(--space-2); border-bottom: 1px solid var(--color-text); }
|
|
909
911
|
.phone-head > .strip { flex-basis: 100%; margin-inline: -2px; }
|
|
912
|
+
/* The phone header samples show the touch size at every width. */
|
|
913
|
+
.phone-head .projects > summary, .phone-head > .strip a { min-height: var(--control-touch); }
|
|
910
914
|
/* At 640px and narrower, one or two links stay on the switcher's row as plain text links, 12px apart:
|
|
911
915
|
no row padding or hover fill, and the current page in the accent with no fill. The picker ends the row;
|
|
912
916
|
where all of it does not fit, as at 320px, only the picker wraps. */
|
|
@@ -978,6 +982,10 @@
|
|
|
978
982
|
.search { height: var(--control-touch); }
|
|
979
983
|
.check:not([data-specimen="size"] *), .switch:not([data-specimen="size"] *), .toggle:not([data-specimen="size"] *) { min-height: var(--control-touch); }
|
|
980
984
|
.copy-link { width: var(--control-touch); height: var(--control-touch); }
|
|
985
|
+
/* Quiet actions in docs components: 32px on desktop, 44px here. */
|
|
986
|
+
.close { width: var(--control-touch); }
|
|
987
|
+
.copy { min-width: var(--control-touch); }
|
|
988
|
+
.close, .copy, .full, .projects > summary, .page-head .strip a { min-height: var(--control-touch); }
|
|
981
989
|
.chip { min-height: var(--control-touch); }
|
|
982
990
|
/* Touch: the hover toolbar never shows; a tap opens the thread, whose header holds More. */
|
|
983
991
|
.msg-tools { display: none; }
|
package/language/components.md
CHANGED
|
@@ -72,7 +72,7 @@ Layer: Core.
|
|
|
72
72
|
|
|
73
73
|
Layer: Core.
|
|
74
74
|
|
|
75
|
-
- **Anatomy.** A native `<button>`, or the `<summary>` of a menu. Transparent fill, a transparent 1px border, `--radius-control`, and `--color-muted`. The project trigger overrides the corner with `--radius-field`, because it opens a menu and does not act (see [Site header](#site-header)). The content is centred in the box. An icon-only action holds an SVG icon, never a text glyph such as ×, because a font draws a glyph's ink off the centre of its box. Give the shared recipe zero specificity (`:where()`), so each component sets the action's size, place, and resting colour.
|
|
75
|
+
- **Anatomy.** A native `<button>`, or the `<summary>` of a menu. Transparent fill, a transparent 1px border, `--radius-control`, and `--color-muted`. The project trigger overrides the corner with `--radius-field`, because it opens a menu and does not act (see [Site header](#site-header)). The content is centred in the box. An icon-only action holds an SVG icon, never a text glyph such as ×, because a font draws a glyph's ink off the centre of its box. Give the shared recipe zero specificity (`:where()`), so each component sets the action's size, place, and resting colour. On a docs page, Copy, close, Full size, and the project trigger are `--control-md` (32px) tall, and `--control-touch` at tablet width.
|
|
76
76
|
- **States.** Hover turns the text `--color-text` and fills `currentColor` at 6% over transparent, only where the pointer can hover (`@media (hover: hover)`). Pressed fills `currentColor` at 12%, with no sink. Focus-visible is the focus ring, inset where the parent clips. An open menu keeps its trigger at the 6% hover tint, below the press. The code block's Copy is `--color-muted` at rest and takes the block's text colour (`--color-code-text`) on hover and while its tick shows. A disabled quiet action follows the shared [disabled](#rules-for-every-control) rule.
|
|
77
77
|
- **Do.** Use it for an action inside a component: Copy in a code block or command list, close in a dialog or drawer, Full size on a capture, the project trigger, and the overflow menu trigger. Use it too for any icon-only action that needs no fill at rest, such as the utilities in a sidebar footer or Help at the end of an action bar. In a row of controls it is a square at that row's control size, and it grows to `--control-touch` at tablet width.
|
|
78
78
|
- **Don't.** A labelled action that stands on its own in the page, such as Save or Next. That is a button. A lone icon that needs a fill at rest, such as Send: that is an icon-only button, a circle.
|
|
@@ -301,7 +301,7 @@ Layer: Core.
|
|
|
301
301
|
|
|
302
302
|
Layer: Core.
|
|
303
303
|
|
|
304
|
-
- **Anatomy.** A floating layer centred on an `--color-overlay` backdrop, at most 512px wide and 672px tall. It has a header (title in 18px semibold with an optional muted description, and a
|
|
304
|
+
- **Anatomy.** A floating layer centred on an `--color-overlay` backdrop, at most 512px wide and 672px tall. It has a header (title in 18px semibold with an optional muted description, and a 32px close button, `--control-touch` at tablet width), a body that scrolls, and an optional footer on `--color-surface` with its actions at the end. Rules between the parts are `--color-border-subtle`. On phones it becomes a bottom sheet with rounded top corners.
|
|
305
305
|
- **Tokens.** `--color-surface-raised`, a transparent 1px border, `--radius-panel`, `--shadow-dialog`. The close button is a [quiet action](#quiet-action).
|
|
306
306
|
- **States.** Closed and open. When focus lands on the dialog itself, it shows the focus ring.
|
|
307
307
|
- **Do.** Use a dialog for a short task the reader must finish or cancel before the page continues, such as confirming a deletion. Title it with that task.
|
|
@@ -539,9 +539,9 @@ Layer: Core.
|
|
|
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
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.
|
|
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
|
-
- **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.
|
|
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
543
|
- **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
|
-
- **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 44×44 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.
|
|
544
|
+
- **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
545
|
- **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
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
547
|
- **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.
|
|
@@ -595,7 +595,7 @@ Layer: Identity.
|
|
|
595
595
|
|
|
596
596
|
Layer: Identity.
|
|
597
597
|
|
|
598
|
-
- **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 8px 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 8px 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
|
|
598
|
+
- **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 8px 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 8px 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 `--control-md` tall (32px), and `--control-touch` at tablet width. A link to a page inside the site takes `aria-current="page"` on that page, with the current-page recipe.
|
|
599
599
|
- **Position.** Every family site, this design system's site included, starts its header with the project switcher. It is the same on every page: never a breadcrumb or a page title, which go above the page's h1 as [breadcrumbs](#breadcrumbs), and the first breadcrumb is the way back to the site's home page. 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 switcher, as this design system's site does, is a grid at `min-width: 801px` (`auto minmax(0, 1fr) auto`), so where the links start never depends on the page.
|
|
600
600
|
- **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.
|
|
601
601
|
- **Do.** Keep the same header and site links, six at most and in one order, on every page of a personal product site.
|
package/language/decisions.md
CHANGED
|
@@ -42,7 +42,7 @@ Each entry records a choice this language made, the options it rejected, and why
|
|
|
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
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" |
|
|
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
|
|
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
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" |
|
|
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) |
|
|
@@ -56,7 +56,7 @@ Each entry records a choice this language made, the options it rejected, and why
|
|
|
56
56
|
| 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 |
|
|
57
57
|
| Header that stays still | Core | Option A: the design system's site header is the same on every page. The project switcher `~/ Design system` starts it, as on every family site; the Pages strip follows it, and Appearance, the icon-only segmented control, sits at the end. The first breadcrumb leads back to Overview. Until 2026-11-11 the start was the site name as a link to Overview. 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" |
|
|
58
58
|
| Breadcrumb above the title | Core | Every site page but the home page has a breadcrumb right above its h1, and the header keeps the project switcher. 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" |
|
|
59
|
-
| Header current page | Core | Header links are navigation rows
|
|
59
|
+
| Header current page | Core | Header links are navigation rows `--control-md` tall (32px), `--control-touch` at tablet width, 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. 44px rows at every width (until 2026-11-24): the owner found them too thick beside the 32px controls. | heights: `tests/site/site.spec.ts` "links and icon actions keep their sizes and hit areas" |
|
|
60
60
|
| 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 |
|
|
61
61
|
| 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" |
|
|
62
62
|
| Focus ring | Core | One accent ring for every role but fields: `outline: var(--focus-width) solid var(--color-focus); outline-offset: var(--focus-offset)` (2px, 3px), with no glow, over the control's own shadow. Variants recolour it with `outline-color` only. `--color-focus` is `--color-accent`: 6.26:1 on the page, 5.72:1 on a surface, and 6.61:1 on a raised surface in light; 8.31:1, 7.85:1, and 7.39:1 in dark. Commands use the normal code block ring: the accent on `--color-code` (5.72:1 in light and 7.85:1 in dark). Terminal captures use `--color-project-dark`: 8.53:1 on the terminal plate. Inspired by Astryx `focusDefaults` (`utils/focusOutline.stylex.ts`), which writes the width, accent colour, and offset once from tokens. The user chose it from rendered demos and accepted an accent ring around primary, danger, and selected controls. | The neutral ink ring (`--color-focus: var(--color-text)`, offset 2px), the previous choice; the user preferred the accent ring with a 3px gap in rendered demos. Before that, an accent ring on controls and a `--color-link` ring on links, tabs, and navigation rows: two ring hues, cyan around the purple selected tab and current row. A ring in each control's own tone, such as `--color-error` around the danger button: every role needs its own ring rule, and the ring changes colour from control to control. A 2px ring with a 6px accent halo felt jarring, and a 1.5px ring was hard to see; Chromium drew it 1px at 1x. | one accent ring: `tests/design-foundations.test.mjs` "every focus ring is the one accent ring: no per-role ring colour or hand-written ring on any page or in tokens.css"; ring contrast: `tests/design-foundations.test.mjs` "the accent focus ring reaches 3:1 on --color-bg, --color-surface, and --color-surface-raised in both themes" |
|
package/language/docs.html
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
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
|
-
.header a { display: inline-flex; align-items: center; min-height: var(--control-
|
|
15
|
+
.header a { display: inline-flex; align-items: center; min-height: var(--control-md); font-size: var(--text-sm); }
|
|
16
16
|
.layout { display: grid; grid-template-columns: var(--sidebar) 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. */
|
|
@@ -42,7 +42,7 @@ p { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-
|
|
|
42
42
|
/* Compact code block: components.html#code-block, unchanged. */
|
|
43
43
|
.code { width: 100%; max-width: var(--measure); min-width: 0; overflow: hidden; padding: var(--space-1); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-panel); background: var(--color-surface-raised); color: var(--color-code-text); box-shadow: var(--shadow-surface); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
|
|
44
44
|
/* Copy is a quiet action; this sets its size and place. */
|
|
45
|
-
.copy { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; min-width: var(--control-
|
|
45
|
+
.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
46
|
/* 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
47
|
.code .copy { color: var(--color-muted); }
|
|
48
48
|
.code .copy[data-copied] { color: var(--color-code-text); }
|
|
@@ -59,6 +59,8 @@ p { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-
|
|
|
59
59
|
/* The panel fills the row beside Copy, so it sits --space-1 from the frame and from Copy on every side, and centres its line. */
|
|
60
60
|
.code.compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-1); }
|
|
61
61
|
.code.compact pre { align-content: center; padding: var(--space-2) var(--space-3); }
|
|
62
|
+
/* Copy keeps its control height and centres on the panel's line. */
|
|
63
|
+
.code.compact > .copy { align-self: center; }
|
|
62
64
|
|
|
63
65
|
/* The prompt is drawn by CSS, so copied and spoken text omit it. */
|
|
64
66
|
.code.command .line::before { content: "$ " / ""; flex: none; white-space: pre; color: var(--color-accent); user-select: none; }
|
|
@@ -73,7 +75,7 @@ p { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-
|
|
|
73
75
|
.definitions dt { font-family: var(--font-mono); font-size: var(--text-sm); }
|
|
74
76
|
.definitions dd { margin: 0; color: var(--color-muted); }
|
|
75
77
|
footer { padding-block: var(--space-6); border-top: 1px solid var(--color-border-subtle); color: var(--color-muted); font-size: var(--text-sm); }
|
|
76
|
-
@media (max-width: 800px) { .navlist a { min-height: var(--control-touch); } .layout { grid-template-columns: minmax(0, 1fr); gap: 0; } .sidebar { position: static; display: flex; flex-wrap: wrap; gap: var(--space-2); padding-block: var(--space-3); border-bottom: 1px solid var(--color-border-subtle); } .sidebar a { padding-inline: var(--space-2); } main { padding-top: var(--space-6); } .definitions { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); } .definitions dd { margin-bottom: var(--space-3); } }
|
|
78
|
+
@media (max-width: 800px) { .navlist a, .header a { min-height: var(--control-touch); } .copy { min-width: var(--control-touch); min-height: var(--control-touch); } .layout { grid-template-columns: minmax(0, 1fr); gap: 0; } .sidebar { position: static; display: flex; flex-wrap: wrap; gap: var(--space-2); padding-block: var(--space-3); border-bottom: 1px solid var(--color-border-subtle); } .sidebar a { padding-inline: var(--space-2); } main { padding-top: var(--space-6); } .definitions { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); } .definitions dd { margin-bottom: var(--space-3); } }
|
|
77
79
|
@media (max-width: 640px) { .frame { width: calc(100% - var(--space-8)); } main { gap: var(--space-8); } }
|
|
78
80
|
</style>
|
|
79
81
|
</head>
|
package/language/product.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
.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); }
|
|
11
11
|
.brand { color: var(--color-text); font-weight: var(--weight-semibold); }
|
|
12
12
|
.header nav { display: flex; gap: var(--space-6); }
|
|
13
|
-
.header a { display: inline-flex; align-items: center; min-height: var(--control-
|
|
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
16
|
h1, .workflow > h2 { font-family: var(--font-mono); }
|
|
@@ -25,7 +25,7 @@ h1 { max-width: 18ch; font-size: var(--text-display); letter-spacing: var(--trac
|
|
|
25
25
|
.btn:not(.secondary, .ghost, .danger, .text):is(:active, [aria-pressed="true"], .is-active):not(:disabled) { background: var(--color-button-hover); }
|
|
26
26
|
.btn:not(.text):is(:active, [aria-pressed="true"], .is-active):not(:disabled) { --depth: var(--shadow-sink); transform: translateY(1px); }
|
|
27
27
|
a.btn { text-decoration: none; }
|
|
28
|
-
.actions > a { min-height: var(--control-
|
|
28
|
+
.actions > a { min-height: var(--control-md); display: inline-flex; align-items: center; }
|
|
29
29
|
figure { margin: 0; min-width: 0; }
|
|
30
30
|
/* Product evidence sits in a well: one quiet frame, no frame around it. */
|
|
31
31
|
.product-view { background: var(--color-surface); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-panel); overflow: hidden; }
|
|
@@ -56,7 +56,7 @@ figcaption { margin-top: var(--space-3); font-size: var(--text-sm); color: var(-
|
|
|
56
56
|
.evidence-copy h3 { font-size: var(--text-lg); }
|
|
57
57
|
.evidence-copy p { color: var(--color-muted); font-size: var(--text-reading); }
|
|
58
58
|
footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-6); border-top: 1px solid var(--color-border-subtle); color: var(--color-muted); font-size: var(--text-sm); }
|
|
59
|
-
@media (max-width: 800px) { h1 { font-size: var(--text-display-sm); } .workflow > h2 { font-size: var(--text-2xl); } .hero { padding-block: var(--space-8); } .board { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4); } .evidence { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); } .checks { padding-inline: var(--space-4); } .workflow { padding-block: var(--space-8); } .view-header { padding: var(--space-4); } .btn:not([data-specimen="size"] *) { min-height: var(--control-touch); } }
|
|
59
|
+
@media (max-width: 800px) { h1 { font-size: var(--text-display-sm); } .workflow > h2 { font-size: var(--text-2xl); } .hero { padding-block: var(--space-8); } .board { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4); } .evidence { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); } .checks { padding-inline: var(--space-4); } .workflow { padding-block: var(--space-8); } .view-header { padding: var(--space-4); } .btn:not([data-specimen="size"] *), .header a, .actions > a { min-height: var(--control-touch); } }
|
|
60
60
|
@media (max-width: 640px) { .frame { width: calc(100% - var(--space-8)); } }
|
|
61
61
|
</style>
|
|
62
62
|
</head>
|
package/language/reference.html
CHANGED
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
.code-head b { font-weight: var(--weight-semibold); }
|
|
289
289
|
.code-head .lang { color: var(--color-muted); }
|
|
290
290
|
/* Copy is a quiet action; this sets its size and place. */
|
|
291
|
-
.copy { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; min-width: var(--control-
|
|
291
|
+
.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; }
|
|
292
292
|
/* 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. */
|
|
293
293
|
.code .copy { color: var(--color-muted); }
|
|
294
294
|
.code .copy[data-copied] { color: var(--color-code-text); }
|
|
@@ -307,6 +307,8 @@
|
|
|
307
307
|
/* The panel fills the row beside Copy, so it sits --space-1 from the frame and from Copy on every side, and centres its line. */
|
|
308
308
|
.code.compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-1); }
|
|
309
309
|
.code.compact pre { align-content: center; padding: var(--space-2) var(--space-3); }
|
|
310
|
+
/* Copy keeps its control height and centres on the panel's line. */
|
|
311
|
+
.code.compact > .copy { align-self: center; }
|
|
310
312
|
|
|
311
313
|
/* Command plate: components.html#command-plate, unchanged. */
|
|
312
314
|
/* The prompt is drawn by CSS, so copied and spoken text omit it. */
|
|
@@ -424,6 +426,7 @@
|
|
|
424
426
|
.segmented button { min-width: calc(var(--item) - 2 * var(--inset)); }
|
|
425
427
|
.btn:not([data-specimen="size"] *), .navlist a, .tab { min-height: var(--control-touch); }
|
|
426
428
|
.search { height: var(--control-touch); }
|
|
429
|
+
.copy { min-width: var(--control-touch); min-height: var(--control-touch); }
|
|
427
430
|
.check:not([data-specimen="size"] *) { min-height: var(--control-touch); }
|
|
428
431
|
.shell { grid-template-columns: minmax(0, 1fr); height: auto; }
|
|
429
432
|
main { overflow: visible; }
|
|
@@ -721,7 +724,7 @@
|
|
|
721
724
|
<li class="spec" data-token="--control-sm"><div class="spec-meta"><code>--control-sm</code><span class="value"></span></div><i class="height-bar" style="height:var(--control-sm)"></i></li>
|
|
722
725
|
<li class="spec" data-token="--control-md"><div class="spec-meta"><code>--control-md</code><span class="value"></span></div><i class="height-bar" style="height:var(--control-md)"></i></li>
|
|
723
726
|
<li class="spec" data-token="--control-lg"><div class="spec-meta"><code>--control-lg</code><span class="value"></span></div><i class="height-bar" style="height:var(--control-lg)"></i></li>
|
|
724
|
-
<li class="spec" data-token="--control-touch"><div class="spec-meta"><code>--control-touch</code><span class="value"></span><span class="use">Touch targets: every control
|
|
727
|
+
<li class="spec" data-token="--control-touch"><div class="spec-meta"><code>--control-touch</code><span class="value"></span><span class="use">Touch targets: every control, navigation row, and quiet action at tablet width</span></div><i class="height-bar" style="height:var(--control-touch)"></i></li>
|
|
725
728
|
</ul>
|
|
726
729
|
</section>
|
|
727
730
|
|
package/language/ui-sdk.css
CHANGED
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
[data-slot="dialog-title"] { margin: 0; font-size: 1.125rem; font-weight: var(--weight-semibold); letter-spacing: -0.02em; }
|
|
181
181
|
[data-slot="dialog-description"] { margin: var(--space-1) 0 0; color: var(--color-muted); }
|
|
182
182
|
/* The header's close button, in a dialog or a drawer, is a quiet action. A Close rendered as a Button is drawn as that button. */
|
|
183
|
-
:is([data-slot="dialog-content"], [data-slot="drawer-content"]) > header > :is([data-slot="dialog-close"], [data-slot="drawer-close"]) { display: inline-flex; flex: none; align-items: center; justify-content: center; width: var(--control-
|
|
183
|
+
:is([data-slot="dialog-content"], [data-slot="drawer-content"]) > header > :is([data-slot="dialog-close"], [data-slot="drawer-close"]) { display: inline-flex; flex: none; align-items: center; justify-content: center; width: var(--control-md); min-height: var(--control-md); padding: 0; border: 1px solid transparent; border-radius: var(--radius-control); background: transparent; color: var(--color-muted); font: inherit; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
|
|
184
184
|
@media (hover: hover) {
|
|
185
185
|
:is([data-slot="dialog-content"], [data-slot="drawer-content"]) > header > :is([data-slot="dialog-close"], [data-slot="drawer-close"]):hover { color: var(--color-text); background: color-mix(in srgb, currentColor 6%, transparent); }
|
|
186
186
|
}
|
|
@@ -358,6 +358,7 @@
|
|
|
358
358
|
[data-slot="segmented-control"][data-orientation="horizontal"]:is(:not([data-size]), [data-size]) { --item: var(--control-touch); }
|
|
359
359
|
[data-slot="tabs-list"][data-orientation="horizontal"]:is(:not([data-size]), [data-size]) > [data-slot="tabs-tab"] { min-height: var(--control-touch); }
|
|
360
360
|
[data-slot="slider"][data-orientation="horizontal"]:is(:not([data-size]), [data-size]) > [data-slot="slider-control"] { height: var(--control-touch); }
|
|
361
|
+
:is([data-slot="dialog-content"], [data-slot="drawer-content"]) > header > :is([data-slot="dialog-close"], [data-slot="drawer-close"]) { width: var(--control-touch); min-height: var(--control-touch); }
|
|
361
362
|
}
|
|
362
363
|
|
|
363
364
|
@media (forced-colors: active) {
|