Is there a way to create a rule that functions like the following:
.container .unit:first-child(if it contains div.box1.extra) + .box2 { top: 50px;}
<div class="container">
<div class="unit">
<div class="box1 extra"><!-- content --></div>
</div>
<div class="unit">
<div class="box1"><!-- content --></div>
</div>
<div class="box2"><!-- content --></div>
</div>