Open
Description
It seems that shadow tokens that use a rgba()
value won't transform the used value inside the rgba() function. That means if my tokens reference a hex value, we don't currently change that hex value to the required rgba() equivalent.
{
"base": {
"value": "#fff",
"type": "color"
},
"rgb": {
"value": "rgb(0, 0, 0)",
"type": "color"
},
"shadow": {
"type": "boxShadow",
"value": [
{
"x": "0",
"y": "1px",
"blur": "1px",
"spread": "0",
"color": "rgba({rgb}, 0.15)",
"type": "dropShadow"
},
{
"x": "0",
"y": "2px",
"blur": "0",
"spread": "0",
"color": "rgba({base}, 0.15)",
"type": "innerShadow"
}
]
}
}
Actual output
--sdShadow: 0 1px 1px 0 rgba(rgb(0, 0, 0), 0.15), 0 2px 0 0 rgba(#fff, 0.15);
Expected output
--sdShadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 2px 0 0 rgba(255, 255, 255, 0.15);