Inheritance
Clone token groups to create derived sets. Inheritance copies structure and values, letting you build variations without repeating definitions.
Basic Inheritance
The /inherit() generator clones a token group, copying its structure and resolved values into a new group.
Why inherit? Instead of duplicating token definitions, inherit from a source and let changes propagate automatically.
Clone a Group
Use /inherit($source) to copy all tokens from another group:
Scope Traversal
Inherit from groups in other scopes using $...ref ellipsis references:
Inherit + Transform
Chain /inherit() with pipelines to create derived token sets — like line heights from font sizes or letter spacing from a scale.
Derived Scale
Inherit a modular scale and transform the values to produce a related set:
Multiple Derived Sets
Inherit the same source multiple times with different transformations:
Deep Inheritance
Inheritance copies nested structures recursively. The entire tree of tokens is cloned, preserving all levels.
Pipelines After Inherit
Any pipeline operator can follow /inherit() — transform, round, override, rename. They apply to the inherited values.
Key features: Clones structure, copies final values (after pipelines),
supports $...ref for scope traversal, and preserves token types.
Next: Color Generators — create color palettes with harmony, scale, and contrast generators.