I’m terrified of css. Instead of watching horror movies I watch videos like this where it takes 80 lines of css to implement “simple” input field animation. Props to the instructor 👏🏻.
So I added this design to my project and it looks amazing!! I also added form invalidation events, the borders now display in red when the user has an invalid input. It’s so clean, compact and responsive!
Thank you so much. Perfectly explained, mind-blowing and sure concise. I am so glad to came across with your video. I will be sure about subscribing your channel.
THat was really helpful, One thing I spotted is ---> don't you think form__input:not(:focus) is a redundant check, I think just using .form__input:not(:placeholder-shown) would do!!
Thanks a lot, it's extremely helpful , I didn't knew that we could achieve such kind of animation by just using CSS . Without using any Javascript You showed how to achieve it.
Hi Angela This is an amazing tutorial, thank you very much for your work. You got yourself a new subscriber :D I think I can optimise one CSS selector: .form__input:not(:placeholder-shown):not(:focus) ~ .form__label This way you drop the .form__input class duplication and I think it still works as expected :)
Hey dear, just a doubt pushed into me instead of .form__input:not(:placeholder-shown).form__input:not(:focus) ~ .form__label can we use .form__input:valid for this please solve this as it is tricking me.
Fantastic solution to one of the most common mistakes people make with forms. You use placeholders instead of labels because it simply looks better. The problem is that from a UX perspective, that is a mistake because the placeholder disappears when you click on the input. This way you can have both the looks and experience :)
Thank you very much for this tutorial! I've learned a lot! Can I ask you a question? Is there a way to apply styles to a textfield blinking cursor? I'm on a project where I haver to emulate a linux términal, but I haven't been able to find information in order to style that kind of cursor! Would you mind giving me a hint on that? Thanks in advance!
Great Video, but how can I fix that if I click on the Label itself that the input gets selected? Currently if I can only select the input field if I click everywhere else than the label. Thanks
If you duplicate the entire div with the class of "form" it will not overlap, but if you just duplicate the input and label elements it will. This is because the position property of the form is set to relative and the input is absolute.
@@angeladesign737 ya i have done it ..but for try when i put like this placeholder = "." means content init it works fine now , But I m confused as of logic 🧐