JSFiddle - React, Tailwind, and code Playground
by fguillen
HTML
<div class="wrapper">
<div class="child type_a">1</div>
<div class="child type_a">2</div>
<div class="child type_b">3</div>
<div class="child type_a">4</div>
<div class="child type_b">5</div>
<div class="child type_b">6</div>
</div>
CSS
.wrapper .child:nth-child(1) {
background-color: red;
}
.wrapper .child.type_b:nth-child(1) {
background-color: blue;
}
.wrapper .child.type_b:nth-child(3) {
color: red;
}