- From: Anne van Kesteren <annevk@annevk.nl>
- Date: Fri, 1 May 2015 07:25:45 +0200
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: "www-style@w3.org" <www-style@w3.org>, "L. David Baron" <dbaron@dbaron.org>, WebApps WG <public-webapps@w3.org>
On Fri, May 1, 2015 at 2:07 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote: > On Thu, Apr 30, 2015 at 2:27 AM, Anne van Kesteren <annevk@annevk.nl> wrote: >> On Mon, Apr 27, 2015 at 11:14 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote: >>> Pseudo-elements are things that aren't DOM elements, but are created >>> by Selectors for the purpose of CSS to act like elements. >> >> That's not true for e.g. ::-webkit-slider-thumb as I already indicated. > > Sure it is. <input type=range> has no children, and the shadow tree > is sealed, so the fact that a shadow tree even exists is hidden from > DOM. As far as CSS is capable of discerning, there is no thumb > element, so the pseudo-element makes sense. That seems rather arbitrary. To the browser it is a DOM element and to CSS it is too. E.g. at the global level CSS will have to reason about what it means to override the element's existing styles. >> My problem is not with the ability to address the host element, but by >> addressing it through a pseudo-class, which has so far only been used >> for matching elements in the tree that have a particular internal >> slot. > > I don't understand what distinction you're trying to draw here. Can > you elaborate? A pseudo-class selector is like a class selector. You match an element based on a particular trait it has. Your suggestion for :host() however is to make it match an element that cannot otherwise be matched. That's vastly different semantics -- https://annevankesteren.nl/
Received on Friday, 1 May 2015 05:26:10 UTC