-
Notifications
You must be signed in to change notification settings - Fork 34
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
Conversation
src/lib/reducer.js
Outdated
@@ -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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
This reverts commit 87eb444. fix: postcss/postcss-calc#111
This reverts commit 87eb4441a6ba89ca3a95d2efa7f81f6228522e44. fix: postcss/postcss-calc#111
Fix: #110