Explanation:
I'm not a CSS expert but my current attempt is this.
div:not(.classToBeAvoid) *{
background-color:red;
}
Which in English I read as...
"Apply a red background to any element which does not have <div class="classToBeAvoid"> as an ancestor".
But nonetheless, in my test, it doesn't seem to work like this.
CodePen:
https://codepen.io/anon/pen/eGVBVb
Code:
<div class="classToBeAvoid">
<div>
<p>
Shouldn't be a red background on any element around here.
</p>
</div>
</div>
<div>
<p>
Should be a red background
</p>
</div>
div:not(.classToBeAvoid) *{
background-color:red;
}