Support for `:invalid` pseudo-class