cssinjs / jss

JSS is an authoring tool for CSS which uses JavaScript as a host language.
https://cssinjs.org
MIT License
7.06k stars 397 forks source link

[jss-pseudo] Support a short notation for pseudo selectors #334

Open kof opened 7 years ago

kof commented 7 years ago

Why?

How? We can check existence of ":" same way we check "&" and add a parent selector before it when extracting to a separate rule.

Another idea: write jss-pseudo plugin and put this functionality into a separate repository. So one can decide if they want to use jss-nested. Potentially we can completely avoid jss-nested by using jss-pseudo + jss-global.

kof commented 7 years ago

This one is also important when used together with jss-isolate, to avoid isolation of pseudo rules.