Skip to content
This repository has been archived by the owner on Mar 18, 2019. It is now read-only.

Is postcss-calc messed up? #254

Closed
corysimmons opened this issue Jan 22, 2016 · 3 comments
Closed

Is postcss-calc messed up? #254

corysimmons opened this issue Jan 22, 2016 · 3 comments

Comments

@corysimmons
Copy link

Seems like it's not functioning completely correctly: peterramsing/lost#242 (comment)

@MoOx
Copy link
Owner

MoOx commented Jan 23, 2016 via email

@corysimmons
Copy link
Author

Yeah sorry about the vague issue. Laziness on my part.

Does this clear it up?

// Lost creates this (works in IE)
width: calc(99.99% * 1/3 - (1rem - 1rem * 1/3));

// postcss-calc rounds it to this (doesn't work in IE)
width: calc(99.99% * 1/3 - 0.66667rem);

If precision is turned to 2 by default, it seems to work. It seems like IE can only deal with 2 precision (e.g. in IE 100px / 3 = 33.33px whereas in every other browser it's 33.328px). Is there a particular reason you picked 5 by default?

@corysimmons
Copy link
Author

This issue should probably be migrated to postcss-calc

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

No branches or pull requests

2 participants