Re: [css3-flexbox] Baseline of flexbox (Was: [CSSWG] Minutes [...] 2012-04-18)

On Thu, Apr 19, 2012 at 10:34 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Thu, Apr 19, 2012 at 12:32 AM, Morten Stenshorne <mstensho@opera.com> wrote:
>> One more question regarding the situation where there are no baseline
>> aligned boxes (on the first line). The child to use is obviously not
>> baseline aligned then. What does "take first child" mean? Should we
>> still use that box's baseline, or should we use the cross-end
>> content/border/margin edge or something like that?
>>
>> I'm probably asking because
>> http://www.w3.org/TR/CSS2/tables.html#height-layout says:
>>
>>    "If a row has no cell box aligned to its baseline, the baseline of
>>     that row is the bottom content edge of the lowest cell in the row."
>>
>> Table cells don't expose their (hypothetical) baseline in any way if
>> they are not baseline aligned. My mind may be contaminated by too much
>> table layout work for too long, but if this makes sense, it probably
>> makes sense to flexbox items too. :)
>
> You use the box's baseline, as defined by it's display type.
>
> I... can't actually find the definition of an inline-table's baseline.

All right, so it's at the bottom of chapter 10: "The baseline of an
'inline-table' is the baseline of the first row of the table."  And
the baseline of a table-row is either the baseline that all the
"vertical-align:baseline" cells are aligning to, or else the lowest of
the bottom content edges of all the cells.

This is fairly close to what we want to do with Flexbox - if there are
any "flex-align:baseline" items, use that. Otherwise, use the baseline
of the first item.

I think the Flexbox "otherwise" rule makes more sense than the similar
Table rule, as it gives a result closer to what you should get if the
first item was baseline-aligned.

~TJ

Received on Thursday, 19 April 2012 21:17:38 UTC