Re: [selectors-nonelement] First draft of a new spec for selecting non-element nodes

On Fri, Feb 14, 2014 at 7:42 PM, Andrew Fedoniouk
<news@terrainformatica.com> wrote:
> As you know ::before and ::after insert [pseudo] elements
> in content flow of matched element.
> input, img, etc. have no content in DOM sense so
> ::after ::before do not work for them.

I know.  Why do you think ::attr() would work any differently?  The
contents of an <input> are still outside the realm of CSS.

Plus, the placeholder you see isn't literally the attribute.  The
placeholder attribute is just one possible way for there to be
placeholder text.  I could easily see a UA adding its own
(author-overrideable) placeholder text for some types of inputs, and
that wouldn't be reflected by the placeholder attribute.

> In any case ::after/::before are just two pseudo elements
> and sometimes[1] you will need more.

I'm definitely aware of that.  Smuggling them in via random unrelated
mechanisms is not the correct way to solve this problem.

~TJ

Received on Saturday, 15 February 2014 03:51:01 UTC