Skip to content

Insert more needed parenthesis#116

Closed
mischnic wants to merge 1 commit into
postcss:masterfrom
mischnic:precedence-115
Closed

Insert more needed parenthesis#116
mischnic wants to merge 1 commit into
postcss:masterfrom
mischnic:precedence-115

Conversation

@mischnic

@mischnic mischnic commented Sep 2, 2020

Copy link
Copy Markdown
Contributor

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

basher commented Oct 12, 2020

Copy link
Copy Markdown

Any updates on this PR?

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

Copy link
Copy Markdown

Any news? This bug is seriously blocking! 😰

@dangelion

Copy link
Copy Markdown

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
Copy Markdown
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