W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2015

Re: :host pseudo-class

From: Anne van Kesteren <annevk@annevk.nl>
Date: Mon, 27 Apr 2015 06:22:50 +0200
Message-ID: <CADnb78jkJ8JwG5sGiWruWE_6LqW-3iR7VwtNQSu=pB4WkaX+gA@mail.gmail.com>
To: "L. David Baron" <dbaron@dbaron.org>
Cc: "www-style@w3.org" <www-style@w3.org>, WebApps WG <public-webapps@w3.org>
On Mon, Apr 27, 2015 at 5:56 AM, L. David Baron <dbaron@dbaron.org> wrote:
> For :host it's less interesting, but I thought a major use of
> :host() and :host-context() is to be able to write selectors that
> have combinators to the right of :host() or :host-context().

Would they match against elements in the host's tree or the shadow
tree? I don't see anything in the specification about this.


> And I tend to think :host, :host(), and :host-context() should
> probably agree on whether to be pseudo-classes or pseudo-elements.

Agreed.


Another reason why I think it should be a pseudo-element is that :host
would make for a suitable pseudo-class to select host elements in a
tree (elements that have an associated shadow root). That is, :host
makes sense within the light tree, and ::host makes sense within the
shadow tree. And given that a shadow tree can also be simultaneously a
light tree due to nesting, we don't want to conflate the two.


-- 
https://annevankesteren.nl/
Received on Monday, 27 April 2015 04:23:17 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:31 UTC