Re: Styling HTML placeholder attribute

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

>> - default style: "opacity: 0.54;" [2].
>
> The last bit is in the UA stylesheet, isn’t it?

Yes.

-Boris

Received on Tuesday, 22 January 2013 15:04:10 UTC