themeToCss
Theme
stable
Serialise an IOrigamTheme object to a complete CSS rule string (selector + declarations). Pure function with no DOM access — usable both at runtime and in the Theme Builder CSS export.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- themerequiredIOrigamTheme
- The theme descriptor including `vars` (structured token bucket), `cssVars` (raw escape hatch), `name`, and `mode`.
API
Return value
The value returned by this util.
- A CSS rule string of the form `<selector> {\n --origam-…: value;\n …\n}\n`. Empty when the resolved token map is empty.
Usage
Examples
Ready-to-paste usage snippets.
Produce a CSS rule for a named theme