Re: :host pseudo-class

On Thu, Apr 30, 2015 at 10:51 PM, Anne van Kesteren <annevk@annevk.nl> wrote:
> On Fri, May 1, 2015 at 7:39 AM, Elliott Sprehn <esprehn@chromium.org> wrote:
>> That's still true if you use ::host, what is the thing on the left hand side
>> the ::host lives on? I'm not aware of any pseudo element that's not
>> connected to another element such that you couldn't write {thing}::pseudo.
>
> ::selection?

::selection has a host element.  If you use it by itself it just means
you're selecting *::selection.

> But maybe you're right and the whole
> pseudo-class/pseudo-element distinction is rather meaningless. But at
> least pseudo-class til date made some sense.

I still don't understand what you find wrong with this.  It's not that
":host() [can] match an element that cannot otherwise be matched",
it's that the host element element is featureless, save for the
ability to match :host.  (That's the definition of a featureless
element - it's allowed to specify particular things that can still
match it.)  In other words, it's not :host that's magical, it's the
host element itself that's magical.

~TJ

Received on Tuesday, 5 May 2015 00:09:32 UTC