parsers
parsers copied to clipboard
Color Formatting
I noticed that when I try using to-scss-variables or to-css-custom-properties the color formatting isn't working for border types. Works fine for color token types however.
For example, the following:
{
"name": "Design Tokens / Borders - CSS",
"path": "./output/styles/borders.css",
"filter": {
"types": [
"border"
]
},
"parsers": [
{
"name": "sort-by",
"options": {
"keys": [
"name"
]
}
},
{
"name": "to-css-custom-properties",
"options": {
"formatName": "kebabCase",
"formatTokens": {
"color": "hex"
}
}
}
]
}
outputs as:
--border-grey-100: 1px solid rgba(242, 242, 242, 1);
I'd prefer it to output a hex color value, is that doable?
Hi @kristiandavid, good suggestion 👍 Feel free to open a PR. Otherwise, we will do it when we will have the bandwidth.