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

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