[css-scoping][selectors] :root
should resolve to :host
in shadow trees
#11000
Labels
:root
should resolve to :host
in shadow trees
#11000
https://drafts.csswg.org/selectors/#the-scope-pseudo
Currently, if used in regular CSS but outside an
@scope
rule,:scope
resolves to:root
. However, this is not super useful within shadow CSS.:host
would be a lot more natural.This would be a breaking change, but I’d wager the prevalence of
:scope
outside@scope
in shadow CSS is so low that we can still make it.This means the same CSS can be used within Shadow DOM to style the component, as well as using
@import ... scope(...)
to style light DOM elements.The text was updated successfully, but these errors were encountered: