JSFiddle - React, Tailwind, and code Playground

by zoldello

HTML

<div>
    <strong> This is a test to see how the CSS3 empty pseudo class responds to a space. </strong>
</div>
<div>
    Legend <br /> 
Green: <span class="green">Not Empty</span> <br />
Red: <span class="red">Empty</span>
</div>
<br />

Item #1 (Has a space in between the test element [a 'p' tag])
<p> </p>
<br />
Item #2 (No space in between the test element [a 'p' tag])
<p></p>

CSS

p {
    width: 100px;
    height: 100px;
    background-color: green;
}

p:empty {
    background-color: red;
}

.green {
    background-color: green;
}
.red {
    background-color: red;
}