Jetons.CSS.Transformer (jetons v0.2.0)

Copy Markdown View Source

CSS custom properties transformer.

Generates CSS custom properties from DTCG token config.

When passed a resolver document (via $resolver key), generates multi-theme CSS with selector blocks for each modifier context. Otherwise, generates single-theme CSS with the configured selector.

Summary

Functions

Helper to flatten raw DTCG config to token list.

Functions

flatten(config)

Helper to flatten raw DTCG config to token list.

Use this when your output format needs flattened tokens (e.g., CSS).