Skip to main content

Crate geoff_theme

Crate geoff_theme 

Source

Structs§

DesignTokens
A parsed DTCG design token file. Groups and tokens are interleaved in the same tree — a node with $value is a token, without is a group.
FlatToken
A flattened token with its full path and resolved type.
Token
A single design token with a value and optional metadata.
UnresolvedRef
An unresolved token reference found after resolution.

Enums§

TokenValue
The value of a design token — can be a primitive, a reference, or a composite.

Functions§

find_unresolved
Scan resolved tokens for any remaining {reference} strings that weren’t resolved. Checks both standalone references and inline references within larger strings.
generate_css
Generate CSS custom properties from a flat token map. If dark_tokens is provided, tokens differing between light and dark use the light-dark() function with -on-light / -on-dark primitives.
generate_css_with_prefix
merge_tokens
Deep-merge child token JSON over parent token JSON. Child values override parent values at the same path. Parent values not present in child are preserved.
resolve_references
Resolve {reference} strings in token values to their target values. References use curly-brace syntax: "{color.primary}" resolves to the value of the token at path color.primary.
resolve_references_with_base
Resolve {reference} strings in token values, checking a base token set first. This lets theme tokens reference design system tokens.

Type Aliases§

CompositeValue
A composite token value (dimension, typography, shadow, border, etc.).