Skip to content

Strange unit math in 2.x #28

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

Closed
shoomyth opened this issue Jun 30, 2017 · 2 comments
Closed

Strange unit math in 2.x #28

shoomyth opened this issue Jun 30, 2017 · 2 comments

Comments

@shoomyth
Copy link

calc(100vw - (100vw - 100%))

I'm using this hack to solve ios scroll bug.

1.3.0: calc(100vw - (100vw - 100%))
2.0: calc(0vw - 100%)

Can't understand new math with different units. This is totally incorrect. I can understand calc(0vw + 100%), but current behavior looks very suspicious.

@codefo
Copy link

codefo commented Jul 31, 2017

Confirm, I've just reproduced this bug on my project.

@andyjansson
Copy link
Contributor

Looks like the following case is wrong: https://github.com/MoOx/reduce-css-calc/blob/master/src/lib/reducer.js#L99

Mind confirming that it's the only incorrect case?

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

3 participants