postcss-prefix-selector
Advanced tools
Comparing version
12
index.js
@@ -16,3 +16,3 @@ | ||
rule.selectors = rule.selectors.map(function (selector) { | ||
if (options.exclude && ~options.exclude.indexOf(selector)) { | ||
if (options.exclude && excludeSelector(selector, options.exclude)) { | ||
return selector | ||
@@ -25,1 +25,11 @@ } | ||
} | ||
function excludeSelector(selector, excludeArr) { | ||
return excludeArr.some(function(excludeRule) { | ||
if (excludeRule instanceof RegExp) { | ||
return excludeRule.test(selector) | ||
} else { | ||
return selector === excludeRule | ||
} | ||
}); | ||
} |
{ | ||
"name": "postcss-prefix-selector", | ||
"description": "Prefix all CSS rules with a selector", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -0,0 +0,0 @@ |
Sorry, the diff of this file is not supported yet
5102
1.96%29
45%