Re: [css3-flexbox] Flexbox needs to define where the baseline of a box is

On 2/18/11 8:08 PM, Tab Atkins Jr. wrote:
> Hmm, I don't see that.  Assuming code like<div
> style="display:flexbox;">   </div>  (two spaces), rule 1 doesn't apply
> (no linefeeds), rule 2 doesn't apply (wrong white-space), rule 3
> doesn't apply (no linefeeds), rule 4.1 doesn't apply (everything's a
> space), and rule 4.2 removes the second space only.

Yes, agreed so far.

> In the second group of rules, rule 1 would remove the space, but that
> doesn't happen until lines are laid out, which logically can't occur
> until the box tree has been constructed.

Rule 1 of that second set of rules is applied before the box tree is 
constructed in both Gecko and Webkit in many cases, and for purposes of 
baseline calculations I'm pretty sure Gecko pretends like it's applied 
then in all cases...  I can't speak to other implementations.  But in 
any case, see below.

 > So an anonymous block has
> already been wrapped around the remaining space, and it's the block's
> job to report its own baseline, not the flexbox's.  This is presumably
> already defined.

Nope.  The baseline of a block is not defined anywhere, because blocks 
don't have to participate in vertical alignment normally.  The cases 
that have blocks inside them and may need to participate in vertical 
alignment in CSS 2.1 are table cells and inline-blocks, which both 
explicitly define the position of the baseline inside them.

-Boris

Received on Saturday, 19 February 2011 02:05:18 UTC