Re: [css3-selectors] What's the point of :empty?

Boris Zbarsky wrote:
> 
> Since the default vertical-align value is baseline, this lines up the 
> bottom margin edge of blocks 1-3 with the baseline of the last (and 
> only) line of text in block 4, which is near the top of the block.
>
Thanks, I thought it would be something like that.

BTW, I think I found a bug in Chrome:
 >   if its 'overflow' property has a computed value other than
 >   'visible', in which case the baseline is the bottom margin edge.

Look at in both of these in Chrome and Firefox:

http://www.boogdesign.com/examples/css3/empty-2.html
http://www.boogdesign.com/examples/css3/empty-3.html

The second page sets overflow: hidden.

Ojan Vafai wrote:
> 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.
> 
So is there any possibility of :only-whitespace being added to a future 
selectors spec?  It seems far more useful than :empty.

Rob

Received on Tuesday, 2 November 2010 15:40:42 UTC