[whatwg] Customize HTML5 forms placeholder style

Dean Edwards dean at edwards.name
Mon Feb 22 06:35:32 PST 2010


On 22 February 2010 14:26, Tab Atkins Jr. <jackalmage at gmail.com> wrote:
>> It gets around the need for a new :placeholder pseudo-class:
>>
>> input[placeholder]:empty {
>>  color: red;
>> }
>
> To get it to act like implementations do, you have to use
> "input[placeholder]:empty:not(:focus)".  That's pretty complex.  ^_^
>

Ah, good point. It's not quite so readable now. :(

-dean



More information about the whatwg mailing list