Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input field validation #21

Open
russbiggs opened this issue Dec 11, 2024 · 0 comments
Open

input field validation #21

russbiggs opened this issue Dec 11, 2024 · 0 comments

Comments

@russbiggs
Copy link
Member

the :valid and :invalid pseudo classes are a little brittle and require a bit more hand-holding to make them work as intended. The :user-valid and :user-invalid pseudo classes solve a lot of these issue but are relatively new so may have browser support issues: https://caniuse.com/mdn-css_selectors_user-valid

Other options could be do to something like this:

.input:not(:placeholder-shown):valid

.input:not(:placeholder-shown):invalid

Which has better support. Currently we have decent workarounds in place, but it would be nice if the design system handled these out-of-the-box

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant