@mutmutco/theme
v0.2.0
Published
Mutatis Mutandis design tokens and Tailwind preset (C5 pipeline lands here)
Downloads
53
Readme
@mutmutco/theme
Design token package for MMD-UI.
Token pipeline
tokens/tokens.json is the DTCG source for the package.
It carries:
- Brand primitives, semantic colors, state colors, six palettes, and dark/light theme values.
- Typography families, sizes, line heights, and tracking.
- Spacing, radii, border widths, elevation, shadows, and motion tokens.
- MMD metadata in
$extensions.mmd, includingcssVariable,palette, andtheme.
Style Dictionary reads that source through style-dictionary.config.mjs and writes the generated CSS to src/tokens.css.
The generated file is checked in because downstream packages import @mutmutco/theme/tokens.css directly.
Rebuild
Run from the repository root:
npm --workspace @mutmutco/theme run build:tokensThis regenerates packages/theme/src/tokens.css.
The package check script also runs build:tokens, so the root gate covers token generation:
npm run checkFonts
src/tokens.css declares four self-hosted @font-face rules:
- Questrial regular.
- Archivo Black regular.
- Roboto Mono upright variable.
- Roboto Mono italic variable.
The URLs point to ../assets/fonts/... from src/tokens.css, so they resolve inside the published npm package.
Tailwind v4 preset
src/preset.ts maps MMD CSS variables to Tailwind theme keys (colors, fonts, radii, spacing).
Consumers import tokens + preset in global CSS:
@import "@mutmutco/theme/tokens.css";
@import "tailwindcss";
@plugin "@mutmutco/theme/preset";Dark is the default on :root. Light theme uses [data-theme="light"] on <html>.
Palette classes (.p-studio, .p-void, …) swap semantic color variables.
