Skip to content

Instantly share code, notes, and snippets.

@ChucKN0risK
Created October 5, 2022 09:39
Show Gist options
  • Save ChucKN0risK/3bc89fe45869d05ce6e3f34e7dca7b41 to your computer and use it in GitHub Desktop.
Save ChucKN0risK/3bc89fe45869d05ce6e3f34e7dca7b41 to your computer and use it in GitHub Desktop.
Specify configuration rule to get measurements as CSS variables in rem
{
"name": "Design Tokens / Measurements",
"path": "./output/styles/measurements.css",
"filter": {
"types": [
"measurement"
]
},
"parsers": [
{
"name": "sort-by",
"options": {
"keys": [
"name"
]
}
},
{
"name": "px-to-rem",
"options": {
"keys": ["fontSize"]
}
},
{
"name": "to-css-custom-properties",
"options": {
"formatName": "kebabCase"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment