figma-plugin icon indicating copy to clipboard operation
figma-plugin copied to clipboard

Importing variables or styles with decimal numbers leads to unexpected results

Open six7 opened this issue 9 months ago • 0 comments

As we're converting to a base font size token (e.g. 16px) we're converting px based values to rem based values. However, while doing that conversion we seem to not respect any max decimal size.

Happens both on variable import and text style import. There's likely a step inbetween where we should round to 3 decimal numbers

To reproduce

  • Create a number variable with 33.6 as its value
  • Click on Import variables

or

  • Create a text style with 33.6 as the font size
  • Click on Import styles

Image

six7 avatar Apr 29 '24 07:04 six7