@filipgutica/design-system 1.0.1 → 1.0.3
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/README.md +1 -1
- package/language/DESIGN.md +4 -4
- package/language/components.html +7 -4
- package/language/components.md +5 -5
- package/language/decisions.md +5 -8
- package/language/reference.html +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ pnpm verify
|
|
|
55
55
|
semantic-release publishes from `main` with npm provenance. Releases stay 1.0.x while the design system has no outside users ([decisions.md](language/decisions.md), Versioning):
|
|
56
56
|
|
|
57
57
|
- Any commit that releases, such as `fix`, `feat`, or a breaking change, releases a patch.
|
|
58
|
-
- The release notes name a breaking change only when its commit message has `!` after the type or a `BREAKING CHANGE:` footer. Put it there; a marker only in the PR body releases a patch but does not reach the notes.
|
|
58
|
+
- The release notes name a breaking change only when its commit message has `!` after the type or a `BREAKING CHANGE:` or `BREAKING-CHANGE:` footer. Put it there; a marker only in the PR body releases a patch but does not reach the notes.
|
|
59
59
|
- `build`, `chore`, `docs`, `test`, and similar types release nothing, unless the commit or its PR marks a breaking change.
|
|
60
60
|
- Release tags are `ds-v*`. The `v1.0.0`–`v2.4.0` tags and npm versions are the earlier series.
|
|
61
61
|
|
package/language/DESIGN.md
CHANGED
|
@@ -128,14 +128,14 @@ Controls use quiet depth and familiar shapes: borderless surfaces with one tight
|
|
|
128
128
|
|
|
129
129
|
| Role | Shape | Token | Members |
|
|
130
130
|
| --- | --- | --- | --- |
|
|
131
|
-
| Acts, or sets a value on one line | Pill | `--radius-control` | Buttons, quiet actions, and segmented controls with their thumbs |
|
|
131
|
+
| 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 |
|
|
132
132
|
| Small state mark | Pill | `--radius-pill` | Status badges, switch tracks and knobs, slider and progress tracks, score pips, and the in-page location pip |
|
|
133
|
-
| A place, or a row you pick | 6px | `--radius-inline` | Navigation rows, group labels, breadcrumb links, tabs, list rows, checkboxes, and keyboard keys |
|
|
134
|
-
| Something you type in,
|
|
133
|
+
| 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
|
+
| 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 |
|
|
135
135
|
| Holds other things | 16px | `--radius-panel` | Wells, plates, panels, cards, radio cards, alerts, code blocks, example frames, and floating layers |
|
|
136
136
|
|
|
137
137
|
- A pill never holds text that can wrap. A control whose label can wrap, such as a toggle card or a radio card, is a rectangle.
|
|
138
|
-
- Nested rectangles are concentric: a rectangle that sits closer to a rounded container's edge than the container's radius takes that radius minus the gap. Option rows in a select picker, `--space-1` inside a 16px panel, take `calc(var(--radius-panel) - var(--space-1))
|
|
138
|
+
- Nested rectangles are concentric: a rectangle that sits closer to a rounded container's edge than the container's radius takes that radius minus the gap. Option rows in a select picker and the rows of a floating menu, such as the project menu, each `--space-1` inside a 16px panel, take `calc(var(--radius-panel) - var(--space-1))`, 12px. A shape with more room than that, such as a field in a dialog, keeps the radius of its role.
|
|
139
139
|
- Round marks (radios, slider thumbs, badge dots, and the busy spinner) take `50%`, a fill inside a shape inherits its corners, and an edge that meets another shape takes `0`. A page writes no other literal radius.
|
|
140
140
|
- Avoid nesting panels. Cards are for a few parallel self-contained options that a reader compares. Running prose belongs in open sections. Product screenshots need one frame, not a frame around a frame.
|
|
141
141
|
- [Depth](#depth) gives each role its shadow. Stable hover states keep normal content quiet.
|
package/language/components.html
CHANGED
|
@@ -339,10 +339,12 @@
|
|
|
339
339
|
}
|
|
340
340
|
/* Inset: the rail and the drawer scroll. */
|
|
341
341
|
.navlist a:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
|
|
342
|
-
/* Phone trigger: a secondary button with a three-line menu glyph, because it opens a side drawer.
|
|
342
|
+
/* Phone trigger: a secondary button with a three-line menu glyph, because it opens a side drawer. It shows the page’s
|
|
343
|
+
contents and does not act, so it takes the field corner, as its no-JavaScript summary does. */
|
|
344
|
+
.menu-glyph { border-radius: var(--radius-field); }
|
|
343
345
|
.menu-glyph::before { content: ""; flex: none; width: 14px; height: 10px; border-block: 1.5px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat; }
|
|
344
346
|
/* No-JavaScript fallback: the list opens in place. The summary is a secondary button with a chevron; only the chevron is local. */
|
|
345
|
-
.rail-summary { list-style: none; width: max-content; max-width: 100%; }
|
|
347
|
+
.rail-summary { list-style: none; width: max-content; max-width: 100%; border-radius: var(--radius-field); }
|
|
346
348
|
.rail-summary::-webkit-details-marker { display: none; }
|
|
347
349
|
.rail-summary::after { content: ""; width: 6px; height: 6px; margin-left: var(--space-1); border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
|
|
348
350
|
details.rail-details[open] > .navlist { margin-top: var(--space-2); }
|
|
@@ -516,7 +518,7 @@
|
|
|
516
518
|
.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%; }
|
|
517
519
|
.projects { position: relative; }
|
|
518
520
|
/* The trigger is a quiet action; this sets its size and type. */
|
|
519
|
-
.projects > summary { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-lg); padding-inline: var(--space-3); font-family: var(--font-mono); font-weight: var(--weight-semibold); list-style: none; user-select: none; }
|
|
521
|
+
.projects > summary { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-lg); 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; }
|
|
520
522
|
.projects > summary::-webkit-details-marker { display: none; }
|
|
521
523
|
/* The ~/ mark is decorative: the empty alternative text keeps it out of the name. */
|
|
522
524
|
.projects > summary::before { content: "~/" / ""; color: var(--color-project); }
|
|
@@ -526,7 +528,8 @@
|
|
|
526
528
|
.projects[open] .icon { transform: rotate(180deg); }
|
|
527
529
|
.projects .navlist { position: absolute; z-index: 3; top: 100%; left: 0; min-width: 224px; margin-top: var(--space-1); padding: var(--space-1); border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-surface-raised); box-shadow: var(--shadow-dialog); }
|
|
528
530
|
.projects.is-open .navlist { position: static; }
|
|
529
|
-
|
|
531
|
+
/* Rows sit --space-1 inside the menu, so they are concentric with it, as select picker rows are. */
|
|
532
|
+
.projects .navlist a { border-radius: calc(var(--radius-panel) - var(--space-1)); font-family: var(--font-mono); }
|
|
530
533
|
.site-end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-6); margin-left: auto; }
|
|
531
534
|
/* The site links are a navigation strip at the header's 44px. */
|
|
532
535
|
.site-links a { min-height: var(--control-lg); }
|
package/language/components.md
CHANGED
|
@@ -69,7 +69,7 @@ Layer: Core. ui: `UiButton`.
|
|
|
69
69
|
|
|
70
70
|
Layer: Core. ui: the `fg-quiet-action` class.
|
|
71
71
|
|
|
72
|
-
- **Anatomy.** A native `<button>`, or the `<summary>` of a menu. Transparent fill, a transparent 1px border, `--radius-control`, and `--color-muted`. 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.
|
|
72
|
+
- **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.
|
|
73
73
|
- **States.** Hover turns the text `--color-text` and fills `currentColor` at 12% over transparent. Pressed fills `currentColor` at 18%, with no sink. Focus-visible is the focus ring, inset where the parent clips. An open menu keeps its trigger at the 12% tint, below the press. The code block's Copy keeps the block's text colour on hover. A disabled quiet action follows the shared [disabled](#rules-for-every-control) rule.
|
|
74
74
|
- **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, and the project trigger.
|
|
75
75
|
- **Don't.** An action that stands on its own in the page, such as Save or Next. That is a button.
|
|
@@ -299,12 +299,12 @@ Layer: Core. ui: `UiDrawer`.
|
|
|
299
299
|
|
|
300
300
|
Layer: Core. The mono font on rail rows is identity. ui: the rows in `UiSiteNav` and the project menu.
|
|
301
301
|
|
|
302
|
-
- **Anatomy.** A `<nav>` with a name, holding links in rows: at least `--row` tall (`--control-lg` at tablet width), `0 --space-3` padding, `--radius-inline` corners, `--text-sm`, and `--color-muted`. A row may hold a leading 16px icon and a trailing muted count. A text-only row centres its label on the cap height: where `text-box` is supported, it is a block with `align-content: center`, `--space-2` block padding, and `text-box: trim-both cap alphabetic`, and the location pip centres itself. The padding keeps a wrapped label's first and last lines clear of the fill's edges and the focus ring. Rows with an icon or a count, and browsers without `text-box`, centre the line box, which leaves a label without descenders about 1px above centre. Groups have a `--text-xs` semibold muted label and 2px gaps between rows.
|
|
302
|
+
- **Anatomy.** A `<nav>` with a name, holding links in rows: at least `--row` tall (`--control-lg` at tablet width), `0 --space-3` padding, `--radius-inline` corners (`calc(var(--radius-panel) - var(--space-1))`, 12px, inside a floating menu such as the project menu, so they are concentric with it), `--text-sm`, and `--color-muted`. A row may hold a leading 16px icon and a trailing muted count. A text-only row centres its label on the cap height: where `text-box` is supported, it is a block with `align-content: center`, `--space-2` block padding, and `text-box: trim-both cap alphabetic`, and the location pip centres itself. The padding keeps a wrapped label's first and last lines clear of the fill's edges and the focus ring. Rows with an icon or a count, and browsers without `text-box`, centre the line box, which leaves a label without descenders about 1px above centre. Groups have a `--text-xs` semibold muted label and 2px gaps between rows.
|
|
303
303
|
- **Groups.** Name groups by purpose, with 2 to 8 rows each. Collapse groups only in a list of more than about 40 rows. A collapsible group's label is a `<button aria-expanded>` in the label type, with `--radius-inline` corners and a chevron that turns −90° when the group is closed. Never collapse the group that holds the current row.
|
|
304
304
|
- **States.** Hover: `--color-row-hover` fill and `--color-text`. Current page (`aria-current="page"`): `--color-nav-current` fill, `--shadow-nav-current`, `--color-nav-current-text`, and medium weight; hover keeps that fill. `--color-nav-current` is an accent tint: `--color-accent` at 14% over `--color-surface-raised` in light, and `--color-accent` at 20% over transparent in dark. `--color-nav-current-text` is the first of `--color-accent`, `--color-text`, black, and white that reaches 4.5:1 over the tinted fill, both on the page and on a surface (composite a translucent fill over each first). Selected tabs and selected list rows use the same fill and rule. Current location in the page (`aria-current="location"`): `--color-text` in medium weight, with a 3×14 `--color-accent` pip at the leading edge, inset 4px, and no fill, in strips and contents lists. In a [section rail](#section-rail) the current section takes the current-page look instead and keeps `aria-current="location"`. A link carries one marker, and page outranks location; the [`aria-current` rules](DESIGN.md#navigation) say which applies, and the [tracking rule](DESIGN.md#navigation) says which section is current. Focus-visible: the focus ring, inset because the rail and the drawer scroll.
|
|
305
305
|
- **Do.** Label a page link with the destination page's title, and an in-page link with its destination section's heading.
|
|
306
306
|
- **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.
|
|
307
|
-
- **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. 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. Only the chevron is local.
|
|
307
|
+
- **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.
|
|
308
308
|
- **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
309
|
- **Keyboard and screen reader.** Plain links in Tab order.
|
|
310
310
|
- **Motion.** Fill, colour, and shadow change over `--duration-fast` with `--ease-out`.
|
|
@@ -380,7 +380,7 @@ Layer: Core. ui: `UiTabs`.
|
|
|
380
380
|
|
|
381
381
|
Layer: Core. ui: the `fg-site-skip` class.
|
|
382
382
|
|
|
383
|
-
- **Anatomy.** The first focusable element on the page, linking to `main` (`id="main"`) and named "Skip to content". It sits above the page until it takes focus, then shows at the top left as a floating layer: `--color-surface-raised`, a transparent 1px border, `--radius-field`, `--shadow-dialog`, `--space-2` `--space-3` padding, and the focus ring.
|
|
383
|
+
- **Anatomy.** The first focusable element on the page, linking to `main` (`id="main"`) and named "Skip to content". It sits above the page until it takes focus, then shows at the top left as a floating layer: `--color-surface-raised`, a transparent 1px border, `--radius-field`, `--shadow-dialog`, `--space-2` `--space-3` padding, and the focus ring. It takes the field corner, not the 16px corner of other floating layers, because it is a one-line control that is not an action.
|
|
384
384
|
- **States.** Hidden above the page at rest, and shown at the top left while it has focus.
|
|
385
385
|
- **Do.** A "Skip to content" link on every page with a header or rail before `main`; the first Tab shows it.
|
|
386
386
|
- **Don't.** Hiding it with `display: none`, which also takes it out of the Tab order.
|
|
@@ -460,7 +460,7 @@ Layer: Identity. ui: `UiCapture`.
|
|
|
460
460
|
|
|
461
461
|
Layer: Identity. ui: `UiSiteHeader`, `UiSiteAppearancePicker`.
|
|
462
462
|
|
|
463
|
-
- **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. 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 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.
|
|
463
|
+
- **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.
|
|
464
464
|
- **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.
|
|
465
465
|
- **Do.** Keep the same header and site links, six at most and in one order, on every page of a personal product site.
|
|
466
466
|
- **Don't.** The site header on an application screen. An application keeps its own navigation.
|
package/language/decisions.md
CHANGED
|
@@ -10,7 +10,7 @@ Each entry records a choice this language made, the options it rejected, and why
|
|
|
10
10
|
| Danger button | Core | A raised `--color-error-surface` button with danger-tinted text, mixed toward `--color-text` as status badges are. Hover and press deepen the tint, and press sinks it. The label must read at 4.5:1 on all three fills; where the mix misses, it falls back to `--color-text`, black, or white. | A flat button with `--color-text` and a hover border read as a pink secondary button, and pressing it showed nothing. | label contrast on all three fills: `tests/catalogue/catalogue.spec.ts` "contrast: every enabled danger button label reaches 4.5:1"; fills, raise, and sink: no test yet |
|
|
11
11
|
| Pressed button | Core | Every variant but text sinks 1px, takes `--shadow-sink`, and changes its fill. Press is a button state: other controls show their latched state, and quiet actions tint without sinking. | The sink shadow alone was too faint to show a click, especially on secondary and ghost. | rule present: `tests/design-foundations.test.mjs` "every state rule the guard requires exists in the catalogue"; 1px move, sink, and fill: no test yet |
|
|
12
12
|
| Busy button | Core | Busy also disables the button, so it takes no hover or press. | A busy button that still hovered and pressed looked ready for a second click. | No test yet |
|
|
13
|
-
| Quiet actions | Core | One recipe for Copy, Full size, dialog and drawer close, and the project trigger: transparent, `currentColor` at 12% on hover and 18% pressed, no sink, and the control ring. | Each had its own hover (`--color-row-hover`, a colour change only, or a 12% tint), so the same kind of action behaved differently. | rule present: `tests/design-foundations.test.mjs` "every state rule the guard requires exists in the catalogue"; tint recipe: no test yet |
|
|
13
|
+
| Quiet actions | Core | One recipe for Copy, Full size, dialog and drawer close, and the project trigger: transparent, `currentColor` at 12% on hover and 18% pressed, no sink, and the control ring. The project trigger keeps the tint but takes the field corner (see One-line non-action controls). | Each had its own hover (`--color-row-hover`, a colour change only, or a 12% tint), so the same kind of action behaved differently. | rule present: `tests/design-foundations.test.mjs` "every state rule the guard requires exists in the catalogue"; tint recipe: no test yet |
|
|
14
14
|
| One source per control | Core | Each control comes from the owning library's component or class, including a link styled as a button. | Local copies built from the same tokens drifted: a docs button had no raise and only faded when pressed. | copied rules unchanged: `tests/design-foundations.test.mjs` "example pages copy the catalogue rules for the shared controls and components they use unchanged" |
|
|
15
15
|
| Section mark | Identity | The `##` mark goes only on the page-level section headings (h2) of documentation, CLI tool, article, and product pages, which are mono with a `--color-border-subtle` rule above. Application and inline-visualization section headings are plain `--font-ui` semibold at `--text-xl` or smaller, with no mark and no rule. h3 and lower never take it. | The mark on every section heading: on a dense screen, such as a metrics dashboard with six sections, it repeated down the page and competed with the data. The mark on h2 and h3: deeper levels repeat more often. A per-page opt-out class: every application page would need to remember it. Dropping the mark: reading pages lose the folio identity that ties them to the `~/name` header. Mono application section headings without the mark: the mono face alone still reads as a document heading among compact sans rows. | No test yet |
|
|
16
16
|
| Command plate | Identity | A dark plate tinted with the project hue (`--color-command-bg`). Terminal captures keep the neutral plate. | The near-black plate looked too severe. | text and prompt contrast: `tests/catalogue/catalogue.spec.ts` "contrast: the command plate text reaches 4.5:1", "contrast: the command plate prompt reaches 3:1"; plate tint: no test yet |
|
|
@@ -20,8 +20,10 @@ Each entry records a choice this language made, the options it rejected, and why
|
|
|
20
20
|
| Segmented control | Core | One thumb glides between options: the leading edge takes 260ms and the trailing edge 300ms, with CSS `ease`, so the thumb stretches a little on the way. This was matched frame by frame to a reference. There is no motion on load, on a restored value, or on a theme change. Reduced motion makes the change instant. | The earlier 180ms ease-out looked like a jump. | No test yet |
|
|
21
21
|
| Segmented label | Core | The selected label reads at 4.5:1 on its thumb, and an icon at 3:1 (`--color-segmented-current-text`): `--color-accent`, or the first of `--color-text`, black, and white that reads. | Accent at 3:1 for labels too, which let some hues' text fall below 4.5:1. | label contrast: `tests/catalogue/catalogue.spec.ts` "contrast: every selected segmented label on its thumb reaches 4.5:1"; icon at 3:1: no test yet |
|
|
22
22
|
| Phone drawer trigger | Core | A page-level contents drawer opens from a soft secondary button with a three-line menu glyph and a label. The no-JavaScript fallback keeps a chevron, because it opens in place. The site shell opens its drawer from the header's icon-only Menu button instead (see Phone header). | A down chevron promised a dropdown, but the trigger opens a side drawer. | No test yet |
|
|
23
|
-
| Shape follows role | Core | A pill acts, or sets a value on one line (`--radius-control`). Small state marks are pills (`--radius-pill`). Places and picked rows are 6px (`--radius-inline`). Typed fields,
|
|
24
|
-
| Navigation row corners | Core | Navigation rows, header and strip rows, list-selection rows, collapsible group labels, and tabs take 6px corners (`--radius-inline`). 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" |
|
|
23
|
+
| Shape follows role | Core | A pill acts, or sets a value in place with every option shown, on one line (`--radius-control`); a select, which opens a list, is a one-line non-action control. Small state marks are pills (`--radius-pill`). Places and picked rows are 6px (`--radius-inline`). Typed fields, controls whose label wraps, and one-line controls that are not actions are 10px (`--radius-field`). Containers are 16px (`--radius-panel`). A pill never holds text that can wrap, and nested rectangles are concentric. The token names predate the rule: they say inline, control, and field, where the uses are rows, pills, and typed fields. The names stay, because a rename breaks every page that uses them. | One shape for every control. All pills put wrapping labels in pills, which the toggle card, fields, and the raised pill row already rejected; all rectangles lose the shape that marks an action. A list of components for each token with no reason: a new component had no rule to pick from, and a reader took a 6px row beside a pill for an error. | rendered corners by role: `tests/catalogue/catalogue.spec.ts` "each component renders the corner radius of its role, and no other part has one", "the DESIGN.md shape table names each role token with its value"; slider track and thumb, and select picker: `tests/design-foundations.test.mjs` "the slider track, slider thumb, and select picker take their role’s corners"; no literal radius: `tests/design-foundations.test.mjs` "no page or the report stylesheet writes a literal corner radius" |
|
|
24
|
+
| 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" |
|
|
25
|
+
| 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" |
|
|
26
|
+
| 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" |
|
|
25
27
|
| 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}" |
|
|
26
28
|
| 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 |
|
|
27
29
|
| 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" |
|
|
@@ -129,11 +131,6 @@ Prose patterns moved with the names: `--*-soft` is now `--color-*-surface`, and
|
|
|
129
131
|
| `--field-shadow-focus-invalid` | `--shadow-field-focus-invalid` |
|
|
130
132
|
<!-- rename-table:end -->
|
|
131
133
|
|
|
132
|
-
## Open questions
|
|
133
|
-
|
|
134
|
-
- Rows inside a floating menu, such as the project menu: concentric with the 16px menu (the panel radius minus `--space-1`, 12px), as select picker rows are, or 6px like other navigation rows. They are 6px for now, the Gate M choice for navigation rows; a later change settles it.
|
|
135
|
-
- The skip link: a floating layer, so the shape rule gives it `--radius-panel` (16px). It keeps `--radius-field` (10px) until the owner picks.
|
|
136
|
-
|
|
137
134
|
## Known gaps
|
|
138
135
|
|
|
139
136
|
- Field focus is a 1px `--color-accent` edge with a faint 2px inset line. The edge reaches 3:1 for a focus indicator (WCAG 1.4.11): 6.61:1 against the light field fill and 6.26:1 against `--color-bg`, and 8.43:1 and 8.31:1 in dark. It is thinner than the 2px perimeter that the WCAG 2.2 AAA focus appearance criterion (2.4.13) asks for; the inset line, at 18% of the accent, does not reach 3:1 on its own.
|
package/language/reference.html
CHANGED
|
@@ -669,8 +669,8 @@
|
|
|
669
669
|
<p class="note">Pill buttons, rounded fields and toggle cards, large-radius panels, and inline corners. Cards never take a pill.</p>
|
|
670
670
|
<ul class="specs">
|
|
671
671
|
<li class="spec" data-token="--radius-inline"><div class="spec-meta"><code>--radius-inline</code><span class="value"></span><span class="use">Places and picked rows: navigation rows, tabs, list rows, breadcrumb links, checkboxes, and keyboard keys</span></div><i class="shape-box" style="border-radius:var(--radius-inline)"></i></li>
|
|
672
|
-
<li class="spec" data-token="--radius-field"><div class="spec-meta"><code>--radius-field</code><span class="value"></span><span class="use">Typed fields
|
|
673
|
-
<li class="spec" data-token="--radius-control"><div class="spec-meta"><code>--radius-control</code><span class="value"></span><span class="use">Pills that act or set a value: buttons, quiet actions, segmented controls, and their thumbs</span></div><i class="shape-box" style="border-radius:var(--radius-control)"></i></li>
|
|
672
|
+
<li class="spec" data-token="--radius-field"><div class="spec-meta"><code>--radius-field</code><span class="value"></span><span class="use">Typed fields, controls whose label wraps, and one-line controls that are not actions: inputs, selects, textareas, toggle cards, pager links, the project-menu trigger, the labelled contents trigger and its no-JavaScript summary, and the skip link</span></div><i class="shape-box" style="border-radius:var(--radius-field)"></i></li>
|
|
673
|
+
<li class="spec" data-token="--radius-control"><div class="spec-meta"><code>--radius-control</code><span class="value"></span><span class="use">Pills that act, or set a value in place with every option shown: buttons other than the labelled contents trigger, quiet actions other than the project-menu trigger, segmented controls, and their thumbs</span></div><i class="shape-box" style="border-radius:var(--radius-control)"></i></li>
|
|
674
674
|
<li class="spec" data-token="--radius-panel"><div class="spec-meta"><code>--radius-panel</code><span class="value"></span><span class="use">Containers: wells, plates, panels, radio cards, alerts, and floating layers</span></div><i class="shape-box" style="border-radius:var(--radius-panel)"></i></li>
|
|
675
675
|
<li class="spec" data-token="--radius-pill"><div class="spec-meta"><code>--radius-pill</code><span class="value"></span><span class="use">Small state marks: status badges, switch tracks, slider and progress tracks, and score pips</span></div><i class="shape-box" style="border-radius:var(--radius-pill)"></i></li>
|
|
676
676
|
</ul>
|