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

Could we round / strip fraction pixels? #163

Closed
GoalSmashers opened this issue Nov 2, 2013 · 5 comments
Closed

Could we round / strip fraction pixels? #163

GoalSmashers opened this issue Nov 2, 2013 · 5 comments
Assignees
Milestone

Comments

@GoalSmashers
Copy link
Contributor

Could we make it -418px or -418.5px?

div{transform:translateY(-418.50000000000006px)}
@ghost ghost assigned GoalSmashers Nov 2, 2013
@GoalSmashers
Copy link
Contributor Author

This code is produced by less.js which by default does not do rounding.

@GoalSmashers
Copy link
Contributor Author

It seems safe to round pixels (to 2nd decimal place) but not necessarily other units, e.g:

body { font-size:250px }
p { letter-spacing:0.004em } /* 1px */

@GoalSmashers
Copy link
Contributor Author

@lukeapage
Copy link
Contributor

yep, I think in less have general rules for all numbers so that's why we don't round - e.g. for % its very important sometimes to have lots of precision, but I've never heard of anyone needing it on px.

@GoalSmashers
Copy link
Contributor Author

Neither did we - let's see if anyone starts complaining once it gets released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants