Better Invalid Input Selectors

(thanks @joao6246 https://discord.com/channels/436251713830125568/1091150479385448558/1091170631766253668)
input:not(:placeholder-shown):invalid {
/* styles here only apply *after* the user has entered data */
/* rather than immediately after the input is selected */
}
input:not(:placeholder-shown):invalid {
/* styles here only apply *after* the user has entered data */
/* rather than immediately after the input is selected */
}
https://css-tricks.com/form-validation-ux-html-css/#aa-sub-trick-testing-if-an-input-has-a-value-or-not
Chris Coyier
CSS-Tricks
Form Validation UX in HTML and CSS | CSS-Tricks
You can do an impressive amount of form validation with just HTML attributes. You can make the user experience pretty clean and clear with CSS selectors. But
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server