|
|
@@ -22,6 +22,10 @@
|
|
|
|
|
|
this.rulesMinifier = this.rulesMinifier || (() => {
|
|
|
|
|
|
+ const SEPARATOR_TYPES = ["descendant", "child", "sibling", "adjacent"];
|
|
|
+ const REMOVED_PSEUDO_CLASSES = ["focus", "focus-within", "hover", "link", "visited", "active"];
|
|
|
+ const REMOVED_PSEUDO_ELEMENTS = ["after", "before", "first-line", "first-letter"];
|
|
|
+
|
|
|
return {
|
|
|
process: doc => {
|
|
|
const selectorsData = new Set();
|
|
|
@@ -70,10 +74,6 @@ this.rulesMinifier = this.rulesMinifier || (() => {
|
|
|
}
|
|
|
|
|
|
function getFilteredSelector(selector) {
|
|
|
- const SEPARATOR_TYPES = ["descendant", "child", "sibling", "adjacent"];
|
|
|
- const REMOVED_PSEUDO_CLASSES = ["focus", "focus-within", "hover", "link", "visited", "active"];
|
|
|
- const REMOVED_PSEUDO_ELEMENTS = ["after", "before", "first-line", "first-letter"];
|
|
|
-
|
|
|
const selectors = cssWhat.parse(selector);
|
|
|
return cssWhat.stringify(selectors.map(selector => filterPseudoClasses(selector)));
|
|
|
|