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

Re: [selectors] Is ::pseudo-element:empty valid?

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 25 Nov 2014 06:44:52 -0800
Message-Id: <96D9DF02-F2D7-4EDB-9FB5-7D1428A68111@gmail.com>
Cc: Dan Beam <dbeam@chromium.org>, "www-style@w3.org" <www-style@w3.org>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

> On Nov 24, 2014, at 1:15 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
> :empty either *always* matches ::before pseudos, or isn't applicable
> to them at all (depending on some unstated additional requirements in
> the spec that really need to be written down*).  It's not actually
> useful for anything.

::before doesn't exist unless it has content, so your second statement seems more true. Except that an empty string as content does bring it into existence, and that should match :empty, I would think.

But not generally useful. Once you insert an image into it, it is not empty, even if the image hasn't loaded.
Received on Tuesday, 25 November 2014 14:45:27 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:26 UTC