W3C home > Mailing lists > Public > www-style@w3.org > January 2013

Re: Styling HTML placeholder attribute

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Tue, 22 Jan 2013 16:25:53 +0100
Message-ID: <50FEAF81.6050902@kozea.fr>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: www-style@w3.org
Le 22/01/2013 16:03, Boris Zbarsky a écrit :
> On 1/22/13 9:58 AM, Simon Sapin wrote:
>> If an input’s placeholder can have CSS properties that are not the same
>> as the input itself, it is a pseudo-element. The only meaning I can
>> imagine for a :placeholder pseudo-class is selecting inputs that are
>> currently showing their placeholder.
>>
>> I seem that IE10 and Gecko18- are using pseudo-class*syntax*  for
>> something that is really a pseudo-element.
> No, they have a pseudo-class (and I'm not quite sure why you thought
> otherwise).

Oh, I misunderstood Mounir’s email, sorry.


> For example, in Gecko 18, input:-moz-placeholder selects
> (and styles) inputs that have a placeholder showing.  It does not style
> the placeholder itself.

That’s a pseudo-class indeed. I agree with Mounir that a pseudo-element 
is more suited.

-- 
Simon Sapin
Received on Tuesday, 22 January 2013 15:26:20 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:04 GMT