Reset css style color property
css, html
Solution
I think `color: inherit;` for `.parent > .child` is what you are looking for:
.child {
color: red;
}
.parent > .child {
color: inherit;
}
<div class="parent" style="color:blue;">
<div class="child">This will be blue</div>
</div>
<br/>
<div class="child">This will still be red</div>
JSFiddle for sample
Problem
Is it possible to define a style this way? The class child in this example is red unless it's wrapped in a parent class where I want it to reset so that it takes the color defined in the style attribute of parent. ``` .child { color: red; } .parent > .child { color: _clear_; } <div class="parent" style="color:blue;"> <div class="child">Some Text</div> </div> ```