Skip to content

refactor(tokens)!: consume @cytario/design via @reference pattern - #166

Merged
dahannes merged 3 commits into
mainfrom
refactor/c-349-design-token-consumption
Jul 23, 2026
Merged

refactor(tokens)!: consume @cytario/design via @reference pattern#166
dahannes merged 3 commits into
mainfrom
refactor/c-349-design-token-consumption

Conversation

@dahannes

Copy link
Copy Markdown
Contributor

C-349 — Design token pipeline migration

Migrates cytario-web to consume @cytario/design using Tailwind v4's @reference pattern, aligning with the design system refactor in cytario/cytario-design#27.

Changes

Token consumption

  • Replace app/tailwind.css with app/styles.css using the @reference + @import + @source pattern
  • @reference "@cytario/design/styles/tokens.css" registers all design-system color tokens for utility generation without emitting duplicate CSS
  • @import "@cytario/design/styles.css" provides runtime styles
  • @source "../node_modules/@cytario/design/dist/" ensures component classes are detected
  • Consolidate multiple @cytario/design CSS imports (styles.css, tokens/variables.css, tokens/variables-dark.css) into single styles.css import

Dependency cleanup

  • Remove tailwindcss-react-aria-components and tw-animate-css devDeps (no longer needed — provided by the design system)
  • Remove local font files (public/fonts/*) — now provided by @cytario/design

Vite config

  • Remove SSR noExternal for @cytario/design (no longer needed)
  • Add fs.allow for design system source directory watching

Verification

  • npm run build
  • npm run typecheck
  • npm run lint
  • npm run format:check

Prerequisite

Requires cytario/cytario-design#27 to be merged and a new version of @cytario/design published.

@dahannes
dahannes requested a review from a team as a code owner July 23, 2026 09:50
@cytario-plane

cytario-plane Bot commented Jul 23, 2026

Copy link
Copy Markdown

Linked to Plane Work Item(s)

References

This comment was auto-generated by Plane

1 similar comment
@cytario-plane

cytario-plane Bot commented Jul 23, 2026

Copy link
Copy Markdown

Linked to Plane Work Item(s)

References

This comment was auto-generated by Plane

dahannes added 3 commits July 23, 2026 14:25
Replace direct CSS imports from @cytario/design with Tailwind v4
@reference pattern: tokens.css is referenced for utility generation
without emitting CSS, then the full styles.css is imported for runtime.

- Replace app/tailwind.css with app/styles.css using @reference + @import
  + @source pattern
- Consolidate multiple @cytario/design CSS imports into single styles.css
- Remove tailwindcss-react-aria-components and tw-animate-css devDeps
- Remove local font files (now provided by @cytario/design)
- Update vite.config.ts: remove SSR noExternal (no longer needed),
  add fs.allow for design system source watching

Part of C-349.
@dahannes
dahannes force-pushed the refactor/c-349-design-token-consumption branch from 47224a5 to 532781e Compare July 23, 2026 12:26
@dahannes
dahannes merged commit e90ce77 into main Jul 23, 2026
13 of 14 checks passed
@dahannes
dahannes deleted the refactor/c-349-design-token-consumption branch July 23, 2026 13:13
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 4.14.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants