- From: L. David Baron <dbaron@dbaron.org>
- Date: Mon, 23 Mar 2015 18:28:37 -0700
- To: www-style@w3.org
- Message-ID: <20150324012837.GA8888@pescadero.dbaron.org>
The definitions of the :host, :host(), and :host-context() pseudo classes in http://drafts.csswg.org/css-scoping/#host-selector all refer to the selectors being "evaluated in the context of a shadow tree". However, I don't see a definition of what this means. Tab and I discussed this briefly on IRC last week: http://logs.csswg.org/irc.w3.org/css/2015-03-16/#e533427 where Tab gave the following rough definition: <TabAtkins> Not well! I wasn't sure what the right hooks were. But it should be "from a <style> or <link> inside a shadow tree, or in a DOM api (somehow) rooted in a shadow tree". ... <TabAtkins> I think that if you can start the selector in a shadow tree or on a shadow root, you're "in the context" But this makes me wonder how one of the examples in the spec works. http://drafts.csswg.org/css-scoping/#host-element-in-tree explicitly says that one of the goals of these selectors is styling the shadow host (rather than just selecting its descendants based on something about it). Given that, it's not clear to me how this intends the matching and application of style rules to work. What makes the selectors that come from a style or link element inside the shadow tree be applied when deciding what styles apply to the host element, when everything seems to say that they apply only inside the shadow tree? -David -- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla https://www.mozilla.org/ 𝄂 Before I built a wall I'd ask to know What I was walling in or walling out, And to whom I was like to give offense. - Robert Frost, Mending Wall (1914)
Received on Tuesday, 24 March 2015 01:29:02 UTC