unset unsets user agent styles, which makes it much less useful, since the better approach is to selectively override user agent styles, and not to unset them completely. I think.
revert is promising. Could someone confirm the following:
border: 1px solid red;
/* etc. */
In this very simple example, adding the “bar” class to a “foo” element unsets all the properties from the
.foo rule. In other words, adding “bar” to “foo” (
<em class="foo bar">) is effectively the same as removing “foo” (
<em class="">). Is this correct? Are there any side effects?
Note to self: Once this question is resolved, my next question will be about how to revert both the cascaded and inherited value, without reverting user agent styles. Note that
all: revert only reverts the cascaded value, not the inherited value (demo). I have a feeling that reverting both would be more useful than