Socket
Socket
Sign inDemoInstall

postcss-color-functional-notation

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-color-functional-notation - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

19

dist/index.cjs.js

@@ -172,3 +172,5 @@ 'use strict';

const onCSSDeclaration = decl => {
const onCSSDeclaration = (decl, {
result
}) => {
const {

@@ -179,3 +181,16 @@ value: originalValue

if (hasAnyColorFunction(originalValue)) {
const valueAST = postcssValuesParser.parse(originalValue);
let valueAST;
try {
valueAST = postcssValuesParser.parse(originalValue, {
ignoreUnknownWords: true
});
} catch (error) {
decl.warn(result, `Failed to parse value '${originalValue}' as a color function. Leaving the original value intact.`);
}
if (typeof valueAST === 'undefined') {
return;
}
valueAST.walkType('func', onCSSFunction);

@@ -182,0 +197,0 @@ const modifiedValue = String(valueAST);

@@ -170,3 +170,5 @@ import { parse } from 'postcss-values-parser';

const onCSSDeclaration = decl => {
const onCSSDeclaration = (decl, {
result
}) => {
const {

@@ -177,3 +179,16 @@ value: originalValue

if (hasAnyColorFunction(originalValue)) {
const valueAST = parse(originalValue);
let valueAST;
try {
valueAST = parse(originalValue, {
ignoreUnknownWords: true
});
} catch (error) {
decl.warn(result, `Failed to parse value '${originalValue}' as a color function. Leaving the original value intact.`);
}
if (typeof valueAST === 'undefined') {
return;
}
valueAST.walkType('func', onCSSFunction);

@@ -180,0 +195,0 @@ const modifiedValue = String(valueAST);

20

package.json
{
"name": "postcss-color-functional-notation",
"version": "4.0.0",
"version": "4.0.1",
"description": "Use space and slash separated color notation in CSS",

@@ -29,3 +29,3 @@ "author": "Jonathan Neal <jonathantneal@hotmail.com>",

"dependencies": {
"postcss-values-parser": "6.0.0"
"postcss-values-parser": "6.0.1"
},

@@ -36,10 +36,10 @@ "peerDependencies": {

"devDependencies": {
"@babel/core": "7.15.5",
"@babel/preset-env": "7.15.6",
"eslint": "7.32.0",
"postcss": "8.3.6",
"postcss-tape": "6.0.1",
"pre-commit": "1.2.2",
"rollup": "2.56.3",
"rollup-plugin-babel": "4.4.0"
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.4",
"eslint": "^8.2.0",
"postcss": "^8.3.11",
"postcss-tape": "^6.0.1",
"pre-commit": "^1.2.2",
"rollup": "^2.60.0",
"rollup-plugin-babel": "^4.4.0"
},

@@ -46,0 +46,0 @@ "babel": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc