Re: :host pseudo-class

On Monday 2015-04-27 05:49 +0200, Anne van Kesteren wrote:
> On Mon, Apr 27, 2015 at 5:37 AM, L. David Baron <dbaron@dbaron.org> wrote:
> > 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
> > have.)
> >
> > 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.
> 
> Are you saying :host accepts selectors to its right and they would
> potentially result in a match?

Yes.

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().

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

> Even if that were the case it's still
> unclear to me how a pseudo-class is justified. Or are you saying the
> concept of a host element selector is problematic in general?

No.

-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 Monday, 27 April 2015 03:57:17 UTC