-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-scoping][selectors] :root
should resolve to :host
in shadow trees
#11000
Comments
This is indeed an annoying pain point right now when trying to share styles. While you can write Separately and for the same reason could |
YES! Actually, that’s all we need. Since |
@scope
, :scope
should resolve to :host
in shadow trees:root
should resolve to :host
in shadow trees
Highlight pseudo-elements inherit custom properties from |
Even if resolving to Edit: or maybe just let |
Seems reasonable.
Not sure that kind of flexibility is something authors need though, given that
That seems reasonable. |
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: