[whatwg] WebForms2 validity

Philipp Serafin phil127 at gmail.com
Tue Oct 28 15:03:17 PDT 2008


On Tue, Oct 28, 2008 at 9:27 PM, Eduard Pascual <herenvardo at gmail.com> wrote:
> [The best] solution I can think of this would be an additional pseudo-class, such
> as ":default", ":initial-value", ":non-modified", or anything like
> that (I'm really bad at naming stuff, so please take those only as
> *examples*, because that's what they are), which could be used
> together depending on the needs of each site or application, like
> this:
> :valid {
> // code for "green" higlighting
> }
> :invalid {
> // code for "red" highlighting
> }
> :default {
> // overriding code to remove highlighting (or to apply "white" highlighting)
> }
> :default:invalid {
> // code for "yellow" highlighting
> }
> That's just an example. The idea is that an application may need to
> convey (through styling the validity pseudo-classes) the meanings "you
> have put something wrong here" and "you have to provide something
> here" as different concepts.
>
> Just my thoughts.
>

This seems to overlap with the "@placeholder" proposal. Maybe both
proposals could be merged somehow?

Ideas:
a) Don't include :default but instead define :invalid so that it won't
be set as long as the placeholder is visible;
b) get rid of the placeholder attribute and use :default instead;



More information about the whatwg mailing list