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

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.

~TJ

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