@atomico/postcss-tokens
Makes it easy to manage tokens as CSS custom properties for design system development
Token syntax
Example of simple tokens
color:
primary:
text: white
background: tomato{
"color": {
"primary": {
"text": "white",
"background": "tomato"
}
}
}{
"color": {
"primary": {
"text": { "value": "white" },
"background": { "value": "tomato" }
}
}
}Example of variations by attributes
space:
around: 1rem
between: 1rem
safe: .5rem
(size=small):
around: .8rem
between: .8rem
safe: .4remAtRule @tokens
root: string
filter: string
use: string
Configuration in postcss
prefix: string
defaultValue : boolean
Last updated
Was this helpful?
