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

fix: substracted css-variable from zero #111

Merged
merged 2 commits into from Aug 7, 2020

Conversation

csr632
Copy link
Contributor

@csr632 csr632 commented Aug 7, 2020

Fix: #110

@@ -62,7 +62,7 @@ function reduceAddSubExpression(node, precision) {
isValueType(node.left.type) &&
node.left.value === 0 &&
node.operator === "-" &&
node.right.type !== "Function"
!containCSSFunction(node.right)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename isFunction or isCSSFunction

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it is a recursive process, isn't "containXXX" better than "isXXX" here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with both! Already changed according to your advice.

csr632 added a commit to alibaba-fusion/next that referenced this pull request Aug 7, 2020
csr632 added a commit to alibaba-fusion/next that referenced this pull request Aug 7, 2020
@alexander-akait alexander-akait merged commit 0282bdc into postcss:master Aug 7, 2020
csr632 added a commit to alibaba-fusion/next that referenced this pull request Aug 7, 2020
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.

incorrect reduction of subtraction css-variable from zero
2 participants