Re: [csswg-drafts] [css-cascade-6] A way for <style> elements to scope to their parent element (#6606)

If I understand this right, the new feature required for this is a `:style-parent` pseudo-class (`:style-root`? `:style-host`?) which:

- For stylesheets in the document `<head>` refers to the document root.
- For nested stylesheets, refers to their parent element.

I don't see any particular reason it should be restricted to use in `@scope` if we add it. Could also be used for basic child/descendant selectors, or the `:in()` pseudo-class. I'm not sure if that's feasible from an implementation perspective, but it's an interesting idea.

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


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

Received on Monday, 13 September 2021 16:35:09 UTC