Loading video...
Video Failed to Load
Suuuper handy new CSS: :user-invalid and :user-valid pseudo selectors let you style inputs only once they have been interacted with Just landed in Chrome + Safari, been in Firefox for years.
177,399 views • 2 years ago •via X (Twitter)
10 Comments

This is great! I had to use JS to achieve same functionality multiple times.

There is some angular form validation library that does it on keyup, and i can always tell it's angular because after the first keystroke it yells at you for it being invalid

At some point this is all going to be too easy. What do we do then? Jokes aside, this is 🔥

go outside? Or make another JS framework

Working on form validation today. Wes and the X algo delivering 👊

VERY nice!

How long it will take for tailwind to support user-valid/invalid ?

Looks like it's already been added, but not yet shipped. You can use [&:user-invalid]:border-red-500 with arbitrary syntax until then

@argyleink This should have been launched in 2020. But nevertheless: nice! Handy and usefull!

@midudev =O!!
Related Videos
Sensitive content
For over 100 years, FF & FG have been running this state & they haven't been working in your best interests. Now you have a chance to vote for a new government with new ideas and a fresh approach. You can vote for change. Vótáil Sinn Féin. #GE2024
Sinn Féin
29,444 views • 1 year ago

