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

postcss-prefix-selector

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-prefix-selector - npm Package Compare versions

Comparing version

to
1.11.0

35

index.js

@@ -9,19 +9,20 @@ module.exports = function postcssPrefixSelector(options) {

return function (root) {
if (
ignoreFiles.length &&
root.source.input.file &&
isFileInArray(root.source.input.file, ignoreFiles)
) {
return;
}
if (
includeFiles.length &&
root.source.input.file &&
!isFileInArray(root.source.input.file, includeFiles)
) {
return;
}
return {
postcssPlugin: 'postcss-prefix-selector',
Rule(rule) {
if (
ignoreFiles.length &&
rule.source.input.file &&
isFileInArray(rule.source.input.file, ignoreFiles)
) {
return;
}
if (
includeFiles.length &&
rule.source.input.file &&
!isFileInArray(rule.source.input.file, includeFiles)
) {
return;
}
root.walkRules((rule) => {
const keyframeRules = [

@@ -53,3 +54,3 @@ 'keyframes',

});
});
},
};

@@ -56,0 +57,0 @@ };

{
"name": "postcss-prefix-selector",
"description": "Prefix all CSS rules with a selector",
"version": "1.10.0",
"version": "1.11.0",
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",

@@ -14,3 +14,3 @@ "contributors": [

"dependencies": {
"postcss": "^8.2.10"
"postcss": "^8.3.6"
},

@@ -22,2 +22,3 @@ "devDependencies": {

"mocha": "~7.2.0",
"postcss-nested": "^5.0.6",
"prettier": "^2.0.0"

@@ -24,0 +25,0 @@ },

@@ -123,7 +123,9 @@ # postcss-prefix-selector

- `prefix` - This string is added before every CSS selector.
- `exclude` - It's possible to avoid prefixing some selectors by passing an array of selectors (strings or regular expressions).
- `transform` - In cases where you may want to use the prefix differently for different selectors, it is possible to pass in a custom transform method.
- `ignoreFiles` - List of ignored files for processing.
- `includeFiles` - List of included files for processing.
| Name | Type | Description |
|-|-|-|
| `prefix` | `string` | This string is added before every CSS selector |
| `exclude` | `string[]` or `RegExp[]` | It's possible to avoid prefixing some selectors by passing an array of selectors |
| `transform` | `Function` | In cases where you may want to use the prefix differently for different selectors, it is possible to pass in a custom transform method |
| `ignoreFiles` | `string[]` or `RegExp[]` | List of ignored files for processing |
| `includeFiles` | `string[]` or `RegExp[]` | List of included files for processing |

@@ -130,0 +132,0 @@ ## Maintainer