Is there any other HTML/CSS workaround to hide
<li>elements with an empty
<p>? maybe with data selectors?
AS Beverley said, you need to be able to specifically identify the
li that have an empty
How you do that is up to you, whether by applying a class or data-attribute is up to you but it will have to be hard-coded in the HTML.
<li id="size1" class="size"> <p>Queen</p> <p>80" x 90"</p> </li> <li id="size2" class="size has-empty-p"> <p>King</p> <p></p> <!-- N/A --> </li>