Patterns

CSS theme tokens

Select a fixed data-theme attribute and cascade custom property overrides through descendants.

Formal Syntax & Structure

react syntaxreact
<main data-theme={dark ? "dark" : "light"} />

Working Example

Example Snippetreact
.theme { color: var(--ink); }
React Reference