Is there anything similar to
background-color: unset;
or
background-color: initial;
that is supported in Internet Explorer?
(before thinking in using javascript)
To unset the value of an element, unset keyword is used. The unset CSS keyword resets a property of an element to its inherited value if the property naturally inherits from its parent, or to its initial value if it does not inherit.
unset can be applied to any CSS property, including the CSS shorthand property all .
inherit : Get the property from the parent element. initial : The default value for the property (the browser default). unset : Acts as either inherit or initial. It'll act as inherit if the parent has a value that matches, or else it will act as initial.
According to MDN, the initial value for background-color is background-color: transparent;
. You could try to use that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With