CSS: Reset, Default Values
Reset CSS
You can reset CSS values to its default.
all: revert
-
Set all CSS properties to browser's default.
Supported by all browsers as of 2020-11. (was not supported by Google Chrome as of 2020-03.)
all: initial
-
Set all CSS properties to CSS's initial value for this property.
For each CSS property, the CSS spec defines a initial value. For example, initial value of
display
isinline
, for all HTML elements, includingdiv
.💡 TIP: this is NOT useful.
all: inherit
- Set all CSS properties to inherit from parent HTML element's CSS value.
all: unset
- Set it to inherit if it does inherit, else set it to initial value.
Example
/* reset all HTML elements to browser default */ * {all: revert}
/* reset div element to browser default */ div {all: revert}