Widely available Supported across all major browsers. Safe to use in production.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
37
79
27
9.1
37
9.3
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)

Syntax

CSS
/* Reset all styles to their initial values */
.reset-all {
  all: initial;
}

/* Reset to the user agent's defaults */
.reset-to-default {
  all: revert;
}

/* Clear inherited values and reset to unset */
.widget-container {
  all: unset;
  display: block;
  padding: 1rem;
}

Live demo

all: initial

all shorthand property All: initial demo.

PreviewFullscreen

all: revert

all shorthand property All: revert demo.

PreviewFullscreen

All: Unset + redefinition

all shorthand property All: unset + redefinition demo.

PreviewFullscreen

Use cases

  • Using all

    The all shorthand CSS property resets all of an element's properties except unicode-bidi, direction, and CSS Custom Properties.

Cautions

  • May not be supported in older browsers.

Accessibility

  • Make sure visual changes are conveyed appropriately to assistive technology.