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

Insert more needed parenthesis #116

Closed
wants to merge 1 commit into from

Conversation

mischnic
Copy link
Contributor

@mischnic mischnic commented Sep 2, 2020

Closes #115

One thing that might be causing old tests to fail is that calc (and the postcss-calc parser) is probably left-associative by default, so no parentheses are needed in cases like (a - b) - c.

@basher
Copy link

basher commented Oct 12, 2020

Any updates on this PR?

@Semigradsky Semigradsky marked this pull request as draft October 12, 2020 15:57
@dangelion
Copy link

Any news? This bug is seriously blocking! 😰

@dangelion
Copy link

Maybe someone could check this library to be inspired
https://github.com/nico-jacobs/postcss-remove-nested-calc
It works, just tried

@ludofischer
Copy link
Collaborator

I don't think approach is going to work, because it adds round brackets where there aren't any in the source, which can change the meaning, and it also add brackets around values which do not contain any variables and so could be simplified.

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.

Operator precedence is not preserved
4 participants