I Love This CSS Focus Hack

  Рет қаралды 18,613

Web Dev Simplified

Web Dev Simplified

Күн бұрын

The CSS :focus state is simple on the surface, but there is actually quite a lot going on behind the scenes. There are 3 total :focus states you can use in CSS and even a secret fourth state that make :focus much more complicated than it may first appear. In this video I go over everything you need to know about CSS :focus states.
📚 Materials/References:
CSS :has Selector Video: • This Is So Much More T...
CSS :has Selector Article: blog.webdevsimplified.com/202...
🌎 Find Me Here:
My Blog: blog.webdevsimplified.com
My Courses: courses.webdevsimplified.com
Patreon: / webdevsimplified
Twitter: / devsimplified
Discord: / discord
GitHub: github.com/WebDevSimplified
CodePen: codepen.io/WebDevSimplified
⏱️ Timestamps:
00:00 - Introduction
00:29 - :focus
01:16 - :focus-visible
03:05 - :focus-within
04:19 - :focus-visible-within
05:38 - Use Cases
#CSSFocus #WDS #CSS

Пікірлер: 35
@specializer222
@specializer222 25 күн бұрын
I love this short videos about functions in CSS 😍
@lexidugo
@lexidugo 25 күн бұрын
This came at just the right time !!! Thanks so much
@LePhenixGD
@LePhenixGD 25 күн бұрын
The :has pseudo-class really makes CSS easier
@saqibkhanz8417
@saqibkhanz8417 25 күн бұрын
Waiting for your lengthy project-based videos.
@aer0449
@aer0449 23 күн бұрын
Kyle, bro I took your CSS course and I loved it .... Anyone looking to drastically improve on CSS do buy his course, its short and to the point .... I am so thankful to you brother ... Amazing work ❤
@bogdanterzic9297
@bogdanterzic9297 20 күн бұрын
Link to this course?
@bharathnaidu4636
@bharathnaidu4636 22 күн бұрын
you always rocks thanks for the content
@akoladebode-ajayi327
@akoladebode-ajayi327 25 күн бұрын
Thank you sir 😊
@dragenn
@dragenn 23 күн бұрын
This is invaluable!
@WebDevelopmentWithSS
@WebDevelopmentWithSS 24 күн бұрын
This video is amazing.
@imnikki00
@imnikki00 25 күн бұрын
awwwwwwwwwwww thank you ! Im great fan of yours sir
@user-ko1cw6mv4q
@user-ko1cw6mv4q 24 күн бұрын
❣️ great video
@akramilyas6030
@akramilyas6030 25 күн бұрын
thanks for all
@ArielFerro
@ArielFerro 25 күн бұрын
Wow! I had no idea about those CSS selectors for controlling focus. This could spark a really interesting discussion about the accessibility advantages of each approach. But I definitely want to thank you for addressing such a crucial issue for people with low vision by presenting alternative techniques to the traditional ones. Kudos to you!
@Frexuz
@Frexuz 23 күн бұрын
Is the has(focus-visible) doable in tailwind? PS: When you tabbed between the inputs back and forth, as a color-impaired person, I basically didn't see any change between "black" and "red" (and the input cursor is incredibly thin). Please use "blue" in the future :))
@ajiteshmishra0005
@ajiteshmishra0005 18 күн бұрын
What is the difference of using in header and body.
@rayyanabdulwajid7681
@rayyanabdulwajid7681 25 күн бұрын
I have made a click drop-down using css only using css "focus outside". When i click outside the drop-down, the drop-down closes. This was not possible when we were using css checkbox approach
@alexkuehne86
@alexkuehne86 23 күн бұрын
That means :focus-within could also be replaced with :has(:focus)?
@abdullaahmad5503
@abdullaahmad5503 24 күн бұрын
Video on vh and dvh please
@rishiraj2548
@rishiraj2548 25 күн бұрын
🙂👍🎉
@sushantchoudhary07
@sushantchoudhary07 25 күн бұрын
first 🥇
@neimado
@neimado 25 күн бұрын
Please calm down the head shaking while you talk, it's kind of distracting.
@jelilabudu
@jelilabudu 25 күн бұрын
I get your frustration. However, the most important thing you need is to pay attention to is the message. I often watch people with fast speech, native accents, etc, which makes it difficult for me to grasp at once, what they're trying to put across. So, I either lower the speed or, I replay any section part that I don't not understand.
@YO-BIZZY
@YO-BIZZY 25 күн бұрын
That’s the best part tf
@MrHellmager
@MrHellmager 25 күн бұрын
People will really hate no matter what huh 😅
@neimado
@neimado 25 күн бұрын
@@MrHellmager It's not called "hate", it's called *constructive criticism*. Imagine thinking the only way to communicate is either praise or "hate".
@rs832
@rs832 25 күн бұрын
That's a weird way to say "thank you for the very helpful free content!"
@ezwtwrziehag1736
@ezwtwrziehag1736 25 күн бұрын
this isnt secret, people know this long ago
2 better alternatives to overflow: hidden
11:04
Kevin Powell
Рет қаралды 148 М.
The New dialog HTML Element Changes Modals Forever
12:09
Web Dev Simplified
Рет қаралды 574 М.
Conforto para a barriga de grávida 🤔💡
00:10
Polar em português
Рет қаралды 102 МЛН
How I prepare to meet the brothers Mbappé.. 🙈 @KylianMbappe
00:17
Celine Dept
Рет қаралды 32 МЛН
Learn Flexbox in 15 Minutes
15:12
Web Dev Simplified
Рет қаралды 1,1 МЛН
i cant stop thinking about this exploit
8:40
Low Level Learning
Рет қаралды 316 М.
Analog Clock HTML CSS Javascript Dark Mode
9:27
Code Braces
Рет қаралды 28 М.
I never thought of using CSS animations like this before!
10:28
Kevin Powell
Рет қаралды 65 М.
A flexbox trick to improve text wrapping
5:02
Kevin Powell
Рет қаралды 133 М.
Junior Vs Senior Code - How To Write Better Code
22:13
Web Dev Simplified
Рет қаралды 1,1 МЛН
Procedurally Generating Icons for my Farming Game
18:50
ThinMatrix
Рет қаралды 118 М.
23 CSS features you should know (and be using) by now
31:31
Kevin Powell
Рет қаралды 56 М.
Asynchronous Vs Synchronous Programming
7:34
Web Dev Simplified
Рет қаралды 259 М.
Why Great Developers DON'T Create Content (and a lesson to learn)
6:56