Uploaded March 2024 | Updated September 2026, 26 minutes ago
A detailed guide to :is() and :where() CSS pseudo-classes, explaining exactly how they work, what's the difference between them, and how they can help you simplify your CSS, along with some gotchas you should keep in mind.
Demo: codepen.io/ZoranJambor/pen/zYbgWmJ
Subscribe to CSS Weekly Newsletter:
π css-weekly.com
Help support my channel
π¨βπ Get a course: masteringlinting.com
πͺ§ Buy a CSS sticker pack: stickers.css-weekly.com
π Support me on Patreon: patreon.com/cssweekly
π Chapters
00:00 How :is() pseudo-class works
02:12 How to simplify selector lists using nested :is() statements
03:02 How specificity works with :is()
05:31 The difference between :is() and :where() pseudo-classes
06:53 Gotchas β :is() and :where() are forgiving07:44 Gotchas - pseudo-elements donβt work with :is() and :where()08:26 Gotchas - :is() was originally named :matches() and :any()
08:44 When to use :is() and :where() pseudo-classes
Keep up-to-date with CSS Weekly:
π¦ Twitter: twitter.com/@cssweekly
πΆ TikTok: tiktok.com/@cssweekly
π Instagram: instagram.com/cssweekly
π Facebook: facebook.com/CSSWeekly
Keep up to date with what I'm up to:
π¨βπΌ Blog: zoranjambor.com
πΌ LinkedIn: linkedin.com/in/zoranjambor
- Zoran Jambor
#css
A detailed guide to :is() and :where() CSS pseudo-classes, explaining exactly how they work, what's the difference between them, and how they can help you simplify your CSS, along with some gotchas you should keep in mind.
Demo: codepen.io/ZoranJambor/pen/zYbgWmJ
Subscribe to CSS Weekly Newsletter:
π css-weekly.com
Help support my channel
π¨βπ Get a course: masteringlinting.com
πͺ§ Buy a CSS sticker pack: stickers.css-weekly.com
π Support me on Patreon: patreon.com/cssweekly
π Chapters
00:00 How :is() pseudo-class works
02:12 How to simplify selector lists using nested :is() statements
03:02 How specificity works with :is()
05:31 The difference between :is() and :where() pseudo-classes
06:53 Gotchas β :is() and :where() are forgiving07:44 Gotchas - pseudo-elements donβt work with :is() and :where()08:26 Gotchas - :is() was originally named :matches() and :any()
08:44 When to use :is() and :where() pseudo-classes
Keep up-to-date with CSS Weekly:
π¦ Twitter: twitter.com/@cssweekly
πΆ TikTok: tiktok.com/@cssweekly
π Instagram: instagram.com/cssweekly
π Facebook: facebook.com/CSSWeekly
Keep up to date with what I'm up to:
π¨βπΌ Blog: zoranjambor.com
πΌ LinkedIn: linkedin.com/in/zoranjambor
- Zoran Jambor
#css










