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

Incorrect calc reduction of 0 - (A - B) / C #88

Closed
bakkerjoeri opened this issue Jul 25, 2019 · 2 comments · Fixed by #93
Closed

Incorrect calc reduction of 0 - (A - B) / C #88

bakkerjoeri opened this issue Jul 25, 2019 · 2 comments · Fixed by #93

Comments

@bakkerjoeri
Copy link

Given the following CSS:

left: calc(0px - (100vw - 10px) / 2);

Which I expect to become:

left: calc((-100vw - - 10px) / 2);

Actually becomes the mathematically incorrect:

left: calc((-100vw - - 10px) / -2);

Calculations with the structure 0 - (A - B) / C are incorrectly reduced to (-A - -B) - C while the correct solve is (-A - -B) / C.

@alexander-akait
Copy link
Collaborator

bug, PR welcome

@bakkerjoeri
Copy link
Author

Hah, awesome! Thanks for picking this up @jasminexie 🎉

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

Successfully merging a pull request may close this issue.

2 participants