Re: [csswg-drafts] [css-nesting-1] nesting limited to conditional styling of the current element (another proposal) (#8166)

I do like breaking it down into individual grouped use-cases like this to get a clearer view. There are a few small nits, like `@layer` is partly designed for handling the interactions of 'conditional styles for the same element', so it would be a mistake to exclude that from nested contexts.

That said, your proposal still allows basically any selector, since `:is` & `:where` are able to capture the relationships in category 4 - it's just opinionated about where those selectors live. I'm not sure there's much reason to limit what can go inside them, beyond existing limitations? 

On first glance, I feel like I could accomplish most of what I need with this general approach, but I might be missing something. Most interesting to me:

- the selectors that might be copied into a nested context as-is all fall into the category of `@scope`-able, and so they just work without adjustment
- the selectors that require some special handling with a pseudo-class are the sort of thing you couldn't copy/paste into a nested context anyway, because they require more careful integration.

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


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

Received on Thursday, 1 December 2022 17:26:04 UTC