These CSS best practices might be holding you back

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

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

IntermediateUI23 min

About this video

Kevin Powell examines widely taught CSS best practices, such as class-only selectors, avoiding ID selectors, and mobile-first styling, and explains when they work as training wheels and when to move beyond them. It is aimed at developers who already write CSS.

What you’ll learn

  • Judge when class selectors and descendant selectors suit a stylesheet
  • Decide when to stop avoiding ID selectors and em units for font sizes
  • Evaluate when !important and mobile-first rules help or hurt a layout