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: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 1 Oct 2012 17:32:02 -0700
Message-ID: <CAAWBYDBREoRMS2jSAeHQDAoesrV2bD+s605cQetkxVP2p04yVw@mail.gmail.com>
To: Daniel Holbert <dholbert@mozilla.com>
Cc: www-style list <www-style@w3.org>, Ojan Vafai <ojan@chromium.org>
On Mon, Oct 1, 2012 at 3:52 PM, Daniel Holbert <dholbert@mozilla.com> wrote:
> On 10/01/2012 03:31 PM, Tab Atkins Jr. wrote:
>> So, if I'm thinking about this correctly, the right behavior (assuming
>> we define width:max-content on multicols in a reasonable way) is
>> neither Firefox nor Webkit's behavior.  Webkit's behavior in
>> "align-self:stretch" is correct, but its "align-self: flex-end"
>> behavior is wrong - it should be the width of four columns, not one.
>
> So we split into as many columns as we possibly can?  Suppose we had 100
> lines of text (separated by <br>, say) in a floated auto-sized element
> with "column-width" set.  Should we split it into 100 columns?  I don't
> think that makes sense.

No, you split into columns as normal for the available space.  If your
container is 800px wide, and your column-width is set to 100px with a
20px gap, you'd get 6 columns out of that.  The multicol element knows
how to split itself into columns, completely separate from its
contents.

>> I don't think making all of them be 1 column wide and 4 lines tall is
>> justifiable - I think it implies a definition of "width: max-content;"
>> on multicol elements that is undesirable.
>
> I actually think that's a reasonable definition of "width: max-content"
> for multicol elements, and it matches the rough definition of
> "max-content" in the writing-modes spec. ("...the narrowest measure a
> box could take while fitting around its contents  if none of the
> optional line break opportunities within the box were taken.")
> [ref: http://www.w3.org/TR/css3-writing-modes/#max-content-measure ]

I don't think you should interpet that "narrowest measure" quite that
literally for multicol elements.  Your interpretation *always* forces
multicol elements into a single column when you set "width:
max-content", which I think is very undesirable.  When we define the
intrinsic sizing of multicols, they'll get a specialized definition.

> That's why I think relying on "fill-available" for stretched flex items
> might be better, when we know we're going to be stretching an item
> beyond its max-content size.  (see my second post on this thread -- I
> initially said "fit-content", but I think I meant to say "fill-available")

We very specifically went with max-content over fill-available.  I
don't like it nearly as much, but it was intentional.

~TJ
Received on Tuesday, 2 October 2012 00:32:50 GMT

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