Simplify Your CSS Using :is() and :where() Pseudo-Classes @CSSWeekly
Simplify Your CSS Using :is() and :where() Pseudo-Classes  @CSSWeekly
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
Simplify Your CSS Using :is() and :where() Pseudo-ClassesAdvanced Positioning in CSS GridIn-Depth Guide to CSS Parent Selector :has()Frontend News #18: Self-Destructing CSS, Throttle Specific Requests In Chrome DevToolsIntroducing Baseline Status for VideoFrontend News #19: CSS overscroll-behavior, scrollbar-gutter, text-grow Properties, & MoreFrontend News #14: paint-order, border-image, Properly Sizing ImagesEnforce Underlined Links in FirefoxUse Firefox DevTools when working with CSS clip-path #devtools #cssHow To Debug Chrome for Android With Android StudioIs This CSS or TypeScript?How Position Absolute Works in CSS Grid
CSS Weekly |

Simplify Your CSS Using :is() and :where() Pseudo-Classes

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER