W3C home > Mailing lists > Public > www-style@w3.org > April 2015

Re: :host pseudo-class

From: L. David Baron <dbaron@dbaron.org>
Date: Sun, 26 Apr 2015 20:37:38 -0700
To: Anne van Kesteren <annevk@annevk.nl>
Cc: "www-style@w3.org" <www-style@w3.org>, WebApps WG <public-webapps@w3.org>
Message-ID: <20150427033738.GA26214@pescadero.dbaron.org>
On Saturday 2015-04-25 09:32 -0700, Anne van Kesteren wrote:
> I don't understand why :host is a pseudo-class rather than a
> pseudo-element. My mental model of a pseudo-class is that it allows
> you to match an element based on a boolean internal slot of that
> element. :host is not that since e.g. * does not match :host as I
> understand it. That seems super weird. Why not just use ::host?
> Copying WebApps since this affects everyone caring about Shadow DOM.

We haven't really used (in the sense of shipping across browsers)
pseudo-elements before for things that are both tree-like (i.e., not
::first-letter, ::first-line, or ::selection) and not leaves of the
tree.  (Gecko doesn't implement any pseudo-elements that can have
other selectors to their right.  I'm not sure if other engines

I'd be a little worried about ease of implementation, and doing so
without disabling a bunch of selector-related optimizations that
we'd rather have.

At some point we probably do want to have this sort of
pseudo-element, but it's certainly adding an additional dependency
on to this spec.


𝄞   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 Monday, 27 April 2015 03:38:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:53 UTC