- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Fri, 28 Sep 2018 02:15:55 +0000
- To: public-svg-issues@w3.org
> UA sheets are not matched in Shadow tree context, at least in Gecko. I wouldn't expect a UA sheet (nor a user sheet) to match :host, for example, though maybe other impls differ? UA stylesheets definitely *are* matched in shadow contexts; if they weren't, then everything in a shadow would become unstyled inline elements. (Hmm, don't know if this is actually written anywhere. The fact that UA stylesheets get applied to shadow trees is definitely required in practice; it matching "in a shadow context" falls out of the [definition of matching against a shadow tree](https://drafts.csswg.org/css-scoping/#selectors-data-model).) > So, to recap: I was using the :host() selector incorrectly; it matches the actual host element in the light tree, not the shadow root node created for the host. No, you were using it correctly; in a shadow context, the host element is treated as if it were the root of the shadow tree. `:host(use) > symbol` will match any "top-level" `symbol` element in a shadow tree, as long as the host element is a `use`. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/svgwg/issues/502#issuecomment-425299017 using your GitHub account
Received on Friday, 28 September 2018 02:15:56 UTC