Skip to content

Add design token foundation#890

Draft
jpurnell wants to merge 1 commit into
twostraws:mainfrom
jpurnell:feature/design-token-foundations
Draft

Add design token foundation#890
jpurnell wants to merge 1 commit into
twostraws:mainfrom
jpurnell:feature/design-token-foundations

Conversation

@jpurnell
Copy link
Copy Markdown
Contributor

@jpurnell jpurnell commented May 21, 2026

Summary

  • Adds generic DesignToken<Value> type with CSS custom property generation (--ig-{category}-{name})
  • Adds TokenCategory enum and TokenValue protocol
  • Adds concrete value types: ColorValue (with hex parsing), SpacingValue (with scale helper), TypographyValue, ShadowValue, RadiusValue, BreakpointValue
  • Adds AnyDesignToken type erasure for heterogeneous collections
  • Adds CSSGenerator for compiling tokens to :root CSS custom properties with dark mode media query support
  • 16 new tests covering all token types, CSS generation, and hex color parsing

Design

Purely additive — new Sources/Ignite/DesignSystem/ directory. These are the atomic building blocks for a future DesignSystem protocol that could replace Bootstrap dependency. The token types are independent of any existing framework code.

Test plan

  • All 16 new tests pass
  • Full test suite passes (1353 tests)
  • swift build clean with no warnings

Introduces the design token system for Ignite:

- DesignToken<Value> generic type with CSS custom property generation
- TokenCategory enum (color, spacing, typography, shadow, radius, breakpoint)
- TokenValue protocol with concrete types: ColorValue (with hex parsing),
  SpacingValue (with scale helper), TypographyValue, ShadowValue,
  RadiusValue, BreakpointValue
- AnyDesignToken type erasure for heterogeneous collections
- CSSGenerator for compiling tokens to :root custom properties
  with dark mode media query support

Purely additive. DesignSystem protocol and component migration
are planned as follow-ups.
@jpurnell jpurnell marked this pull request as draft May 21, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant