Re: :invalid pseudo class

On Fri, Jul 23, 2010 at 10:35 PM, Estelle Weyl <estelle@weyl.org> wrote:
> Is there an :invalid pseudoclass? I can't find it in the documentation, but
> when a form field is invalid,  :invalid { background-color: red; } works.
> See http://standardista.com/webkit/ch6/email.html

Not all pseudos are defined by CSS itself - host languages are allowed
to define their own.  In particular, HTML5 defines a number of
pseudoclasses, including :invalid:
http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#pseudo-classes.

~TJ

Received on Saturday, 24 July 2010 21:02:37 UTC