- From: Sean Hogan <shogun70@westnet.com.au>
- Date: Fri, 09 Feb 2007 09:38:34 +1100
I might be missing something obvious, but...
When are ValidityState properties updated?
And when are CSS pseudo-classes (:valid, :invalid, :in-range,
:out-of-range) updated?
The spec doesn't say, so I tentatively assume they are meant to always
be up-to-date.
Many textual input form-controls would begin in one or another invalid
state (valueMissing, patternMismatch) however authors would typically
want CSS validity styles to apply only after checkValidity() - either a
manual one or the automatic one performed by form-submission.
Of course, one could always dynamically tag form-controls with some
appropriate class (e.g. "validated") and hang your styles off that.
input[type=text]:invalid.validated { background-color: red; }
Which wouldn't work when scripting is disabled, but should be sufficient.
Anyway, could you clarify this?
Ta,
SDH
Received on Thursday, 8 February 2007 14:38:34 UTC