Skip to content

[Bug]: Integer tokens with a unit "px" as a reference have an extra 0 at the end of the number #362

Description

@superpacmanchef

What happened?

Transforming tokens which are a integer or evaluate to and integer, and have a unit reference at the end of them i.e {dimenstion.scale}{unit.pixel} - when transformed have an extra 0 at the end of the number - 5 to 50, 10 to 100 - before the unit.
This behaviour does not occur when the resulting number is a float.

Reproduction

Here is a reproduction showing :

  • the bug not happening with the string "px"
  • the bug happening with the reference to "px",
  • the bug happening with an expression evaluating to an integer
  • the bug not happening with an expression evaluating to a float.

Expected output

Integer number with a reference "px" should not have an extra 0 at the end before the unit.

Version

2.0.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriageTo be reproduced as bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions