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
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- themerequisIOrigamTheme
- The theme descriptor including `vars` (structured token bucket), `cssVars` (raw escape hatch), `name`, and `mode`.
API
Valeur de retour
La valeur retournée par cet util.
- A CSS rule string of the form `<selector> {\n --origam-…: value;\n …\n}\n`. Empty when the resolved token map is empty.
Usage
Exemples
Extraits de code prêts à coller.
Produce a CSS rule for a named theme