midCSS
What is the all property in CSS?
Updated Apr 28, 2026
Short answer
The all property resets all of an element's properties to their initial, inherited, or unset state.
Deep explanation
Values include initial, inherit, unset, and revert. This is incredibly powerful for isolating a component from the global cascade. Instead of manually setting margin: 0; padding: 0; background: none; etc., you can clear everything in one line.
Real-world example
Building an embeddable widget that must look identical regardless of the messy global CSS present on the client's website.
Common mistakes
- Using `all: initial` on an `a` tag and wondering why `display: block` or Flexbox suddenly stops working (it resets `display` to `inline`).
Follow-up questions
- What does the revert value do?