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

Re: Styling HTML placeholder attribute

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 22 Jan 2013 10:03:36 -0500
Message-ID: <50FEAA48.3070606@mit.edu>
To: www-style@w3.org
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?


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

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