Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing variables or styles with decimal numbers leads to unexpected results #2706

Closed
six7 opened this issue Apr 29, 2024 · 2 comments · Fixed by #3241
Closed

Importing variables or styles with decimal numbers leads to unexpected results #2706

six7 opened this issue Apr 29, 2024 · 2 comments · Fixed by #3241
Assignees
Labels
bug Something isn't working Figma import Figma variables migration assist issues for entering TS ecosystem needs-responder plugin v2 variables, UI, WTCG format, Bitbucket

Comments

@six7
Copy link
Collaborator

six7 commented Apr 29, 2024

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 six7 added the bug Something isn't working label Apr 29, 2024
@six7 six7 moved this to 📤 Ready for dev in Tokens Studio for Figma Roadmap Apr 29, 2024
@SamIam4Hyma SamIam4Hyma added Figma variables Figma import plugin v2 variables, UI, WTCG format, Bitbucket labels Jun 5, 2024
@LukeFinch LukeFinch assigned LukeFinch and unassigned LukeFinch Jun 5, 2024
@rbosker
Copy link
Collaborator

rbosker commented Nov 20, 2024

issue still present in 2.2.0 version

@SamIam4Hyma SamIam4Hyma added needs-responder migration assist issues for entering TS ecosystem labels Nov 26, 2024
@six7
Copy link
Collaborator Author

six7 commented Dec 13, 2024

Marking as ready for work. I'd say we should respect what the user entered in the variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Figma import Figma variables migration assist issues for entering TS ecosystem needs-responder plugin v2 variables, UI, WTCG format, Bitbucket
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

5 participants