<?xml version="1.0" encoding="utf-8"?>

Resetting all property values in CSS

Resetting all property values in CSS Bad Practice
Resetting all property values in CSS Best Practice

Sometimes, all you want is to turn over a new leaf and reset all elements or element's parent styling properties to a starting point. For that purpose, we use the all property.

There 3 types of values that you can apply:

  • Initial: This value resets all the properties you set for an element or its parent to their initial value.
  • Inherit: This value resets all the properties you set for an element or its parent to their parent value.
  • Unset: This value resets all the properties you set for an element or its parent to their parent value if those properties inherit. If not — to their initial value.
Improve your UX & Product skills with interactive courses that actually work