Jetons.CSS.Formatter (jetons v0.2.2)

Copy Markdown View Source

Shared formatting utilities for CSS property generation.

Summary

Functions

Formats a CSS property with value and optional description.

Checks if a token path matches any of the given inline prefixes.

Formats a token path as a CSS custom property name.

Converts a raw DTCG token value to CSS value.

Wraps properties in a CSS selector block.

Functions

format_property(prop, value, desc)

Formats a CSS property with value and optional description.

matches_prefix?(path, prefixes)

Checks if a token path matches any of the given inline prefixes.

to_css_prop(path)

Formats a token path as a CSS custom property name.

to_css_value(raw_value, resolved_map, inline_prefixes)

Converts a raw DTCG token value to CSS value.

wrap_selector(selector, props)

Wraps properties in a CSS selector block.