🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

postcss-calc

Package Overview
Dependencies
Maintainers
7
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-calc - npm Package Compare versions

Comparing version

to
9.0.1

3

package.json
{
"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