iamstarkov / jss-increase-specificity

Increases specificity of selectors. Port of postcss-increase-specificity
11 stars 1 forks source link

Support multi class selectors #4

Open kof opened 7 years ago

kof commented 7 years ago

In case selector is something like ".a, .b", right now you would prefix it like ":not(#\20).a, .b" It should be ":not(#\20).a, :not(#\20).b" though. (I used repeat=1 just to show)

kof commented 7 years ago

The problem though is its hard to do so correctly because a selector might be like :matches(:hover, :focus), .a so you can't just split by comma.

The easiest way would be to only prefix single class selectors.

mistadikay commented 7 years ago

What is the most correct way to do that? I'm guessing that using rule.selectorText might not be the right way because we have #2

kof commented 7 years ago

Need to look closer at #2 first.