themeVarsToVars

Theme
stable

Flatten the structured IThemeVars token bucket (color / rounded / border / typo / shadow / spacing / motion groups) into a flat record of `--origam-*` CSS variable names to values.

API

Signature

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

vars
required
IThemeVars
The structured token bucket. Each top-level key (`color`, `rounded`, `border`, `typo`, `shadow`, `spacing`, `motion`) is walked recursively and its leaves are emitted as `--origam-{group}-{path}: value` pairs.

API

Return value

The value returned by this util.

A flat `Record<string, string>` keyed by full CSS variable names. Groups not present in the input are silently skipped.

Usage

Examples

Ready-to-paste usage snippets.

Flatten a partial token bucket

typescript