tokens-studio / figma-plugin

Official repository of the plugin 'Tokens Studio for Figma' (Figma Tokens)
https://www.figma.com/community/plugin/843461159747178978
MIT License
1.32k stars 190 forks source link

Gradients with reduced opacity (written as RGBA) break the swatch in the plugin (but work fine on applying the token) #2893

Closed robinhoodie0823 closed 2 weeks ago

robinhoodie0823 commented 2 weeks ago

Gradients with reduced opacity (written as RGBA) break the swatch in the plugin (but work fine on applying the token).

Steps to reproduce the behavior: linear-gradient (45deg, rgba({colors.gray.50}, 0.4) 0%, rgba({colors.gray.900}, 1) 100%) (You can see broken swatch with the linear-gradient token above)

Expected behavior Swatch should not be broken.

robinhoodie0823 commented 2 weeks ago

The root cause comes from the mis-formatted linear-gradient value. As pointed in the screenshot, the should have to be removed. We are going to implement user input validation in the coming epic. image