style-dictionary-utils
style-dictionary-utils copied to clipboard
Allow `undefined` color when using `css/shadow`
When transforming shadows without a color using css/shadow, the color is set to undefined.
"custom-shadow-stroke": {
"$type": "shadow",
"$value": {
"offsetX": 0,
"offsetY": 0,
"spread": "2px",
"inset": true
}
}
This will generate the following CSS:
--custom-shadow-stroke: 0 0 0 2px undefined inset;
The motivation for this empty color is to allow using two different css variables when defining a box-shadow. For example:
box-shadow: var(--custom-shadow-stroke) var(--custom-shadow-color);