@aitrien/motifspec 1.22.0 → 1.22.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  Every release of MotifSpec (named brand-codex until 1.10.0), newest first. Entries before 1.10.0 keep the names they were released under. Versions follow the rules in `CONVENTIONS.md`: renaming or removing a semantic token is major, adding tokens, components or icons is minor, and changing a value or fixing a description is a patch. `npm run build` fails if the version in `package.json` has no entry here.
4
4
 
5
+ ## [1.22.1] - 2026-11-06
6
+
7
+ ### Changed
8
+ - A documentation site's header is one row of `size.target.touch` with `space.inset.xs` above and below, at every width. It no longer changes height when the wordmark compacts on scroll, and the wordmark stays centred in it.
9
+ - The page navigation (`docs-nav-groups.html`) opens only the group that holds the current page; the others start closed.
10
+ - A documentation site's header nav holds only links out (`site-header.md`); motifspec.com's header no longer lists Guide, Components and Reference, which the page navigation already lists.
11
+
5
12
  ## [1.22.0] - 2026-11-06
6
13
 
7
14
  ### Added
package/dist/codex.css CHANGED
@@ -2,7 +2,7 @@
2
2
  @font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-wght.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }
3
3
  @font-face { font-family: "Yarndings 12"; src: url("../fonts/yarndings-12-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: block; }
4
4
 
5
- /* MotifSpec 1.22.0 — generated from tokens/*.json. Do not edit.
5
+ /* MotifSpec 1.22.1 — generated from tokens/*.json. Do not edit.
6
6
  Themes: semantic colours use light-dark(); color-scheme follows the system unless
7
7
  <html data-theme="light|dark"> pins it. --cx-primitive-* are for this file only. */
8
8
  :root {
@@ -720,9 +720,11 @@ p, li, dd, figcaption { text-wrap: pretty; }
720
720
  .cx-header__end:has(.cx-header__menu[open]) > .cx-header__toc { visibility: hidden; }
721
721
  /* One row at every width: from size.breakpoint.lg the search field gives way first, down to an icon's width with its
722
722
  label, before the nav or the wordmark would wrap. */
723
- .cx-header--docs .cx-header__inner { flex-wrap: nowrap; }
723
+ .cx-header--docs .cx-header__inner { flex-wrap: nowrap; padding-block: var(--cx-space-inset-xs); }
724
724
  .cx-header--docs .cx-nav { flex: none; }
725
- .cx-header--docs .cx-wordmark { flex: none; }
725
+ /* The bar keeps its height while the wordmark changes size: the wordmark is a touch target high at any size, with its
726
+ text centred in it (align-content, as its line keeps the name and role on one baseline). */
727
+ .cx-header--docs .cx-wordmark { flex: none; padding-block: 0; align-content: center; }
726
728
  /* A docs header sticks, with its surface, even without dist/codex.js: its menu and "On this page" open from it. */
727
729
  .cx-backdrop-page .cx-header--docs:not([data-scrolled]) { position: sticky; background: var(--cx-color-surface-base); }
728
730
  @media (width < 64rem) {
package/dist/tokens.css CHANGED
@@ -1,4 +1,4 @@
1
- /* MotifSpec 1.22.0 — generated from tokens/*.json. Do not edit.
1
+ /* MotifSpec 1.22.1 — generated from tokens/*.json. Do not edit.
2
2
  Themes: semantic colours use light-dark(); color-scheme follows the system unless
3
3
  <html data-theme="light|dark"> pins it. --cx-primitive-* are for this file only. */
4
4
  :root {
package/dist/tokens.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // Generated by npm run build. Do not edit.
2
- export const version = "1.22.0";
2
+ export const version = "1.22.1";
3
3
  export const changelog = "https://github.com/Aitrien/motifspec/blob/main/CHANGELOG.md";
4
4
  export const showcase = "https://motifspec.com";
5
5
  export const tokens = [
package/dist/tokens.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.22.0",
2
+ "version": "1.22.1",
3
3
  "changelog": "https://github.com/Aitrien/motifspec/blob/main/CHANGELOG.md",
4
4
  "showcase": "https://motifspec.com",
5
5
  "tokens": [
@@ -65,7 +65,7 @@ The site header (`site-header.md`) and footer (`site-footer.md`) go around it as
65
65
  <li><a href="/guide/layouts/">Choosing a layout</a></li>
66
66
  </ul>
67
67
  </details>
68
- <details class="cx-docs-nav__group" open>
68
+ <details class="cx-docs-nav__group">
69
69
  <summary id="docs-nav-reference">Reference<svg class="cx-icon cx-icon--sm" aria-hidden="true" focusable="false"><use href="#cx-icon-expand"></use></svg></summary>
70
70
  <ul class="cx-docs-nav__list" aria-labelledby="docs-nav-reference">
71
71
  <li><a href="/reference/tokens/">Tokens</a></li>
@@ -96,7 +96,7 @@ In Hugo, `partial "motifspec/docs-nav.html" .` writes the navigation from the si
96
96
  - Keep group names to one or two words, and page titles short enough for one line in the column.
97
97
  - Mark the current page with `aria-current="page"`.
98
98
  - Say "(deprecated)" after the title of a page about something deprecated; `docs-nav.html` does when the page sets `deprecated`.
99
- - Leave every group open unless the navigation is long; a reader scans more easily than they click.
99
+ - Open the group that holds the current page and close the rest, so a reader sees where they are and every other group's name at a glance. `docs-nav-groups.html` does this.
100
100
 
101
101
  ## Don't
102
102
 
@@ -96,7 +96,7 @@ The bar at the top of every page: wordmark, primary nav and the theme toggle. On
96
96
 
97
97
  ### In a documentation site
98
98
 
99
- A documentation site's header (`cx-header--docs`) also carries search, a link out to the source repository, the version linking to the changelog, and two `<details>` that take over below `size.breakpoint.lg`: "On this page" and a menu.
99
+ A documentation site's header (`cx-header--docs`) also carries search, a link out to the source repository, the version linking to the changelog, and two `<details>` that take over below `size.breakpoint.lg`: "On this page" and a menu. Its nav holds only links out, since the page navigation lists the pages. The bar is one row of `size.target.touch` with `space.inset.xs` above and below, at every width and whatever size the wordmark is, which sits centred in it.
100
100
 
101
101
  ```html
102
102
  <header class="cx-header cx-header--docs">
@@ -113,7 +113,6 @@ A documentation site's header (`cx-header--docs`) also carries search, a link ou
113
113
  <button class="cx-search-trigger" type="button" data-search-open aria-haspopup="dialog" aria-controls="cx-search" hidden>…</button>
114
114
  <nav class="cx-nav" aria-label="Main">
115
115
  <ul>
116
- <li><a href="/guide/" aria-current="page">Guide</a></li>
117
116
  <li><a href="https://github.com/owner/repo">GitHub<svg class="cx-icon cx-icon--sm" aria-hidden="true" focusable="false"><use href="#cx-icon-arrow-outward"></use></svg></a></li>
118
117
  </ul>
119
118
  </nav>
@@ -140,7 +139,7 @@ A documentation site's header (`cx-header--docs`) also carries search, a link ou
140
139
  <!-- caption: The documentation header by width -->
141
140
  | | Below `size.breakpoint.lg` | From `size.breakpoint.lg` |
142
141
  |---|---|---|
143
- | At the top of the page | The wordmark in full, search (an icon) and the menu | The wordmark in full, search (a field), the nav, the version and the theme toggle |
142
+ | At the top of the page | The wordmark in full, search (an icon) and the menu | The wordmark in full, search (a field), the links out, the version and the theme toggle |
144
143
  | Scrolled | A compact wordmark, "On this page", search and the menu | The same, with a compact wordmark |
145
144
  | The menu | A sheet under the bar: the page navigation scrolls; the external links, the changelog with the version, and the theme toggle stay at the bottom | Not shown: the side column has the navigation |
146
145
  | "On this page" | A panel under the bar, with Back to top and the page's sections | Not shown: the article has its own |
@@ -179,7 +178,8 @@ Copy the snippet as it is: the build fails if this doc and `js/theme-init.js` di
179
178
  - Don't hide a portfolio's nav behind a menu button at small widths; the list scrolls inside its row instead. A documentation site, whose navigation is a long list of pages, puts it in its menu below `size.breakpoint.lg`.
180
179
  - Don't add icons or ornaments to nav items. The theme toggle, and on a documentation site the search icon and the menu, are the only header controls that are icons.
181
180
  - Don't make the header sticky on a backdrop page without its surface; see-through, it would sit on the text below it. The `data-scrolled` rules keep the two together.
182
- - Don't animate the header on scroll beyond that surface fade and, on a documentation site, the compact wordmark: no hiding or revealing the bar.
181
+ - Don't animate the header on scroll beyond that surface fade and, on a documentation site, the compact wordmark: no hiding or revealing the bar, and no change in its height.
182
+ - Don't list a documentation site's sections in its header's nav; the page navigation beside the page, or in the menu, already lists them.
183
183
 
184
184
  ## Accessibility
185
185
 
@@ -1,7 +1,7 @@
1
1
  {{- /* docs-shell.md: the documentation layout's page navigation, as groups. Pages at the top level of the site come
2
2
  first, ungrouped; then each top-level section is a group, in weight order, listing its pages in weight order.
3
3
  A section or page with `docs_nav: false` in its front matter is left out; one with `deprecated` set says so
4
- after its title. Every group starts open; the current page is marked. Written twice on a page, in the side
4
+ after its title. The group holding the current page starts open and the rest start closed; the current page is marked. Written twice on a page, in the side
5
5
  column (docs-nav.html) and in the header's menu (site-header.html), so each copy's ids take a prefix.
6
6
  Context: dict "page" (the current page) "prefix". */ -}}
7
7
  {{- $current := .page -}}
@@ -17,7 +17,7 @@
17
17
  {{- end }}
18
18
  {{- range where site.Home.Sections.ByWeight "Params.docs_nav" "ne" false }}
19
19
  {{- $id := printf "%s-%s" $prefix (.Section | urlize) }}
20
- <details class="cx-docs-nav__group" open>
20
+ <details class="cx-docs-nav__group"{{ if eq $current.Section .Section }} open{{ end }}>
21
21
  <summary id="{{ $id }}">{{ .LinkTitle }}<svg class="cx-icon cx-icon--sm" aria-hidden="true" focusable="false"><use href="#cx-icon-expand"></use></svg></summary>
22
22
  <ul class="cx-docs-nav__list" aria-labelledby="{{ $id }}">
23
23
  {{- range where .Pages.ByWeight "Params.docs_nav" "ne" false }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aitrien/motifspec",
3
- "version": "1.22.0",
3
+ "version": "1.22.1",
4
4
  "description": "Liam Marshall's design system: DTCG tokens, component rules, generated CSS, Hugo templates and a rule checker.",
5
5
  "keywords": [
6
6
  "design-system",