When design and engineering teams operate with separate tools and disparate vocabularies, UI drift is inevitable. A button colored #DF5826 in Figma ends up as #E05520 in production CSS, and padding discrepancies accumulate until digital products feel inconsistent and unpolished.
Modern design systems solve this with Design Tokens—atomic visual decisions (colors, radii, spacing, typography scales) stored in platform-agnostic JSON schemas and compiled directly into CSS variables, iOS Swift tokens, and Android XML in automated CI/CD pipelines.
Design System Architecture Principles
- Three-Tier Hierarchy: Organize tokens into Global (Raw), Semantic (Intent), and Component-specific tiers.
- Single Source of Truth: Never hardcode hex values or pixel numbers inside component stylesheets.
- Automated Export: Use Figma Variables APIs and Style Dictionary to compile tokens on every Git commit.
- Dark Mode by Default: Semantic aliases make theme switching effortless by swapping token references rather than stylesheet rewrites.
1. The Design-Code Chasm in Enterprise Teams
Without an automated token pipeline, every brand palette change requires designers to update static style guides, engineers to manually search-and-replace variables, and QA testers to inspect dozens of views. This friction causes design systems to be abandoned within 12 months of inception.
“If your design system lives only in Figma, it is not a system; it is a drawing. A real design system lives as compiled code in production repositories.”
— Lead Design Engineer, Ondigma Infotech
2. Three-Tier Design Token Taxonomy
Structure your design tokens into three strict operational layers:
- 1. Global Tokens: Raw values with zero context (e.g.
color.orange.500 = #df5826). - 2. Semantic Tokens: Intent-driven aliases (e.g.
color.surface.action.primary = {color.orange.500}). - 3. Component Tokens: Scoped specifically to elements (e.g.
button.primary.background = {color.surface.action.primary}).
3. Token Hierarchy & Semantic Governance
Here is how tokens propagate from initial design definition through to production code:
| Token Level | Figma Variable Definition | Compiled CSS Custom Property | Consumer Usage Example |
|---|---|---|---|
| Global (Base) | palette/primary/500 |
--color-palette-orange-500: #df5826; |
Referenced only by semantic tokens |
| Semantic (Intent) | color/brand/accent |
--color-brand-accent: var(--color-palette-orange-500); |
Applied to interactive UI surfaces |
| Spacing Scale | space/spacing-md |
--spacing-md: 1.5rem; /* 24px */ |
Container padding and grid gaps |
| Elevation / Shadow | elevation/card-hover |
--elevation-card-hover: 0 20px 40px rgba(0,0,0,0.08); |
Applied to card interactive states |
4. Automated Figma-to-GitHub Actions Pipeline
When a designer modifies a variable in Figma, a webhook triggers a GitHub Action workflow using Amazon Style Dictionary to compile cross-platform tokens.
// Ondigma Token Engine: Compiling JSON Tokens to Modern CSS Variables
module.exports = {
source: ['tokens/**/*.json'],
platforms: {
css: {
transformGroup: 'css',
buildPath: 'assets/css/',
files: [{
destination: 'design-tokens.css',
format: 'css/variables',
options: { outputReferences: true }
}]
}
}
};
5. Component Versioning & Adoption Metrics
Track component adoption across client web repositories using automated AST parsing tools to celebrate high system adoption and flag unauthorized detached custom CSS.





Discussion (4 Contributions)
Aarav Sharma
Incredible operational clarity in this article. We are currently implementing these exact frameworks across our team's upcoming sprint.
Leave a Contribution
Your email address will not be published. Required fields are marked with *