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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 14 Feb 2014 19:50:13 -0800
Message-ID: <CAAWBYDASuDM2KR6Kb4xBKw4-aHoAyYvRLXBnFS24Uvzcd9ujGQ@mail.gmail.com>
To: Andrew Fedoniouk <news@terrainformatica.com>
Cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, www-style list <www-style@w3.org>
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

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