Re: [css3-flexbox] Baseline of flexboxes and flexbox items

On Tue, Apr 17, 2012 at 6:26 PM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> Sorry I am joining this thread late, as I do have an opinion. It now takes some time to catch up...
>
> We have discussed this before and we made a decision: http://lists.w3.org/Archives/Public/www-style/2011Feb/0693.html
>
> It is also what I have implemented.
>
> What we decided then was close to what's being discussed. The decision was:
>
>        1. If the first flexbox child has a baseline, that's the baseline
>        of the flexbox.
>        2. If the first flexbox child doesn't have a baseline, or the
>        flexbox doesn't have any children, the baseline is the after inner
>        edge of the flexbox.
>
> Note that we came to that conclusion when there was no per-item alignment. With per-item alignment, that can be a little smarter:
>
>        0. If any flexbox items are baseline aligned, their shared
>        baseline is the baseline of the flexbox.
>
> The "first child" rule may seem to simple and may seem surprising that it doesn't depend on flexbox direction, but it seems to get sensible results in all cases - read the old thread for what we've considered then.

Yup, this makes sense to me.  I'll spec it.

> 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.

~TJ

Received on Wednesday, 18 April 2012 20:59:28 UTC