Let's say I have a class called .root
which contains a lot of CSS rules which applies to almost all of my website.
I also have some "special" elements (included in the .root
one), but I don't want to apply the .root
rules to whatever is included in .special
elements. I don't want to "override" all root rules, just not apply them.
Is it possible using only CSS?
Thank you!
.root {
color: blue;
/* Lots of other styles */
}
.special {
font-weight: bold;
}
<div class="root">
This is blue
<div class="special">
<span>This is bold and blue, but I'd like this to be only bold</span>
</div>
</div>