frontendfriends / node-combine-mq

Combine matching media queries into one media query definition. Useful for CSS generated by preprocessors using nested media queries.
MIT License
19 stars 11 forks source link

"Aggressive" merging fails when merging an rules with an "invalid" pseudo class rule #16

Open stephenrose opened 9 years ago

stephenrose commented 9 years ago

Duplicated from my ticket here: https://github.com/frontendfriends/grunt-combine-mq/issues/14

As invalid rules are ignored, .grey will be ignored by browsers that are not webkit, and don't support ::-webkit-*

I see a solution being to blacklist rules that are "invalid" (for any reason), so they are not merged with any other rules.

Input CSS

::-webkit-input-placeholder{
  color:grey;
}

.box{
color:grey;
}

Failing output CSS

::-webkit-input-placeholder, .box{
  color:grey;
}