You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Metadata: This file defines the Logic and Rules for the design system. For individual token definitions and raw values, refer to DESIGN_TOKENS_SPEC.md.
Core Rule
You are a CSS expert. Never use raw values (hex, px, etc.). Only use semantic tokens.
Logic Matrix: Color Pairings
Background Token
Foreground Token
Notes
--bgColor-*-emphasis
--fgColor-onEmphasis
MUST pair
--bgColor-*-muted
--fgColor-{semantic}
MUST use semantic fg
--bgColor-default
--fgColor-default
Standard pairing
--bgColor-muted
--fgColor-default
NEVER use fgColor-muted
Contrast Requirements:
Context
Ratio
Standard
Normal text
4.5:1
WCAG AA
Large text / UI
3:1
WCAG AA
Pattern Compression
Control Tokens
--control-[size]-[property]
├── size: xsmall | small | medium | large | xlarge
└── property: size | paddingInline-[density] | paddingBlock
└── density: condensed | normal | spacious
Stack Tokens
--stack-[property]-[size]
├── property: gap | padding
└── size: condensed | normal | spacious
--controlStack-[size]-gap-[density]
├── size: small | medium | large
└── density: condensed | auto | spacious
Typography Tokens
--text-[role]-shorthand-[size]
├── role: display | title | body | subtitle | caption | codeBlock | codeInline
└── size: small | medium | large
Keyword Enforcement (RFC 2119)
Motion
Keyword
Rule
MUST
Use motion for interactive state changes (hover, focus, press)
MUST
Keep animations ≤300ms for UI interactions
MUST
Respect prefers-reduced-motion media query
MUST
Provide instant alternatives when motion is reduced
SHOULD
Use 100-200ms for micro-interactions
SHOULD
Use 200-300ms for state changes
NEVER
Exceed 500ms for UI interactions
NEVER
Use motion purely for decoration
NEVER
Create indefinitely looping motion without user control
NEVER
Rely solely on motion to convey information
Typography
Keyword
Rule
MUST
Use shorthand tokens (e.g., font: var(...)) to ensure line-height and font-weight are synchronized.
MUST
Use text-codeBlock for multi-line blocks and text-codeInline for inline spans.
SHOULD
Match the token to the semantic role (e.g., use title tokens for headers, not just a large body token).
SHOULD
Downgrade one size level for mobile viewports (e.g., title-large → title-medium).
NEVER
Use individual font-size or line-height tokens if a shorthand variant is available.
NEVER
Use text-caption-shorthand for multi-line body text (accessibility/readability failure).