CSS: All (reset, revert, default)
What is all
the all
is a
property shorthand that
stands for all CSS properties except
unicode-bidi,
direction,
and
CSS custom property.
It is used for resetting CSS property values.
Values
all: revert-
Set all CSS properties to browser's default.
/* reset all HTML element styles to browser default */ * { all: revert; } /* reset div element styles to browser default */ div { all: revert; } all: revert-layer-
Set all properties to the value of the previous cascade @layer .
all: revert-rule-
Set all properties to the value of the previous rule. (as if the current rule do not exist.)
all: initial-
Set all CSS properties to CSS's initial value.
🟢 tip: this is not much useful.
all: inherit-
Set all properties to have values of the parent elements.
🟢 tip: this is not much useful.
all: unset-
Set it to inherit if it does have natural inheritance, else set it to initial value.
🟢 tip: this is not much useful.
Browser support
all: revert is supported by all browsers as of 2020-11.