Re: Styling HTML placeholder attribute

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 UTC