Here is a simplified snippet of my code:
<li id="work-5" class="work-5 class-B">
<div>some other stuff</div>
<div class="class-A"></div>
</li>
<li id="work-6" class="work-6 class-C">
<div class="class-A"></div>
</li>
I want to apply some CSS styling to the element with class-A which is under the tree of an element with class-B. In other words I want to apply a different style to two elements with the same class (class-A) which are somewhere (not necessarily first child) under the tree of two different elements with distinct classes. Can I use CSS selectors to achieve this?
Basic CSS: