#Development #Techniques
Hiding empty elements with CSS :empty and :has() · Pseudo-classes can help to conceal various kinds of empty elements https://ilo.im/12ecti

_____
#WebDevelopment #WebDev #Frontend #CSS #PseudoClass #EmptyElement

Hiding empty elements with CSS :empty and :has()

You might be used to toggling classes on elements to handle state styles. What if we could just write CSS that reflected the state of the DOM?