Widely availableSupported across all major browsers. Safe to use in production.

Overview

The revert CSS keyword resets any property to its previous default, provided by either the user or browser stylesheets. For example, setting display: revert on a <div> will likely result in display: block, the browser default style. This is often confused with initial.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
84
84
67
9.1
84
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-list {
  list-style: revert;
  padding: revert;
  margin: revert;
}

Live demo

list-style: revert

CSS List-style: revert demo.

PreviewFullscreen

padding: revert

CSS Padding: revert demo.

PreviewFullscreen

margin: revert

CSS Margin: revert demo.

PreviewFullscreen

Use cases

  • Using revert

    The revert CSS keyword resets any property to its previous default, provided by either the user or browser stylesheets. For example, setting display: revert on a <div> will likely result in display: block, the browser default style. This is often confused with initial.

Cautions

  • May not be supported in older browsers.

Accessibility

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

Powered by web-features