Error after interaction
input:user-invalid {
border-color: #dc2626;
}
The :user-invalid pseudo-class matches a control that is invalid after user interaction. It prevents showing error styles before the user has tried to fill the field.
input:user-invalid {
border-color: #dc2626;
}input:user-invalid {
border-color: #dc2626;
}:user-invalid is a CSS selector.
Supported in modern browsers.
Bottom line: Safe for modern sites. Keep readable defaults without the selector.
Continue with :modal.
CODETOFUN NEWS
Get the latest IT news, programming updates, and technology trends directly on your phone.
Your daily dose of tech, straight to your feed.
2 people found this page helpful