Uploaded April 2025 | Updated November 2026, 3 hours ago
Having to worry about browser support stinks, but thanks to a simple custom property trick, thereβs a really easy way to create fallbacks for older browsers.
π Links
β Joshβs website: joshwcomeau.com
β Joshβs Bluesky Post that I mention: https://bsky.app/profile/joshwcomeau.com/post/3li3r6i7dac2w
β Easing Wizard: easingwizard.com
β Final Code from this video: codepen.io/kevinpowell/pen/vEYvBJd
β Animating/Transitioning to and from height auto:
β Iβve got free and premium courses: kevinpowell.co/courses
β Timestamps
00:00 - Introduction
00:10 - What weβre starting with
00:40 - Using the cascade to our advantage
03:00 - You canβt have a fallback to the custom property as a fallback behaviour
05:33 - Joshβs post
05:08 - Using custom properties to make this much easier
07:18 - Different transitions in different directions
08:12 - Other use cases for this
#css
β 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/
---
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!
Having to worry about browser support stinks, but thanks to a simple custom property trick, thereβs a really easy way to create fallbacks for older browsers.
π Links
β Joshβs website: joshwcomeau.com
β Joshβs Bluesky Post that I mention: https://bsky.app/profile/joshwcomeau.com/post/3li3r6i7dac2w
β Easing Wizard: easingwizard.com
β Final Code from this video: codepen.io/kevinpowell/pen/vEYvBJd
β Animating/Transitioning to and from height auto:
β Iβve got free and premium courses: kevinpowell.co/courses
β Timestamps
00:00 - Introduction
00:10 - What weβre starting with
00:40 - Using the cascade to our advantage
03:00 - You canβt have a fallback to the custom property as a fallback behaviour
05:33 - Joshβs post
05:08 - Using custom properties to make this much easier
07:18 - Different transitions in different directions
08:12 - Other use cases for this
#css
β 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/
---
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/
#css
β Keep up to date with everything Im up to https://www.kevinpowell.co/newsletter
π¬ Come hang out with other devs in my Discord Community https://discord.gg/nTYCvrK
β Are you a beginner? HTML & CSS for absolute beginners is for you: https://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/
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! Can I recreate this animated gradient button?](https://i.ytimg.com/vi/THx4iwpgj1A/mqdefault.jpg)

π Already mastered CSS? Check out my advanced course, Beyond CSS: https://www.beyondcss.dev/
β Timestamps
00:00 - Introduction
00:40 - Select exact matches
01:45 - Select any match
03:10 - Select prefixes
05:15 - Select based on any starting string of characters
06:35 - Select based on any ending string of characters
07:45 - A few practical use cases
09:25 - All occurances of a string
10:40 - Attribute selector performance
#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! CSS Attribute Selectors](https://i.ytimg.com/vi/TWqpa-hfIdw/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! I challenged a CSS Wizard to a CSS Battle](https://i.ytimg.com/vi/TyCbg7YWaXo/mqdefault.jpg)






π Already mastered CSS? Check out my advanced course, Beyond CSS: https://www.beyondcss.dev/
β Timestamps
00:00 - Introduction
01:45 - probably not worth refactoring
02:00 - Why we need to get used to the space-separated syntax
02:50 - Wider color gamuts with the new ones
03:50 - Relative colors use the space-separated syntax
#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! Stop using the legacy color syntax](https://i.ytimg.com/vi/Uynb7Ci8JMg/mqdefault.jpg)