JSFiddle - React, Tailwind, and code Playground
HTML
<ul>
<li></li>
<li><span>o haha</span></li>
<li></li>
</ul>
CSS
li,
li:not(:empty) ~ li {
width: 50px;
height: 50px;
outline: 1px solid red;
}
li:not(:empty) {
outline: 1px solid green;
}