postcss-hexrgba
Advanced tools
Comparing version 2.0.1 to 2.1.0
17
index.js
'use strict'; | ||
const postcss = require('postcss'); | ||
const valueParser = require('postcss-value-parser'); | ||
@@ -61,6 +60,8 @@ | ||
module.exports = postcss.plugin('postcss-hexrgba', () => { | ||
return (css, result) => { | ||
css.walkDecls(decl => { | ||
if (decl.value.indexOf('rgba') === -1) { | ||
module.exports = () => { | ||
return { | ||
postcssPlugin: 'postcss-hexrgba', | ||
Declaration(decl, { result }) { | ||
if (!decl.value.includes('rgba')) { | ||
return; | ||
@@ -70,4 +71,6 @@ } | ||
ruleHandler(decl, result); | ||
}); | ||
}, | ||
}; | ||
}); | ||
}; | ||
module.exports.postcss = true; |
{ | ||
"name": "postcss-hexrgba", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "PostCSS plugin that adds shorthand hex methods to rgba() values", | ||
@@ -23,9 +23,12 @@ "keywords": [ | ||
"dependencies": { | ||
"postcss": "^7.0.14", | ||
"postcss-value-parser": "^4.1.0" | ||
}, | ||
"peerDependencies": { | ||
"postcss": "^8.1.4" | ||
}, | ||
"devDependencies": { | ||
"chai": "^4.2.0", | ||
"eslint": "^5.16.0", | ||
"mocha": "^6.1.1" | ||
"mocha": "^6.1.1", | ||
"postcss": "^8.1.4" | ||
}, | ||
@@ -32,0 +35,0 @@ "scripts": { |
@@ -6,3 +6,3 @@ # PostCSS HexRGBA | ||
_Part of [Rucksack - CSS Superpowers](http://simplaio.github.io/rucksack)_ | ||
_Part of [Rucksack - CSS Superpowers](https://www.rucksackcss.org/)_ | ||
@@ -9,0 +9,0 @@ **Input** |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7398
59
4
1
+ Addednanoid@3.3.7(transitive)
+ Addedpicocolors@1.1.0(transitive)
+ Addedpostcss@8.4.47(transitive)
+ Addedsource-map-js@1.2.1(transitive)
- Removedpostcss@^7.0.14
- Removedpicocolors@0.2.1(transitive)
- Removedpostcss@7.0.39(transitive)
- Removedsource-map@0.6.1(transitive)