Skip to content

24 ways to impress your friends

Vote up?

xcephe

Mozilla has a nice pseudo-class :-moz-only-whitespace that matches an element that is empty or contains only whitespace. CSS3 does have an :empty pseudo-class but it must be empty of all DOM nodes, include text nodes. I’m sure every designer has come across a need to destroy nicely nested and organized HTML to wrestle white space in empty nodes — it’d be nice if Webkit et all followed suit and it got into the standards.