Re: [csswg-drafts] [css-scoping][selectors] `:root` should resolve to `:host` in shadow trees (#11000)

> Highlight pseudo-elements inherit custom properties from `:root`. Does this mean that in shadow dom they will be inherited from the host?

Seems reasonable.



> Even if resolving to `:host` is more natural, right now authors can choose `:host` vs `:root`. If both `:root` and `:scope` behave as `:host`, then authors will lose the ability to target the actual root. So maybe just changing `:scope` but not `:root` would offer more flexibility.

Not sure that kind of flexibility is something authors need though, given that `:root` is meaningless in shadow roots.

> Edit: or maybe just let `:root` match the host, while in `:host-context(:root)` it refers to the actual root (or host's host)?

That seems reasonable.

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


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

Received on Tuesday, 22 October 2024 03:13:10 UTC