:user-error pseudo-class represents an input element with incorrect input, but only after the user has interacted with it.
:user-error must match an
:out-of-range, or empty
:required form element.
Browser Support (tested using latest versions)
/* Style properties */
/* In this example, any input element that is invalid, out of range, or required (but empty), AFTER the user has interacted with it, will have a red background. */
Information is based on Selectors Level 4 - W3C Working Draft (last updated on May 2, 2013)
Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C liability, trademark and document use rules apply.