re: CSS :empty Selector VIEW POST

FULL DISCUSSION
 

I did not know. Thank you very much !

also :not and :empty can be used to hide empty state 😀

<style>
.alert:not(:empty) {
  background: pink;
  padding: 10px;
}
</style>
<div class="alert"></div>
<div class="alert">Alert Message</div>

Thanks!
 

 

Nice! that's an awesome application of it 👍

code of conduct - report abuse