Skip to content

Commit

Permalink
remove unmergeableSelectors variable
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed May 19, 2019
1 parent 788ba28 commit 82ee052
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions tools/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,6 @@ const ignoreSelectors = [
/:not\(li\.moved\)/, // invalid :not content (not a simple selector)
];

// list of regexes matching selectors that shouldn't be merged with other
// selectors because they can generate invalid rules.
const unmergeableSelectors = [
/(-moz-|-ms-|-webkit-).+/,
];

// list of shorthand properties where values are compared insensitively
// to their order, e.g. "1px solid red" is equal to "1px red solid".
const shorthands = [
Expand Down Expand Up @@ -429,12 +423,7 @@ function format(css) {
}

function unmergeables(selectors) {
return selectors.filter(selector => {
for (const re of unmergeableSelectors) {
if (re.test(selector)) return true;
}
return false;
});
return selectors.filter(selector => /(-moz-|-ms-|-webkit-).+/.test(selector));
}

function unmergeableRules(selectors, value) {
Expand Down

0 comments on commit 82ee052

Please sign in to comment.