How to use the :empty selector and the :blank selector
Published on:I made a terrible mistake when I tweeted about :empty
and :blank
a month ago. I said that :empty
wasn't useful, and :blank
is much more useful than :empty
.
<Image src="/assets/2018/empty-and-blank/tweet.png" alt="Blank is not supported by any browser" />
I was wrong!
:empty
is actually good enough. We don't even need :blank
!