Success only after typing
input:user-valid {
outline: 2px solid #16a34a;
}
The :user-valid pseudo-class matches a form control that is valid after the user has interacted with it. Unlike :valid, empty required fields do not look valid on page load.
input:user-valid {
border-color: #16a34a;
}input:user-valid {
outline: 2px solid #16a34a;
}:user-valid is a CSS selector.
Supported in modern browsers.
Bottom line: Safe for modern sites. Keep readable defaults without the selector.
Continue with :user-invalid.
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