Surprising differences in Selector Performance

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateWeb DesignUI17 min

About this video

Kevin Powell tests how common CSS selectors compare for performance, including class and attribute selectors, comma-separated selectors versus :is(), :where() and :not(), and the universal selector. He explains his test method using browser dev tools and asks whether the differences matter in practice.

What you’ll learn

  • Compare the performance of class and attribute selectors in CSS
  • Weigh comma-separated selectors against :is(), :where() and :not()
  • Judge whether CSS selector performance is worth worrying about