W3C home > Mailing lists > Public > www-style@w3.org > October 2012

Re: [css3-flexbox] Computing the height of an auto-sized multicol element in a flex container

From: Daniel Holbert <dholbert@mozilla.com>
Date: Mon, 01 Oct 2012 15:22:41 -0700
Message-ID: <506A17B1.5040404@mozilla.com>
To: www-style list <www-style@w3.org>
CC: "Tab Atkins Jr." <jackalmage@gmail.com>, Ojan Vafai <ojan@chromium.org>
On 10/01/2012 02:56 PM, Daniel Holbert wrote:
> SO -- does this make sense?  And do we want to change the spec to "fix"
> this (reduce the wasted space) at all?

To elaborate on this slightly: one way we could "fix" this in the spec
would be to add a special case to the section on determining flex base
sizes (9.2 step 3, last bullet-point).  In particular -- if we have
"align-self:stretch", I think we might want to change that section to
treat "auto" cross-sizes as *fit-content* -- NOT max-content, which that
chunk currently calls for.

With that change, we'd allow ourselves to use the flex container's full
width (300px) when we're sizing the multicol element in my previous
post's scenario.  (rather than shrinkwrapping it.)  So we'd end up with
a flex base size (height) of ~1em, instead of ~4em.

I suspect Webkit might be using a special case like this to produce
their current behavior.

CAVEAT: The "fit-content" spec-tweak that I suggest above *only* helps
if we already know what our ultimate stretched cross-size will be.  In
particular, it only helps if our flex container is single-line and has a
definite cross size.

~Daniel
Received on Monday, 1 October 2012 22:23:09 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:01 GMT