Skip to main content
romanusname
New Member
Feb 12, 2024 7:29 AM UTC
Question

Are decimal numbers ok?

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
Feb 12, 2024 7:46 AM UTC

99.99% of the time it’s not ok

romanusname
New Member
Feb 12, 2024 8:54 AM UTC

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
New Member
Feb 12, 2024 9:05 AM UTC

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
Feb 12, 2024 12:07 PM UTC

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.