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

As @LeaVerou [said](https://github.com/w3c/csswg-drafts/issues/11000#issuecomment-2428121818), `:root` doesn't match anything currently in a shadow tree so the change would be to make it do something useful when sharing a stylesheet also used in the main document. 

A relevant use case would be to define a series of custom properties on `:root`, and you might want to ensure these are defined as they are in `:root` for a given shadowRoot if you know that they may have been reset via inheritance.

Regarding `:host-context(:root)`,  I think it's unfortunate to rely much on something like this since we're in a bad spot on `:host-content` where Webkit has refused to implement it.

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


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

Received on Thursday, 21 November 2024 02:48:30 UTC