postcss-pseudoelements
Advanced tools
Comparing version 2.0.0 to 2.1.0
17
index.js
@@ -9,19 +9,14 @@ | ||
'before', | ||
'after' | ||
'after', | ||
'first-letter', | ||
'first-line' | ||
] | ||
var replacements = new RegExp('::(' + selectors.join('|') + ')', 'gi'); | ||
return function(css) { | ||
css.eachRule(function(rule) { | ||
selectors.forEach(function(selector) { | ||
rule.selectors.forEach(function(selector) { | ||
rule.selector = selector.replace(new RegExp('::(' + selectors.join('|') + ')', 'gi'), ':$1'); | ||
}); | ||
}); | ||
rule.selector = rule.selector.replace(replacements, ':$1'); | ||
}); | ||
} | ||
} |
{ | ||
"name": "postcss-pseudoelements", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "PostCSS plugin to add single-colon CSS 2.1 syntax pseudo selectors (i.e. :before)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -17,2 +17,2 @@ # postcss-pseudoelements | ||
`selectors`: Array of pseudo-element selectors to rewrite with single and double colons. Note that these values will be used in a regexp without escaping. Defaults to `['before','after']` | ||
`selectors`: Array of pseudo-element selectors to rewrite with single and double colons. Note that these values will be used in a regexp without escaping. Defaults to `['before','after','first-letter','first-line']` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
3419
8
100