JSFiddle - React, Tailwind, and code Playground
HTML
<div class="orange">
<div>child of orange</div>
<div>child of orange</div>
<div>child of orange</div>
<div class="yellow">child of orange that is yellow</div>
<div class="red">
<div>child of red</div>
<div>child of red</div>
</div>
<div class="green">child of orange that is green
<div>child of green</div>
</div>
<div class="green">child of orange that is green</div>
<div>child of orange</div>
<div class="yellow">child of orange that is yellow</div>
</div>
CSS
.red {
background-color: red;
}
.orange > :not(.red) {
background-color: orange;
}
.orange > .green {
background-color: green;
}
.orange > :is(.yellow) {
background-color: yellow;
}