resolveThemeVars
Theme
stable
Flatten an IOrigamTheme object into a flat TThemeVars map of --origam-* CSS custom properties. The cssVars escape hatch always wins over vars on key collision.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- themerequiredIOrigamTheme
- The theme object to resolve. Its vars property is converted via the token authoring path; its cssVars property provides a raw --origam-* escape hatch that overrides vars on collision.
API
Return value
The value returned by this util.
- A flat TThemeVars record mapping --origam-* property names to their CSS values, ready to be applied as inline styles on the theme root element.
Usage
Examples
Ready-to-paste usage snippets.
Flatten a theme object to CSS vars