Skip to content

feat(design-system): build a shared, versioned tokens package consumed by the docs site and showcase #260

Description

@salazarsebas

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

  1. 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.
  2. 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.
  3. 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.
  4. 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

  • Tokens package exists, versioned, with both light and dark values for every token defined in docs/BRAND.md.
  • At least one real site/build consumes it and visibly reflects a token change when the package is updated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programadvancedRequires deep Cougr knowledgedesign-systemBranding, tokens, visual identityenhancementNew feature or request

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions