For the CSS framework I'm developing, I use all: unset , which in itself works just fine:
#foo { all: unset; }
However, in some cases I want to "cancel" this rule, as in
#foo:hover { all: auto; }
However, this clearly does not work, because for all there is no auto value. Instead, we have inherit and initial values, which instead of "canceling" the all properties have different effects: returning all values ββto their parent value or their original value (I assume this means the system level of the default value).
To accomplish what I want, I am currently doing
#foo:not(:hover) { all: unset; }
which works fine, but not too scalable if I want to do this for several pseudo-classes, for example, and I would prefer to override the all: unset property? Is there any way to do this?
user663031
source share