Plain CSS (or Tailwind, Chakra UI,
shadcn/ui, Angular Material, Skeleton — they all build tokens.css).
1. Link the stylesheet
:root:
2. Reference, never copy
Always write the fallback. The value after the comma is what the browser uses if the property
is not defined — because the stylesheet failed to load, or because that token does not exist in
this Theme yet. Use your Theme’s own value, so the unbranded state is your default brand rather
than nothing.
3. Switch brands
var() when the stylesheet changes.
Pass "-" (or nothing) for the Theme with no Variant applied — your own default styling.
Avoiding the flash on switch
Swapping anhref makes the browser fetch before it repaints, so there is a brief moment with the
old brand. If that matters, preload the next one:
<link>
server-side and never switch at all.
Dark mode
Livry has no mode concept. Two approaches, both yours rather than Livry’s:What is not in the file
tokens.css is a lossy projection. CSS has no token types, no groups and no descriptions, and
some DTCG values have no CSS spelling at all.
A token that cannot be written becomes a comment naming its path:
tokens.json instead — see What gets served.