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

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