JSFiddle - React, Tailwind, and code Playground
by Keith Henry
HTML
<div id="y">
<div id="x">
<div>
a
</div>
<div>
b
<div>
b2
</div>
</div>
<div>
c
</div>
<div>
d
<div>
d2
</div>
</div>
</div>
</div>
CSS
#y > #x > *:not(:last-child) { color: red; }