@KevinPowell
  @KevinPowell
Kevin Powell | Quick guide to CSS focus states @KevinPowell | Uploaded September 2023 | Updated October 2024, 1 hour ago.
We have three different pseudo-classes for dealing with focus states, but why do we need three of them? Well, each one is a bit different and allows us to do different things, so in this video I explore :focus, :focus-within, and :focus-visible to show what each one does, and how they’re different from the others.

πŸ”— Links
βœ… Form from this video: codepen.io/kevinpowell/pen/pxYqKp?editors=1100
βœ… Hamburger from this video: codepen.io/kevinpowell/pen/BaVdrLm
βœ… Video where I made the hamburger menu: youtu.be/YAqRQoN8ykI

⌚ Timestamps
00:00 - Introduction
00:15 - :focus
01:00 - :focus-within
02:57 - :focus-visible

#css

--

Come hang out with other dev's in my Discord Community
πŸ’¬ discord.gg/nTYCvrK

Keep up to date with everything I'm up to
βœ‰ kevinpowell.co/newsletter

Come hang out with me live every Monday on Twitch!
πŸ“Ί twitch.tv/kevinpowellcss

---

Help support my channel
πŸ‘¨β€πŸŽ“ Get a course: kevinpowell.co/courses
πŸ‘• Buy a shirt: teespring.com/stores/making-the-internet-awesome
πŸ’– Support me on Patreon: patreon.com/kevinpowell

---

My editor: VS Code - code.visualstudio.com

---

I'm on some other places on the internet too!

If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter.

Twitter: twitter.com/KevinJPowell
Codepen: codepen.io/kevinpowell
Github: github.com/kevin-powell

---

And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!
Quick guide to CSS focus statesVery small CSS tweaks for better formsWhat would you call this layout?How to set a maximum number of lines of text with CSSHow to create and style lists with HTML and CSSA new approach to container and wrapper classesUnder the radar CSS features for your CSS resetThe different types of JavaScript functions explainedProbably the most underrated (and useful) CSS feature3 underused CSS Grid featuresVertically centering WITHOUT flex or grid? Its so easy now!You dont need transform to rotate, translate, or scale

Quick guide to CSS focus states @KevinPowell

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER