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: Andrew Fedoniouk <news@terrainformatica.com>
Date: Fri, 14 Feb 2014 22:19:57 -0800
Message-ID: <CALRQH79e61vwJrU-Jv3R2S0PP-=wN67jfW1kiJ9uu8F31b80sg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, www-style list <www-style@w3.org>
On Fri, Feb 14, 2014 at 7:50 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 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.
>

I believe discussion went too far from the subject.

I just wanted to say that "never" here:
"In CSS, attribute node pseudo-elements never generate boxes"
is too strong.

If you allow to create boxed pseudo-elements out of the air
(before/after) then why "never" for attributes?

AFAIR no one expected what ::before and ::after would
be used for. These cases for example:
http://css-tricks.com/pseudo-element-roundup/
are quite far from initial quotation idea.

-- 
Andrew Fedoniouk.

http://terrainformatica.com
Received on Saturday, 15 February 2014 06:20:26 UTC

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