DTCG — Design Tokens Community Group
DTCG is a JSON file format for exchanging design tokens between tools. Vanilla Breeze supports it as a sibling artifact to its CSS-native theme system, so designers and developers can move VB themes through Figma, Tokens Studio, Style Dictionary, and other DTCG-aware tools without a per-tool integration.
Why DTCG matters for VB
VB's runtime token system — CSS custom properties, OKLCH,
light-dark(), relative-color computation — is
expressive and platform-native. But until DTCG, every design tool spoke
its own dialect: Figma Variables, Tokens Studio JSON, Style Dictionary's
legacy format, Sketch shared styles. Sharing a theme across tools meant
manual translation each time.
DTCG gives the ecosystem a common JSON shape with explicit
$type + $value per token, hierarchical groups,
alias references, and composite types for typography / shadow / border.
When VB themes are emitted as DTCG, they become consumable in any
DTCG-aware tool. When DTCG files arrive (from Figma exports, public
design systems, or hand-authored sets), VB can apply them as themes.
What VB supports
- Export
-
<theme-export>has aformat="dtcg"mode that emits stable-spec 2025.10 JSON. The format selector is in the toolbar; the download saves astheme.tokens.jsonwith MIMEapplication/design-tokens+json. - Import
-
<theme-import>takes DTCG JSON via paste, file upload, or URL fetch and applies the resulting tokens to a target preview scope. Tokens that don't map to a known VB prefix are surfaced in an ignored panel rather than dropped silently. - Catalog
-
<theme-catalog>lets you start from a known design system in one click — Material 3, IBM Carbon, Salesforce Lightning, GOV.UK, Atlassian, Tailwind defaults, Bootstrap defaults, Catppuccin Mocha. Each entry carries license and attribution metadata. - Theme library
-
Every theme in VB ships as a
.tokens.jsonsibling next to its CSS at/cdn/themes/. See the theme library for the full list with download links.
Which values convert
The format holds finished values. CSS can hold a calculation or a reference. Where a theme uses one, the file holds the value it works out to, and keeps the CSS text in $extensions["com.vanilla-breeze"] so that an import gives back the CSS the file was written from. References are looked up among the other tokens in the same set. This table says what another tool sees and what comes back on import.
| CSS value | In the file | Other tools see | Imported again |
|---|---|---|---|
A color written as oklch(), hex or rgb() |
A color in the oklch or srgb space |
The color | The same color. Lightness is written as a number, so 55% comes back as 0.55 |
A named color, hsl(), oklab() or color() |
The color, and the CSS text under literal |
The color | The original text |
A relative color, oklch(from var(--color-primary) ...) |
The computed color in oklch, and the CSS text under expression |
The computed color | The original text |
color-mix() in srgb, oklab or oklch |
The mixed color, and the CSS text under literal |
The mixed color | The original text |
light-dark(a, b), or a color worked out from one |
Three tokens, $root, light and dark, and the CSS text under lightDark |
Both colors | The original text |
var(--color-primary) on its own, where the target is a token in the same set |
A DTCG alias, {color.primary} |
A reference to the other token | The original text |
var() inside a larger value, or pointing at a custom property that is not a token |
The value with the reference filled in, and the CSS text under literal |
The value | The original text |
A length in px or rem |
A dimension | The length. A bare 0 is written, and comes back, as 0px |
The same length |
A length in em, % or another unit |
A number token, and the unit under unit. A DTCG dimension can only be px or rem |
A number with no unit | The original length |
calc() of numbers or of lengths in one unit |
The result, and the CSS text under literal |
The result | The original text |
A font stack, a weight, a time, a cubic-bezier(), a shadow |
The matching DTCG value | The value | The same value. Font names other than generic families come back quoted |
An easing keyword: linear, ease, ease-in, ease-out, ease-in-out |
The keyword's cubicBezier curve, and the keyword under literal |
The curve | The keyword |
A shadow of none |
A shadow with no size and a fully transparent color, and none under literal |
A shadow that draws nothing | none |
A value that cannot be worked out from the set: a reference to a custom property that is not in it, calc() across units, clamp(), currentColor, steps(), a radius with several values |
No token. The property and its CSS text are listed under cssOnly in the file's own $extensions |
Nothing for that token | The original text |
The format has no type for plain text, so a value with no finished form is left out. A stand-in would be read by another tool as the real value. In the bundled themes this applies to the steps() easings of 8bit, NES and Terminal and to one radius in Organic.
Two things follow. A token that carries expression, lightDark or literal is imported from that text, so a change made to its $value in another tool is not picked up unless the tool also removes the extension. And a computed value is a snapshot: it does not follow later changes to the token it was worked out from. Keep the CSS as the source and treat the file as a copy.
The themes most likely to be taken elsewhere, Modern, Minimal and Classic, set their brand colors from the hue, lightness and chroma seeds. Those export as numbers under color.seeds, and the file's $extensions carries seedDerivation: true to say the colors are built from them.
<theme-export>
serializes the custom properties set on its scope and looks references up
among those. A value that points at a token the scope does not set, for
example a hover color derived from a --color-primary that
comes from the stylesheet, is listed under cssOnly. The token
files for the bundled themes are built with the library defaults available,
so they resolve those references. The full account is on the
Vanilla Breeze DTCG page.
Composite typography
DTCG's composite typography token bundles related primitives
(fontFamily, fontSize, fontWeight,
lineHeight) into one object. VB's runtime stores those as
separate scalars. On import, VB unpacks composite typography tokens into
the matching scalars (--font-{name},
--font-size-{name}, etc.). On export, VB emits scalars by
default; future revisions may synthesize composite tokens for tools that
prefer them.
Tooling pointers
- Design Tokens Community Group
- The W3C community group and canonical spec.
- Style Dictionary
-
Multi-platform code generator. Run
sd buildagainst any.tokens.jsonVB emits to produce iOS, Android, Flutter, or alternative CSS output. - Tokens Studio for Figma
- The dominant Figma plugin for managing tokens. Imports / exports DTCG; pipes through Style Dictionary.
- Penpot
- Open-source design tool with native DTCG export.
What's next
See the Theme Composer for the hands-on workflow: edit specimens, browse the catalog, paste DTCG, and export your result. The theme library lists every shipped theme with one-click DTCG downloads.