[whatwg] Customize HTML5 forms placeholder style

Dean Edwards dean.edwards at gmail.com
Sun Feb 21 16:11:23 PST 2010


On 21/02/2010 21:46, Aryeh Gregor wrote:
> One implementation idea would be a pseudo-element, with something like
> this in the UA stylesheet:
>
> ::placeholder { opacity: 0.6; }


Why not just extend :empty to include <input> with no value?

It reads nicely:

input[required]:empty:after {
   content: "This value is required";
   color: red;
}

-dean




More information about the whatwg mailing list