W3C home > Mailing lists > Public > www-style@w3.org > November 2014

Re: [selectors] Assistance requested in figuring out the data model of pseudo-elements

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 26 Nov 2014 09:43:41 -0800
Message-ID: <CAAWBYDA9J9eEVkfTFvfhzv2KeF053FRFO76fkSXX02h7roDvLg@mail.gmail.com>
To: Benjamin Poulain <benjamin@webkit.org>
Cc: Fran├žois REMY <francois.remy.dev@outlook.com>, www-style list <www-style@w3.org>
On Tue, Nov 25, 2014 at 6:04 PM, Benjamin Poulain <benjamin@webkit.org> wrote:
> For me, one of the best property of :matches() is its use for composition or
> selectors.
> Today, you can take any selector list, put it inside a :matches(), "augment
> it", and everything works as developers expect. I believe this to be a great
> property and I have received very positive feedback so far.

I mean, I get the appeal.  My issue is that I can't figure out how to
map it to the data model without significant complications.

> On the other hand, I need to look a bit more into some issues raised on this
> thread, in particular applying filters on pseudo elements. Some cases are
> not clear to me yet, for example:
>     ::first-line:blank
>     ::before:blank { content: "non-blank"; }
>     etc

The structural pseudo-classes don't apply to pseudo-elements.

> Some cases would force a lot of complexity on the engine, for example:
>     ::first-letter:hover { ... }

We mostly intend it for the "full element" pseudo-elements - ::before
and ::after.  We can probably limit it like that.explicitly.

> Overall I also fail to see what is the problem with defining :matches() as a
> generator of a disjunction. That would mean :matches() itself has no
> intrinsic properties, which seem like a useful definition.

A "generator of a disjunction" makes :matches() a special syntax form,
not a real pseudo-class.  That would be somewhat easier, but it would
also be weird.  Dunno if I wanna go down that road.

Received on Wednesday, 26 November 2014 17:44:34 UTC

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