sync_design_tokens
Map design tokens to a Tailwind theme.extend object. Optionally import a W3C DTCG token file before mapping. Returns CSS variable references for colors, spacing, and more.
Instructions
Map registry tokens to a Tailwind theme.extend object; optionally import a W3C DTCG token file first.
Prereq: tokens in the registry (pull_design_system first) — or pass dtcgFile to import them here. Never throws — returns {} when empty. Returns: partial theme (colors, spacing, fontSize, borderRadius, boxShadow) using var(--token) references; keys from the last token-name segment; "other" tokens skipped. With dtcgFile also { imported, warnings }. vs get_tokens: get_tokens = raw data for inspection (format "dtcg" exports the DTCG document); this = paste-ready Tailwind patch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dtcgFile | No | Path to a W3C Design Tokens (.tokens.json / DTCG) file to import into the registry before mapping. Upserts by token name; parse warnings are returned, never silently dropped. |