The webpage I'm working on already has some base stylesheets, one of which contains this rule:
address:not(:last-child),
fieldset:not(:last-child),
li:not(:last-child),
ol:not(:last-child),
p:not(:last-child),
table:not(:last-child),
ul:not(:last-child) {margin-bottom: 12px}
This is applying the 12px margin-bottom on my <p class="mainCopy">
tags, which I'm not interested in. I want to be able to override it with .mainCopy {margin-bottom: 0}
, but obviously the base rule is more specific than my rule. This forces me to make a rule that's more specific than I want or need, such as p.mainCopy
. Moreover, I sometimes need to have <li class="mainCopy">
, and this would force me to add a second rule, to cater for the <li>
as well.
Is there any way I can simply reset this property, or revert the problematic CSS declaration?