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

Calc Parenthesis Bug with multiple properties #511

Closed
zackkrida opened this issue Apr 3, 2015 · 4 comments
Closed

Calc Parenthesis Bug with multiple properties #511

zackkrida opened this issue Apr 3, 2015 · 4 comments

Comments

@zackkrida
Copy link

I'm having the same issue described in: #496 but in the latest version of clean-css.

Specifically though, it's only occurring in the presence of other properties. It's very odd. An example:

Input

.test {
    left: calc(99.99% * -1/3 - (30px - 30px * -1/3) + 30px);
}
.test2 {
    margin-right: 30px;
    left: calc(99.99% * 1/3 - (30px - 30px * 1/3) + 30px);
}

Output (lines broken for clarity)

.test{left:calc(99.99% * -1 / 3 - (30px - 30px * -1 / 3) + 30px)}
.test2{margin-right:30px;left:calc(99.99% * 1 / 3 - (30px - 30px * 1 / 3)+ 30px)}

Super-annoying, and i'm assuming it might have something to do with the (re)ordering of properties. I'll look into it myself, just wanted to share here in case anyone more familiar with the clean-css codebase feels like diving in first. Thanks!

@zackkrida
Copy link
Author

Also, disabling advanced options is a suitable fix in the meantime.

@jakubpawlowicz
Copy link
Collaborator

@zackcote That's puzzling. I'll take a look tomorrow morning.

jakubpawlowicz added a commit that referenced this issue Apr 4, 2015
We're waiting for #429 to have it fixed properly, but here's an
intermediate fix.
@jakubpawlowicz
Copy link
Collaborator

@zackcote It's fixed in 3.1.9 - there's an ongoing issue (#429) I'm working on right now, so it'll be much better in upcoming 3.2.

@zackkrida
Copy link
Author

Much appreciated, thanks!

On Sat, Apr 4, 2015, 4:23 AM Jakub Pawlowicz notifications@github.com
wrote:

@zackcote https://github.com/zackcote It's fixed in 3.1.9 - there's an
ongoing issue (#429
#429) I'm working on
right now, so it'll be much better in upcoming 3.2.


Reply to this email directly or view it on GitHub
#511 (comment)
.

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