-
Notifications
You must be signed in to change notification settings - Fork 81
Tokens build
This page describes the structure of the design tokens build comprising of style-dictionary
, @tokens-studio/sd-transforms
and tokens source via Tokens Studio plugin for Figma.
-
calcite-design-tokens/
-
src
build
config
tokens
types
test
-
Custom tooling to generate the tokens build. These are based on style-dictionary
and @tokens-studio/sd-transforms
, so most of the information needed can be acquired via those sites (see Additional resources below), with the exception of:
-
overrides
– provides hooks to override built-in or 3rd-party utilities (e.g., preprocessors, transforms) if needed (e.g., preserve test snapshots for phased updates or to mitigate breaking changes) -
shared
– updated via preprocessors to store metadata prior to token merging for future reference -
utils
– custom utils (e.g., enums, dictionary manipulation, token type lookup)
The configuration for each design tokens platform (e.g., css, sass, es6) output (breakpoints, core, semantic).
- The color configs (
light
/dark
) are used as reference for other build utils (e.g., formats) - The
docs
andjs
outputs are considered internal and not supported from a public perspective
Source of truth for all design tokens.
These files are updated via the Tokens Studio Figma plugin, so do not manually update these files. Any changes need to come from the plugin.
This contains custom types from the build and extensions of style-dictionary
.
Contains snapshot tests for the tokens build output.
For more details, see the tokens testing guide.
- Use the provided APIs as much as possible