JSFiddle - React, Tailwind, and code Playground

by victoriaytsu

HTML

<div class="a">
  <div class="b">
    Should be red
  </div>
  <div class="c">
  </div>
  <div class="d">
    Should be red
  </div>
 </div>

CSS

.a :matches(.b, .c+.d) {
  color: red;
}

.b {
  color: green;
}

.c+.d {
  color: blue;
}