Re: [csswg-drafts] [css-nesting] How to resolve nested CSS with pseudo elements in the parent (#7433)

preprocessor tools come in roughly two categories : `scss`-like nesting and those that attempt to follow the specification.

`scss`-like nesting doesn't have this issue at all because they manipulate selector bits as strings. `.foo { &--bar }` -> `.foo--bar {}`

Those that attempt to follow the specification had/have bugs and deviations.
A recent attempt to align [postcss-nesting](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting#readme) with the specification is why I opened this issue in the first place.

No tool that I know of ever fully expanded nested selectors as would be required to follow the specification.

> I think I might prefer this over nesting not working inside pseudo-elements and the unexpected specificity.

I think everyone agrees that this should work and that it is more a matter of finding the right way to fix this.

-- 
GitHub Notification of comment by romainmenke
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7433#issuecomment-1287189945 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 21 October 2022 16:31:31 UTC