My favorite strategy for this is to use Normalize.css, or something derived from it, to get known defaults, which makes removing my customizations simpler. Of course, if I simply need to inherit from the parent, I use "inherit" as the style value.
Using Normalize is quite handy. But this tool just makes sure you have consistent starting point between browsers. What about resetting a property during run time? Say you have set a background-color that you want to reset back to its default value? Would you use transparent, initial, unset or something else?
My favorite strategy for this is to use Normalize.css, or something derived from it, to get known defaults, which makes removing my customizations simpler. Of course, if I simply need to inherit from the parent, I use "inherit" as the style value.
Using Normalize is quite handy. But this tool just makes sure you have consistent starting point between browsers. What about resetting a property during run time? Say you have set a
background-color
that you want to reset back to its default value? Would you usetransparent
,initial
,unset
or something else?initial if I am reverting a change I made; inherit if I overrode the parent and wish to undo it, unset otherwise.