How to move a Vanilla Breeze theme to and from other design tools as a Design Tokens Community Group file: what is shipped, how tokens map, and which values survive the trip.
What DTCG is
The Design Tokens Community Group format is a JSON file for passing design tokens between tools. Each token has a $type and a $value, tokens sit in named groups, and one token can refer to another. Design tools and code generators that read the format can take a theme without a converter written for each pair.
A Vanilla Breeze theme is CSS: custom properties under a data-theme selector. The DTCG file is a second form of the same theme, for tools that do not read CSS. The library writes and reads the 2025.10 version of the format.
{ "border": { "radius": { "m": { "$type": "dimension", "$value": { "value": 0.5, "unit": "rem" } } } }}
What is provided
The Theme Composer on the design-system site puts the three elements on one page with editable specimens.
Token files for the bundled themes
Every theme stylesheet in the package has a token file beside it with the same name. A theme that has its own dark values has a second file for them. themes/manifest.json lists both under dtcg and dtcgDark for each theme.
https://unpkg.com/vanilla-breeze/dist/cdn/themes/classic.csshttps://unpkg.com/vanilla-breeze/dist/cdn/themes/classic.tokens.jsonhttps://unpkg.com/vanilla-breeze/dist/cdn/themes/classic-dark.tokens.json
The files are written from the theme's CSS when the library is built, so they hold what the theme sets and not the library's defaults. Where a theme's value refers to a token the theme does not set, such as a hover color worked out from the default --color-primary, the value in the file is computed with the library's default for that token. The theme library page lists every theme with links to its files.
How tokens map
The prefix of a custom property decides its group and type in the file. The rest of the name is the token name.
| Custom property |
Group |
$type |
--color-* | color | color |
--hue-*, --lightness-*, --chroma-* | color.seeds | number |
--font-* | typography.family | fontFamily |
--font-size-* | typography.size | dimension |
--font-weight-* | typography.weight | fontWeight |
--line-height-* | typography.lineHeight | number |
--letter-spacing-* | typography.letterSpacing | dimension |
--size-* | spacing | dimension |
--radius-* | border.radius | dimension |
--border-width-* | border.width | dimension |
--duration-* | motion.duration | duration |
--ease-* | motion.easing | cubicBezier |
--shadow-* | effect.shadow | shadow |
A custom property with any other prefix is left out of the file. Its name is recorded in a list, unmapped, in the file's $extensions. On import the table is read the other way, and a token in a group that is not in the table is reported as ignored.
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.
Importing a file from another tool
<theme-import> takes a file by paste, by upload or from a URL, and sets the resulting custom properties on one element of the page, #preview unless you name another with target. It does not write to :root, so a trial does not change the rest of the site. Tokens it cannot place are listed under Ignored tokens
.
<theme-import target="#preview"></theme-import> <section id="preview"> <h2>Sample</h2> <button type="button">Reserve a seat</button></section>
The import reads these parts of the format, whichever tool wrote the file:
- A group's
$type applies to the tokens inside it.
- A reference such as
{color.primary} becomes var(--color-primary).
- A composite
typography token is split into the separate properties the library uses: --font-name, --font-size-name, --font-weight-name, --line-height-name and --letter-spacing-name.
- A token with
light and dark values becomes one light-dark() value.
The file has to use the group names in the mapping table. A file from another design system usually does not, so rename its groups first or expect most tokens to be ignored.
The catalog
<theme-catalog> lists eight token sets already renamed to fit: Material Design 3, IBM Carbon, Salesforce Lightning, GOV.UK, Atlassian, Tailwind, Bootstrap and Catppuccin Mocha. Each shows its license, and its attribution once applied. The files are in the Vanilla Breeze package under dist/cdn/themes/catalog/. The element looks for them at /cdn/themes/catalog on your own site, so point it at the package when you load Vanilla Breeze from a CDN.
<theme-catalog target="#preview" catalog-base="https://unpkg.com/vanilla-breeze/dist/cdn/themes/catalog"></theme-catalog>
Exporting from a page
<theme-export> reads the custom properties set in the style attribute of one element, :root unless you name another with scope. Those are the changes made on the page by the editable specimens, an import or your own script. It does not read the theme's stylesheet: for a bundled theme, use its token file.
<theme-export format="dtcg" live></theme-export>
The element's menu switches between CSS, plain JSON and DTCG. In DTCG the download is named theme.tokens.json and has the media type application/design-tokens+json. With live the output is rebuilt each time an editable specimen changes a token.