C-349: Replace Style Dictionary with hand-maintained CSS theme - #27
Conversation
…theme C-349 BREAKING CHANGE: The Style Dictionary token pipeline has been removed. The tokens/ directory (3 DTCG JSON files) and scripts/build-tokens.ts are deleted. Token values now live in src/styles/theme.css as a single hand-maintained CSS file with @theme inline registration. - Add src/styles/theme.css (558 lines) consolidating all primitives, semantic light/dark tokens, font-face declarations, body styles, gradients, and @theme inline block into one file - Add src/styles/tokens.css — standalone @theme inline block for consumer apps to @reference without pulling in tw-animate-css or tailwindcss-react-aria-components as devDeps - Move Montserrat variable fonts from assets/fonts/ to src/styles/fonts/ - Delete src/styles/global.css (content folded into theme.css) - Add src/colors.ts exporting ColorTeal500 and ColorPurple700 for consumers needing direct hex values (e.g. SVG logos) - Add scripts/validate-tokens.ts replacing build-tokens.ts — checks dark-theme token coverage only (no generation step) - Update package.json: remove style-dictionary devDep, replace build:tokens script with validate:tokens, update exports map (remove ./tokens/*.css, add ./styles/tokens.css and ./styles/theme.css) - Update CI workflow: build:tokens → validate:tokens in all jobs - Update .storybook/preview.ts to import theme.css - Update .gitignore: remove src/tokens/ entry (no longer generated) - Update src/index.ts: remove tokens export, add colors export
…tokens C-349 Migrate Badge, DeltaIndicator, Pill, ProgressBar, ToggleButton, and Breadcrumbs from arbitrary value syntax (e.g. bg-(--color-*)) to standard Tailwind utility classes (e.g. bg-*-foreground). This is required now that design tokens are registered via @theme inline in theme.css, which makes the full palette available as native utilities. Update related tests and stories accordingly.
C-349 Add ArrowUpRight, Building2, CircleSlash, CreditCard, Database, KeyRound, LayoutDashboard, Network, Power, PowerOff, RefreshCw, ScrollText, and SquarePen icons for admin-portal navigation and UI needs.
…line C-349 - CLAUDE.md: update token workflow instructions, file references, and build commands to reflect the new hand-maintained theme.css approach - README.md: update quickstart and architecture sections to remove style-dictionary references and document the new @reference pattern for consumer apps - ColorReference.tsx: update to read from new token structure
|
Linked to Plane Work Item(s) References This comment was auto-generated by Plane |
C-349 - validate-tokens.ts comment: src/tokens/theme.css → src/styles/theme.css - CLAUDE.md: remove global.css from project structure, fix Common Pitfalls font-face reference to theme.css - README.md: remove global.css from project structure - src/colors.ts: add missing trailing newline
Why this PR is a win (rationale)1. Style Dictionary was solving a problem we don't have. 2. The 3. The build step was a footgun. 4. Tailwind v4's 5. The What might seem concerning
TL;DRThe Style Dictionary pipeline was providing the illusion of rigor (JSON source of truth, generation step) while actually creating drift (duplicate |
|
🎉 This PR is included in version 8.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
C-349 — Replace the Style Dictionary token pipeline with a single hand-maintained CSS theme file.
Breaking Change
The Style Dictionary token pipeline has been removed. The
tokens/directory (3 DTCG JSON files) andscripts/build-tokens.tsare deleted. Token values now live insrc/styles/theme.cssas a single hand-maintained CSS file with@theme inlineregistration.Commits
Key changes
src/styles/theme.css(558 lines) consolidates primitives, semantic light/dark tokens, font-face declarations, body styles, gradients, and@theme inlineblocksrc/styles/tokens.css— standalone@theme inlineblock for consumer@referenceconsumption without pulling intw-animate-cssortailwindcss-react-aria-componentssrc/colors.tsexportsColorTeal500andColorPurple700for consumers needing direct hex valuesscripts/validate-tokens.tsreplacesbuild-tokens.ts— checks dark-theme token coverage onlyConsumer migration
Admin-portal and cytario-web
styles.cssfiles updated to:Test plan
npm run validate:tokenspasses in CInpm run buildsucceedsstyles.cssstyles.cssRef: C-349