postcss-calc
Advanced tools
Comparing version
{ | ||
"name": "postcss-calc", | ||
"version": "9.0.0", | ||
"version": "9.0.1", | ||
"description": "PostCSS plugin to reduce calc()", | ||
@@ -32,3 +32,2 @@ "keywords": [ | ||
"license": "MIT", | ||
"repository": "https://github.com/postcss/postcss-calc.git", | ||
"eslintConfig": { | ||
@@ -35,0 +34,0 @@ "extends": [ |
@@ -76,3 +76,4 @@ 'use strict'; | ||
const shouldPrintCalc = | ||
node.type === 'MathExpression' || node.type === 'Function'; | ||
node.type === 'MathExpression' || node.type === 'Function' || | ||
node.type === 'ParenthesizedExpression'; | ||
@@ -82,3 +83,7 @@ if (shouldPrintCalc) { | ||
// a calc() | ||
str = `${calc}(${str})`; | ||
if (node.type === 'ParenthesizedExpression') { | ||
str = `${calc}${str}`; | ||
} else { | ||
str = `${calc}(${str})`; | ||
} | ||
@@ -85,0 +90,0 @@ // if the warnWhenCannotResolve option is on, inform the user that the calc |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
150538
0.06%3993
0.13%0
-100%