style-dictionary
style-dictionary copied to clipboard
Unable to run a transform on a value from reference
So im doing this
"primary": {
"value": "{color.common.brand.primary.value}",
"makeShades": true
}
The makeShades bool is a custom prop for my generate function to match and then do a transform on, it works fine when i put an actual value in the value prop, but if you put a reference like above it just completely skips all the transforms, how do i get it to pull the reference for that value first then run the transforms on the color??
This is kindof a strange situation but I cant work out why it wouldn't be setup to do references first then transforms.
In your custom transform, can you try with "transitive: true"? Reference: https://amzn.github.io/style-dictionary/#/transforms?id=transitive-transforms
I just recently made a color adjustment transform too (for pressed / disabled / hovers) and scratched my head over this. 😅
I will try tomorrow cheers