ssivanatarajan / stylelint-group-selectors

Identify the selectors, which can be grouped as they have same set of properties and values.
10 stars 2 forks source link

Clever grouping #2

Closed LyulyaevMaxim closed 5 years ago

LyulyaevMaxim commented 5 years ago

Unfortunately, this plugin sees only сompletely identical selectors. Ideally, if it will work with real cases: .a { display: inline-block; } .b { display: inline-block; opacity: 1;} .c { opacity: 1; } => .a, .b { display: inline-block; } .b, .c { opacity: 1; }

ssivanatarajan commented 5 years ago

Mainly I created this plugin for grouping selectors with the same set of properties, to reduce the size. If we split/add the selector in rules it might change the precedence of the selector. So that only I am grouping exact matches.