W3C home > Mailing lists > Public > www-style@w3.org > February 2011

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 23 Feb 2011 13:03:23 -0800
Message-ID: <AANLkTinxibHP3vjJHVHftNSzMaK+pF7Li_oFCu-Cu1Dj@mail.gmail.com>
To: Alex Mogilevsky <alexmog@microsoft.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
On Wed, Feb 23, 2011 at 12:40 PM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> I disagree that the resolution doesn't define what to do if the first child is empty. What it doesn't define is how to determine the baseline of the child when it is a regular block with regular text flow. I am assuming that it should determine its baseline *as if it was an inline block*. The spec should include that or any other rule for block children.
>
> If above is true, behavior with one empty child is also consistent "bottom of content box" for empty flexbox.
>
> I agree there is inconsistency with inline-block. But I think inline-block behavior is driven by cases where inline-block is an inline image or object, potentially with padding border, and aligning image at a line inside its border would be odd... Flexbox however is always a container, so consistency across different types of children seems more important.
>
> The case could be made however that if a horizontal flexbox only contains replaced elements it could have baseline at border box or margin box. We can discuss that. I don't particularly like the idea though as it makes definition more complex and I don't see a clear use case for the change.

Your arguments are persuasive.

So, I'll define it thusly:

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.

Sound good?

~TJ
Received on Wednesday, 23 February 2011 21:04:15 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:37 GMT