Re: :invalid

On 09/28/2010 05:02 PM, Jonas Sicking wrote:
> This would mean that almost all the time :invalid is not what you want
> to use. For all CSS purposes people will want to use :<x>-invalid.
> Basically the only time you'd want to use :invalid is if you want to
> use querySelectorAll to find a list of all invalid controls, or
> querySelector to find the first invalid control.

A workaround for querySelector and querySelectorAll would be to use the
constraint validation API. This should be enough to get the first
invalid and all invalid form controls. Though, for a more complex rule,
it can be much more annoying.

However, are there real chances to have :invalid specified in a way that
will satisfy everybody or the plan would be to have :invalid different
in each implementations and let the authors specify the style with
:invalid regardless of the implementation?

--
Mounir

Received on Wednesday, 29 September 2010 01:26:24 UTC