Part of #241
Background
The docs site and showcase (per the repository strategy) are two independently deployed static builds, potentially in the same repository or split, that must never visually diverge. Defining palette/type/spacing values on paper (sibling sub-issue) does not, by itself, prevent two builds from drifting; it needs to be a real, single, importable source both consume.
Objective
Package the design tokens defined in the sibling sub-issue as a small, versioned artifact (a CSS custom-properties file, or an npm package if the site tooling is Node-based) that both the documentation site and the showcase generator import directly, rather than each hand-copying values.
References
- Style Dictionary, for transforming one token source into multiple output formats if needed: https://amzn.github.io/style-dictionary/
- Sibling sub-issue's
docs/BRAND.md (the source of truth this package encodes)
- Repository strategy, for how a cross-repo shared package should be distributed if the docs site and showcase end up split across repositories:
docs/strategy/10-repository-strategy.md
In scope
- A single tokens source file (format decided in the PR: CSS custom properties is the simplest option if both consumers are static HTML/CSS builds; an npm package is preferable only if there's a build-time transform need) encoding every value from
docs/BRAND.md.
- Both light and dark mode token sets, structured so consumers can switch via a
prefers-color-scheme media query and a data-theme attribute override, consistent with how the token set will actually be consumed by static site CSS.
- Integration into at least one real consumer (the docs site, once its scaffold sub-issue lands) as proof the package actually works end to end, not just published in isolation.
- A versioning and update policy documented (e.g. semver, changelog) so the docs site and showcase can each pin or upgrade independently without silent drift.
Out of scope
- Applying the tokens retroactively to
README.md or other root-level Markdown; this issue ships the package, application to every surface is incremental follow-up work.
Definition of done
Part of #241
Background
The docs site and showcase (per the repository strategy) are two independently deployed static builds, potentially in the same repository or split, that must never visually diverge. Defining palette/type/spacing values on paper (sibling sub-issue) does not, by itself, prevent two builds from drifting; it needs to be a real, single, importable source both consume.
Objective
Package the design tokens defined in the sibling sub-issue as a small, versioned artifact (a CSS custom-properties file, or an npm package if the site tooling is Node-based) that both the documentation site and the showcase generator import directly, rather than each hand-copying values.
References
docs/BRAND.md(the source of truth this package encodes)docs/strategy/10-repository-strategy.mdIn scope
docs/BRAND.md.prefers-color-schememedia query and adata-themeattribute override, consistent with how the token set will actually be consumed by static site CSS.Out of scope
README.mdor other root-level Markdown; this issue ships the package, application to every surface is incremental follow-up work.Definition of done
docs/BRAND.md.