Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-custom-properties-fallback

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-custom-properties-fallback - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

dist/import-from.js

@@ -14,3 +14,3 @@ const fs = require('fs');

const root = postcss.parse(css, {
postcss.parse(css, {
from

@@ -17,0 +17,0 @@ });

@@ -10,5 +10,9 @@ const getCustomPropertiesFromImports = require('./import-from.js');

const isTransformableDecl = decl => customPropertiesRegExp.test(decl.value); // eslint-disable-next-line no-empty-pattern
const isTransformableDecl = decl => customPropertiesRegExp.test(decl.value);
const {
nodeToString
} = require('postcss-values-parser'); // eslint-disable-next-line no-empty-pattern
module.exports = opts => ({

@@ -35,3 +39,3 @@ postcssPlugin: 'postcss-custom-properties-fallback',

if (fallback) {
if (fallback && fallback.length === 1) {
node.nodes.push({

@@ -44,2 +48,13 @@ type: 'divider',

});
} //when fallback value contains more then one node, stringify them with value parser used to parse the customProperties object and add as one node type word.
if (fallback && fallback.length > 1) {
node.nodes.push({
type: 'divider',
value: ','
}, {
type: 'word',
value: fallback.map(fallbackNode => nodeToString(fallbackNode)).join(' ')
});
}

@@ -46,0 +61,0 @@ });

@@ -13,3 +13,3 @@ {

},
"version": "1.0.1",
"version": "1.0.2",
"main": "dist/plugin.js",

@@ -26,4 +26,4 @@ "files": [

"dependencies": {
"postcss-value-parser": "^4.1.0",
"postcss-values-parser": "^4.0.0"
"postcss-value-parser": "^4.2.0",
"postcss-values-parser": "^6.0.2"
},

@@ -34,6 +34,6 @@ "peerDependencies": {

"devDependencies": {
"eslint": "^7.13.0",
"microbundle": "^0.12.4",
"postcss": "^8.1.8",
"tap": "^14.10.8"
"eslint": "^8.11.0",
"microbundle": "^0.14.2",
"postcss": "^8.4.12",
"tap": "^16.0.0"
},

@@ -40,0 +40,0 @@ "keywords": [

@@ -61,3 +61,3 @@ # PostCSS Custom Properties Fallback

```bash
npm install postcss-custom-properties--fallback --save-dev
npm install postcss-custom-properties-fallback --save-dev
```

@@ -64,0 +64,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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