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: Mon, 24 Nov 2014 16:33:20 -0800
Message-ID: <CAAWBYDA3j_PwELLuCLYKJrpWwxwVTtYe58h7njhz=jVeoNiOvQ@mail.gmail.com>
To: www-style list <www-style@w3.org>
On Mon, Nov 24, 2014 at 4:29 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> Because of this confused identity, pseudo-elements don't work well
> with our abstractions.  If you want both the <a> and <b> children of
> an element, you can write `foo > *:matches(a,b)`.  But if you want the
> ::before and ::after pseudo-elements of an element, there's no real
> equivalent - it's impossible to first transform the match set into one
> that contains the pseudo-elements in question, and then write a
> :matches() argument that'll match them.

In a just world, I could write `foo :: *:matches(before, after)`,
because ::before and ::after would be normal elements in the
pseudo-tree, with tagnames and everything, and then all of this would
Just Work™.  Yet more evidence that this is not the best of all
possible worlds.

(Some of you might recall that I tried to make this happen a few years
ago, but the exceptions needed to make existing code like `::before
{...}` work were too much.)

Received on Tuesday, 25 November 2014 00:34:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:49 UTC