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.35k stars 195 forks source link

Opacity issue: some values are wrongly rounded in Figma #2380

Open UdayHyma opened 11 months ago

UdayHyma commented 11 months ago

Is your feature request related to a problem ? Please describe. When you apply an opacity value to a token the value is rounded in some cases: Value: 0.1% > rounded to 1% in Figma Value: 0.01% > rounded to 1% in Figma Value: 0.0001 (without a unit specified) > rounded to 0% Value 0.001 does work properly and reflects as 0.01% in Figma.

Describe the solution you’d like Value: 0.1% > should resolve as 0.1% in Figma Value: 0.01% > should resolve as 0.01% in Figma Value: 0.0001 (without a unit specified) > should resolve as 0.01% in Figma

Describe alternatives you've considered The opacity value can be set to 0.1% by expressing the value in the form of a decimal value (0.001)

Additional context

image image image

Value 0.001 does work properly and reflects as 0.01% in Figma.

image
UdayHyma commented 2 months ago

@SamIam4Hyma @six7 This issue still persists in 2.0 rc9

leemlller commented 2 days ago

Faceit same problem. in my case to achieve Figma's 0.01% i must input 0.0001% in TS which is not very obvious