- From: Ojan Vafai <ojan@chromium.org>
- Date: Tue, 2 Nov 2010 08:21:15 -0700
- To: Boris Zbarsky <bzbarsky@mit.edu>
- Cc: Rob Crowther <robertc@boogdesign.com>, www-style@w3.org
Received on Tuesday, 2 November 2010 15:22:06 UTC
On Tue, Nov 2, 2010 at 8:15 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote: > On 11/2/10 10:56 AM, Rob Crowther wrote: > >> The selector 'div:empty' only selects div one, because all the others >> end up with an all whitespace text node as a child. >> > > For what it's worth, this is why Gecko has a :-moz-only-whitespace (that we > mostly use in our quirks-mode stylesheet).... Another common use-case for this sort of thing is to keep empty block nodes from collapsing in rich-text editing contexts. As it is now, libraries do all sorts of hackery to make sure they always have at least a non-breaking space. :empty doesn't work for the same reasons, but :-moz-only-whitespace ought to. Ojan
Received on Tuesday, 2 November 2010 15:22:06 UTC