Skip to content

Fix unitless zero values #11

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

Merged
merged 1 commit into from
Jun 9, 2016
Merged

Fix unitless zero values #11

merged 1 commit into from
Jun 9, 2016

Conversation

dennisfrank
Copy link
Contributor

This fixes #7 and should be also related to postcss/postcss-calc#28.

@MoOx
Copy link
Owner

MoOx commented Jun 9, 2016

This might be considered as a breaking change, which annoys me. Maybe this should not be the default?
Can't you fix the sass mixins instead? Cause it's weird to deoptimize this reducer.

@dennisfrank
Copy link
Contributor Author

Hm. But zero values without a value are breaking calc(). Browsers don't calculate it at all.

Check out this simplified example:

http://jsbin.com/punivivipo/edit?html,css,output

@MoOx
Copy link
Owner

MoOx commented Jun 9, 2016

Another WTF CSS :'(.
So will merge and release as a patch.

@MoOx MoOx merged commit 1ce8bd0 into MoOx:master Jun 9, 2016
@dennisfrank
Copy link
Contributor Author

Yeah. It makes no sense. :(

@MoOx
Copy link
Owner

MoOx commented Jun 9, 2016

Released as 1.2.4

@Dylan-Chapman
Copy link

So, what can be done about scenarios where we have something like width: calc(99.99% * 1/1 - 0rem); that can be reduced? This change breaks it from reducing down to simply width: 99.99%. I'd change the output manually if I could, but this is resulting code from Lost grid.

@MoOx
Copy link
Owner

MoOx commented Jun 20, 2016

What about fixing the code generated by Lost grid?

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 this pull request may close these issues.

unitless zero value bug
3 participants