CSS all – shorthand to reset all properties

CSS property all is a css shorthand to reset all properties to their initial or inherited values. Note that it is not supported in IE.

Here is sample code using css all

<style type="text/css">
div {
  color: blue;
  background-color: lightgray;
}
.box {all:initial;}
</style>

<div>some text</div>
<div class="box">some text with properties all set to initial.
  Note the change in color and background color
</div>
refresh

Specification and Browser compatibility

SpecificationStatusCategories
CSS all propertyW3C Candidate RecommendationCSS
Desktop
ChromeFirefoxIEEdgeSafariOpera
Yes 37+ Yes 27+ NoNoYes 9.1+ Yes 24+
Mobile
Android ChromeAndroid FirefoxiOS SafariIE MobileOpera Mobile
Yes 47+ Yes 44+ Yes 9.3+ NoYes 33+
source: caniuse.com

Related

Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit

Comments

Click here to write/view comments