I have two elements inside a wrapper div. The second sibling in the view sometimes get an active class (as per the logic of UI)
<div id="wrapper">
<div>some content</div>
<div class="active">some other content</div>
</div>
In those cases (when second child has an active class) - How can I target the 1st div from a css selector.
I've tried general sibling of the active div
.active ~ div
But this doesn't work since the target div should follow the selected div and should not be before it.
How to target a div which comes before another active div.