- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Tue, 2 Oct 2012 16:15:40 -0700
- 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 6:35 PM, Daniel Holbert <dholbert@mozilla.com> wrote: > On 10/01/2012 05:32 PM, Tab Atkins Jr. wrote: >> 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. > > Well, that undesirable thing is exactly what browsers do right now... > > Opera, Firefox, and Chrome all currently agree that a multicol element > should only have a single column, when wrapped in a either a floated div > or an inline-block (which I think are both ways of getting the > max-content width): > https://people.mozilla.com/~dholbert/tests/flexbox/multicol-sizing-1.html After thinking about this a bit more, I actually think this is reasonable. It's the only way to maintain the invariant that min/max-content are independent of surrounding layout; that is, that they are "definite" sizes. While we *could* adjust the layout algorithm to surgically address this category of things, I think I'd prefer to just leave it as it is. It does mean that you'll have to explicitly set a multicol flex item to be "width: fill-available;" if you want the "better" behavior where it fills out the correct number of columns, but I think that's okay. (The other similar case where this happens - a multiline column flexbox - doesn't have the ability to pre-declare its number of columns at all.) >> We very specifically went with max-content over fill-available. I >> don't like it nearly as much, but it was intentional. > > I think this choice (max-content sizing for flex items) was wise for the > general case. But I'm wondering whether it might be wise to also add a > special-case just for "align-self:stretch". (Maybe you're saying that > special-case was considered and rejected -- if so, ok.) > > I'm not convinced that I like the prospect of this special case, but > given the apparent consensus among rendering engines about the > max-content size of multicol elements, I think it could provide more > intuitive behavior for multicol-in-a-flex-container. I also don't think > it'd affect many other types of flex items (but I haven't convinced > myself of that yet). > > In any case: I mostly just want this to be clearly-defined and > interoperable. :) Yeah, granted. In any case, it looks like Chrome's behavior is not justifiable - there's nothing in the flexbox layout algorithm that allows you to run an additional layout in the "stretch" case. ~TJ
Received on Tuesday, 2 October 2012 23:16:28 UTC