Closed matthew-dean closed 5 years ago
Could a feature be added to change the default behavior of nested selectors to not append a space? That is, have this:
.a { .b { ... } :hover { ... } }
compile to:
.a.b { ... } .a:hover { ... }
And then requiring & to include a space like:
&
.a { & .b { ... } & :hover { ... } }
Styled-components does something like this for pseudo-elements / pseudo-selectors. (Maybe an option to just select those? Or omit spaces from all?) See: https://www.styled-components.com/docs/basics#pseudoelements-pseudoselectors-and-nesting
It is much easy to make fork of the plug-in with different behavior.
I will post a link to your solution.
Could a feature be added to change the default behavior of nested selectors to not append a space? That is, have this:
compile to:
And then requiring
&
to include a space like:Styled-components does something like this for pseudo-elements / pseudo-selectors. (Maybe an option to just select those? Or omit spaces from all?) See: https://www.styled-components.com/docs/basics#pseudoelements-pseudoselectors-and-nesting