Skip to main content
Question

Are decimal numbers ok?

  • February 12, 2024
  • 4 replies
  • 319 views

romanusname

I know that decimal numbers in a project are bad practice. But sometimes it’s okay?

For example, I scale a frame inside which is an icon made of two vectors.

I’m a beginner freelancer and I want to learn how to do it right

This topic has been closed for replies.

4 replies

Gleb
  • Power Member
  • 4710 replies
  • February 12, 2024

99.99% of the time it’s not ok


romanusname
  • Author
  • New Member
  • 2 replies
  • February 12, 2024

Please tell me. There is an icon frame with vectors inside it. If vectors have decimal size values, is this normal or is it also bad practice?


romanusname
  • Author
  • New Member
  • 2 replies
  • February 12, 2024

If I understand correctly, decimal values ​​are unacceptable in those places with which a front-end developer will interact. Naturally, it will not transfer each vector svg icon separately. Therefore, they can be left fractional, scaling the parent frame. Right?)


Gleb
  • Power Member
  • 4710 replies
  • February 12, 2024

In case of icons you need to avoid decimal values in order for the icon to render correctly without anti-aliasing issues. If you have decimal values in straight lines or corners, such objects would render blurry on the screen.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings