JSFiddle - React, Tailwind, and code Playground
by jwerre
HTML
<div class="test empty">
<!-- -->
</div>
<div class="test not-has">
<!-- -->
</div>
CSS
.test {
margin-top: 1rem;
width: 10rem;
height: 2rem;
background-color: red;
}
.empty:empty {
background-color: blue;
}
.not-has:not(:has(*)) {
background-color: orange;
}