Turning off inheritance on custom props is more useful than I'd thought

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

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

IntermediateWeb DesignUI4 min

About this video

A short CSS tutorial explaining why you might turn off inheritance for custom properties and how the ModernCSS approach of registering custom properties with @property helps. It is aimed at developers who already write CSS.

What you’ll learn

  • Explain how inheritance works for CSS custom properties
  • Stop a custom property from inheriting its parent value with @property
  • Register custom properties with type definitions in CSS