all:revert
demoBelow are two SPANs wrapped in DIVs. The “revert” class is set on the second SPAN. (See the CSS styles on the left.)
In browsers that support the CSS revert
value, when all:revert
is set on an element, cascaded values are reverted to the user agent default, but inherited values are not reverted.
Below is a screenshot from Safari/iOS. Notice how letter-spacing
was reverted, but color
(which is inherited from DIV) wasn’t.