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).

7, 10, 13 → rounded to multiples of 4
Round To Round values to the nearest unit with /roundTo(unit).

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.

Basic Expression Apply expressions to each value with /transform(expression).

Using Index

index is 1-based (ordinal). Use index0 for explicit 0-based access.

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.

Only the first 5 items are doubled
Selective Transforms Apply to specific tokens using a range selector.

Predicates

Use [odd] and [even] to apply different transforms to alternating items.

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.

Absolute Values Set specific token values with /override(key = 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.

Override vs Transform Override states what a value is; transforms below act 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.

Feeding Scales Overriding a scale's input re-derives the scale.

Multiple Overrides

Override several tokens at once:

Multiple Overrides Override several tokens at once.

Relative Operations

Modify relative to the generated value with +, -, *, /.

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.

Template Expressions Transform token names with template expressions using /rename("template").

Using {name}

Include the original token name in the template:

Using {name} Include the original token name in the template.

Math Expressions

Evaluate expressions in templates — {index * 100} produces 100, 200, 300...

Math Expressions Evaluate expressions in templates.

String Functions

Chain find(), replace(), case(), and remove() for name manipulation.

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.

Chaining Operations Chain multiple pipeline operations. They apply in order.

Reference (Block-Level)

/reference(scope, direction) matches token values to an existing scale. Direction: nearest, up, or down.

Reference (Block-Level) /reference(scope, direction) matches token values to an existing scale.

Next: Iteration — generate token variations from lists and matrices.