[css3-flexbox] Baseline of flexboxes and flexbox items

On Wed, 18 Apr 2012 13:58:38 -0700, Tab Atkins Jr. wrote:
> On Tue, Apr 17, 2012 at 6:26 PM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
>> I believe we also agreed that the baseline of a flexbox item is what it would be if it was inline-block, inline-table etc. (inline-* version of its display type). I think it is the only answer that makes sense.
>
> This is opposite what you said in the call, so I'll take what you said
> in the call instead.
>
> The baseline of a flexbox item will be its normal baseline, *after*
> passing it through the table in CSS2.1 chapter 9.7, which makes it
> block-like.  In other words, this will be consistent with a future
> world in which we have display-inside and display-outside, and
> becoming a flexbox item implies changing your display-outside to
> 'flex-item' or something.

Sorry for chiming in late, but I wasn't up to speed with this topic when 
it was discussed on the telecon.

There's no such thing as the baseline of a ?display-inside:block element 
(for example), so the original proposal that Alex reminds us of is the 
only one that makes sense with the currently-existing definitions.

To change this situation, each specification which defines a new 
?display-inside would need to also define its baseline.  The baseline of 
a table could be defined analogously to that of an inline-table, namely 
the baseline of the first row if it has one.  (Note that there's an open 
bug about what to do if there are no rows.[1])  The baseline of a block 
could either be defined analogously to that of an inline-block, namely 
the baseline of the last line box in most situations or else the bottom 
margin edge; or else it could be the baseline of the /first/ line box or 
else the bottom margin edge.  [Would these changes become CSS21 errata 
or find their way into css3-box and css3-table?  Either way, it's going 
to be tricky for css3-flexbox to depend on them, given that none of 
those specs are in a fit state to reference from a mature spec.]

What's the motivation for having baseline alignment of flexbox items in 
the first place?  Is it buttons?

[1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=15892

Cheers,
Anton Prowse
http://dev.moonhenge.net

Received on Sunday, 22 April 2012 17:45:52 UTC