Загрузка видео...

Не удалось загрузить видео

На главную

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,362 просмотров • 2 лет назад •via X (Twitter)

Комментарии: 10

Фото профиля Gordon Shumway
Gordon Shumway2 лет назад

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

Фото профиля Wes Bos
Wes Bos2 лет назад

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

Фото профиля Alex Painter
Alex Painter2 лет назад

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

Фото профиля Wes Bos
Wes Bos2 лет назад

go outside? Or make another JS framework

Фото профиля Ben Bennitt
Ben Bennitt2 лет назад

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

Фото профиля Steve Rios
Steve Rios2 лет назад

VERY nice!

Фото профиля Alexey Lyakhov
Alexey Lyakhov2 лет назад

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

Фото профиля Wes Bos
Wes Bos2 лет назад

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

Фото профиля Eddy Erkelens 🧑‍🏫
Eddy Erkelens 🧑‍🏫2 лет назад

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

Фото профиля Juan
Juan2 лет назад

@midudev =O!!

Похожие видео