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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 24 Nov 2014 13:15:57 -0800
Message-ID: <CAAWBYDCee7XfdYXpAQ54eD1uxFM0WUmPheQWB3vosNLtmA9DzA@mail.gmail.com>
To: Dan Beam <dbeam@chromium.org>
Cc: "www-style@w3.org" <www-style@w3.org>
On Mon, Nov 24, 2014 at 1:09 PM, Dan Beam <dbeam@chromium.org> wrote:
> Hi,
>
> I'd like to match empty ::pseudo-elements, e.g.:
>
>   ::before:empty {
>     content: 'placeholder text while something asynchronously loads...';
>   }
>
> But ::before:empty doesn't seem to work for me.
>
> Is this intended[1] or an implementation defect in Chrome?

: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.

What exactly are you trying to do with it?

~TJ

* I'm subtexting myself.
Received on Monday, 24 November 2014 21:16:45 UTC

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