Pipelines
Apply transformations to scales and token groups. Pipelines let you round, transform, override, rename, and reference tokens after generation.
Round To
Round values to the nearest unit with /roundTo(unit). Optional second argument for direction: up, down, or nearest (default).
Transform
Apply expressions to each value with /transform(expression). Use value, each, size, or x as aliases.
Basic Expression
Multiply every value by 1.5.
Using Index
index is 1-based (ordinal). Use index0 for explicit 0-based access.
Selective Transforms
Apply to specific tokens using a range selector. Use position ranges, name lists, or predicates.
Predicates
Use [odd] and [even] to apply different transforms to alternating items.
Override
/override(key = value) states what a value is — as if it had been written that way. It applies where the token is born, wherever the line sits, and everything built from the value derives from the overridden one.
Absolute Values
loose is overridden to 90 instead of the generated value.
Override vs Transform
Override is a statement, transform is a verb: base is authored as 5, then the transform doubles it — the result is 10. A /transform below always acts on the overridden value.
Feeding Scales
Overriding a scale's input re-derives the scale — wherever the override line sits. The steps come out 8, 12, 16.
Multiple Overrides
Override several tokens at once:
Relative Operations
Modify relative to the generated value with +, -, *, /.
Rename
Transform token names with template expressions using /rename("template").
Template Expressions
gu01 → spacing-1, gu02 → spacing-2, etc.
Using {name}
Include the original token name in the template:
Math Expressions
Evaluate expressions in templates — {index * 100} produces 100, 200, 300...
String Functions
Chain find(), replace(), case(), and remove() for name manipulation.
Case modes: uppercase, lowercase, titlecase, camelcase, kebabcase, snakecase.
Selectors work with rename too: /rename("prefix-{name}", [1..3]).
Combining Pipelines
Chain multiple pipeline operations. They apply in order: transform → round → override → rename.
Chaining Operations
Transform, round, then override specific values.
Reference (Block-Level)
/reference(scope, direction) matches token values to an existing scale. Direction: nearest, up, or down.
Next: Iteration — generate token variations from lists and matrices.