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

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.

-----Original Message-----
From: Tab Atkins Jr. [] 
Sent: Wednesday, February 23, 2011 12:25 PM

>   - RESOLVED: Baseline of a flexbox is the baseline of its first
>     child. Note: this may be revisited based on use cases. ISSUE-141

> It handles most cases of interest, but not the case when the flexbox is completely empty. Then the baseline can only be based on the box.

It also doesn't handle this case:

<div style="display: flexbox"><div></div></div>

That is, the case where the first child is an empty block with no inline content to grab a baseline from.

> I am not sure where exactly in content box is the best place for baseline... I think bottom of content box would be a good choice.

That seems reasonable, though I'm not overly happy with the difference from inline-block.

Received on Wednesday, 23 February 2011 20:41:07 UTC