Uploaded August 2025 | Updated September 2026, 2 weeks ago
Looking to step up your CSS Game? Check out cssdemystified.com
π Links
β Code for last row only: codepen.io/kevinpowell/pen/ogjwxyv/19639a71b6ff26e1bf87738fa6db12d5
β Code for first two rows only: codepen.io/kevinpowell/pen/vENZGvG/14a4bdacb2fa79bbdd9cd1e400b57097
β Code for 2nd row only: codepen.io/kevinpowell/pen/YPyQqMq/990300b888e8aec0d77d520d5948ddb5
β Keithβs article: keithclark.co.uk/articles/targeting-first-and-last-rows-in-css-grid-layouts
β Temaniβs version with no container queries: codepen.io/t_afif/pen/QwbZKPB?editors=1100
β Keep up to date with everything I'm up to kevinpowell.co/newsletter
π¬ Come hang out with other devs in my Discord Community discord.gg/nTYCvrK
β Are you a beginner? HTML & CSS for absolute beginners is for you: learn.kevinpowell.co
π Start writing CSS with confidence with CSS Demystified: [https://cssdemystified.com](https://cssdemystified.com/)
π Already mastered CSS? Check out my advanced course, Beyond CSS: https://www.beyondcss.dev/
β Timestamps
00:00 - Introduction
00:45 - Requirements for this to work
01:45 - Setting up the first container query
03:00 - Getting the first two rows
05:10 - Getting only the second row
07:00 - Selecting the last row
13:44 - Using new CSS features so we donβt need container queries
#css
---
Help support my channel
π¨βπ Get a course: kevinpowell.co/courses
π Buy a shirt: cottonbureau.com/people/kevin-powell
π Support me on Patreon: patreon.com/kevinpowell or through YT memberships: youtube.com/@KevinPowell/join
---
π§βπ» My editor: VS Code - code.visualstudio.com
π My theme: One Dark Pro Var Night
π€ My font: Cascadia Code
---
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:
Bluesky: https://bsky.app/profile/kevinpowell.co
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!
Looking to step up your CSS Game? Check out cssdemystified.com
π Links
β Code for last row only: codepen.io/kevinpowell/pen/ogjwxyv/19639a71b6ff26e1bf87738fa6db12d5
β Code for first two rows only: codepen.io/kevinpowell/pen/vENZGvG/14a4bdacb2fa79bbdd9cd1e400b57097
β Code for 2nd row only: codepen.io/kevinpowell/pen/YPyQqMq/990300b888e8aec0d77d520d5948ddb5
β Keithβs article: keithclark.co.uk/articles/targeting-first-and-last-rows-in-css-grid-layouts
β Temaniβs version with no container queries: codepen.io/t_afif/pen/QwbZKPB?editors=1100
β Keep up to date with everything I'm up to kevinpowell.co/newsletter
π¬ Come hang out with other devs in my Discord Community discord.gg/nTYCvrK
β Are you a beginner? HTML & CSS for absolute beginners is for you: learn.kevinpowell.co
π Start writing CSS with confidence with CSS Demystified: [https://cssdemystified.com](https://cssdemystified.com/)
π Already mastered CSS? Check out my advanced course, Beyond CSS: https://www.beyondcss.dev/
β Timestamps
00:00 - Introduction
00:45 - Requirements for this to work
01:45 - Setting up the first container query
03:00 - Getting the first two rows
05:10 - Getting only the second row
07:00 - Selecting the last row
13:44 - Using new CSS features so we donβt need container queries
#css
---
Help support my channel
π¨βπ Get a course: kevinpowell.co/courses
π Buy a shirt: cottonbureau.com/people/kevin-powell
π Support me on Patreon: patreon.com/kevinpowell or through YT memberships: youtube.com/@KevinPowell/join
---
π§βπ» My editor: VS Code - code.visualstudio.com
π My theme: One Dark Pro Var Night
π€ My font: Cascadia Code
---
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:
Bluesky: https://bsky.app/profile/kevinpowell.co
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!

π Already mastered CSS? Check out my advanced course, Beyond CSS: https://www.beyondcss.dev/
Help support my channel
π¨βπ Get a course: https://www.kevinpowell.co/courses
π Buy a shirt: https://cottonbureau.com/people/kevin-powell
π Support me on Patreon: https://www.patreon.com/kevinpowell or through YT memberships: https://youtube.com/@KevinPowell/join
π§βπ» My editor: VS Code - https://code.visualstudio.com/
π My theme: One Dark Pro Var Night
π€ My font: Cascadia Code
Im on some other places on the internet too!
If youd like a behind the scenes and previews of whats coming up on my YouTube channel:
Bluesky: https://bsky.app/profile/kevinpowell.co
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevin-powell
And whatever you do, dont forget to keep on making your corner of the internet just a little bit more awesome! Figma Sites is worse than you might have thought](https://i.ytimg.com/vi/ZsFIvULxkHI/mqdefault.jpg)






π Already mastered CSS? Check out my advanced course, Beyond CSS: https://www.beyondcss.dev/
β Timestamps
00:30 - The setup0
01:30 - The animation
02:00 - linking the animation to the scroll position
03:30 - controlling the animation
#css
Help support my channel
π¨βπ Get a course: https://www.kevinpowell.co/courses
π Buy a shirt: https://cottonbureau.com/people/kevin-powell
π Support me on Patreon: https://www.patreon.com/kevinpowell or through YT memberships: https://youtube.com/@KevinPowell/join
π§βπ» My editor: VS Code - https://code.visualstudio.com/
π My theme: One Dark Pro Var Night
π€ My font: Cascadia Code
Im on some other places on the internet too!
If youd like a behind the scenes and previews of whats coming up on my YouTube channel:
Bluesky: https://bsky.app/profile/kevinpowell.co
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevin-powell
And whatever you do, dont forget to keep on making your corner of the internet just a little bit more awesome! Scroll-driven animations without any JS](https://i.ytimg.com/vi/bBh8fpb3h5c/mqdefault.jpg)

π Already mastered CSS? Check out my advanced course, Beyond CSS: https://www.beyondcss.dev/
Help support my channel
π¨βπ Get a course: https://www.kevinpowell.co/courses
π Buy a shirt: https://cottonbureau.com/people/kevin-powell
π Support me on Patreon: https://www.patreon.com/kevinpowell or through YT memberships: https://youtube.com/@KevinPowell/join
π§βπ» My editor: VS Code - https://code.visualstudio.com/
π My theme: One Dark Pro Var Night
π€ My font: Cascadia Code
βTimestamps
00:00 - Introduction
03:02 - Creating Custom Elements
06:11 - Understanding Shadow DOM
08:54 - Lifecycle Hooks in Web Components
12:03 - Event Listeners and Memory Management
14:45 - Implementing Validation Logic
17:50 - Error Handling and User Feedback
36:13 - Defining Properties and Error Handling
39:10 - Customizing Error Messages
49:42 - Styling Web Components
01:00:18 - Enhancing User Experience with CSS Parts
01:10:06 - Resources for Learning Web Components
Im on some other places on the internet too!
If youd like a behind the scenes and previews of whats coming up on my YouTube channel:
Bluesky: https://bsky.app/profile/kevinpowell.co
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevin-powell
And whatever you do, dont forget to keep on making your corner of the internet just a little bit more awesome! Create a reusable Web Component from scratch](https://i.ytimg.com/vi/b_x3kzapvcI/mqdefault.jpg)


π Already mastered CSS? Check out my advanced course, Beyond CSS: https://www.beyondcss.dev/
β Timestamps
00:00 - Introduction
00:42 - how the original works
02:20 - refactoring to have a single psuedo-element
04:00 - creating and connecting to an anchor
09:00 - using a transition delay to prevent it from jumping
13:10 - fixing the bottom row
#css
Help support my channel
π¨βπ Get a course: https://www.kevinpowell.co/courses
π Buy a shirt: https://cottonbureau.com/people/kevin-powell
π Support me on Patreon: https://www.patreon.com/kevinpowell or through YT memberships: https://youtube.com/@KevinPowell/join
π§βπ» My editor: VS Code - https://code.visualstudio.com/
π My theme: One Dark Pro Var Night
π€ My font: Cascadia Code
Im on some other places on the internet too!
If youd like a behind the scenes and previews of whats coming up on my YouTube channel:
Bluesky: https://bsky.app/profile/kevinpowell.co
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevin-powell
And whatever you do, dont forget to keep on making your corner of the internet just a little bit more awesome! Directionally aware button effect without JavaScript](https://i.ytimg.com/vi/bjw0ka0raMA/mqdefault.jpg)

π Already mastered CSS? Check out my advanced course, Beyond CSS: https://www.beyondcss.dev/
Help support my channel
π¨βπ Get a course: https://www.kevinpowell.co/courses
π Buy a shirt: https://cottonbureau.com/people/kevin-powell
π Support me on Patreon: https://www.patreon.com/kevinpowell or through YT memberships: https://youtube.com/@KevinPowell/join
π§βπ» My editor: VS Code - https://code.visualstudio.com/
π My theme: One Dark Pro Var Night
π€ My font: Cascadia Code
Im on some other places on the internet too!
If youd like a behind the scenes and previews of whats coming up on my YouTube channel:
Bluesky: https://bsky.app/profile/kevinpowell.co
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevin-powell
And whatever you do, dont forget to keep on making your corner of the internet just a little bit more awesome! 5 CSS tips every developer should know](https://i.ytimg.com/vi/bssZTv3BgkE/mqdefault.jpg)