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

Re: [css3-flexbox] cross-size of flexbox lines

From: Morten Stenshorne <mstensho@opera.com>
Date: Tue, 08 May 2012 11:31:44 +0200
To: Alex Mogilevsky <alexmog@microsoft.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, "www-style\@w3.org" <www-style@w3.org>
Message-ID: <87ipg7yq67.fsf@aeneas.oslo.osa>
Alex Mogilevsky <alexmog@microsoft.com> writes:

> ± From: Morten Stenshorne [mailto:mstensho@opera.com] 
> ± Sent: Thursday, May 03, 2012 12:29 AM
> ± 
> ± If the line in non-wrappable flexboxes no longer follows the flexbox's cross size 
> ± strictly, I think flex-line-pack should apply to non-wrappable flexboxes as well, 
> ± since there may now be negative extra space to distribute (and also positive 
> ± extra space if the note referred above is removed, to eliminate even more 
> ± inconsistency).
> It may be a good idea -- but only if nowrap flexbox gets the same
> behavior as single-line wrap, namely the ability to stretch the line
> outside flexbox and align content into overflow.

Yes. What I wrote was with the assumption that a nowrap line no longer
had to fit the cross size of the flexbox perfectly (the new ED is moving
in that direction).

> I would prefer to keep nowrap behavior as is and add a special case to
> line sizing in wrap case.

If by "as it is" you mean "as it was until about a week ago", then, yes,
me too. I liked it the way it was. Sounds like usecase #1 for
flexboxes. 87% of the authors probably won't care about lines at all.

> For lines, negative shrinking would mean that content will overlap
> across lines and I can't think of any situation when it would be
> desirable...

Maybe not. But that's what we used to have for nowrap flexboxes,
actually (well, apart from the fact that then it was single-line, so
there'd be no overlap across lines). A nowrap line used to get its
line's cross size equal to that of the flexbox. If line content (item
cross size) was larger than the flexbox cross size, line content would
overlap, if not with other lines (there would be no other lines, so no),
at least with siblings, parents and uncles of the flexbox.

The current working draft (2012-03-22) still has this (the ED
doesn't). In the layout algorithm:

    7. Calculate the cross size of each flexbox line. For each flexbox

       1. If the flexbox is single-line and has a definite cross size,
       the single flexbox line's cross size is the cross size of the
       flexbox's content box. End this step of the algorithm.

But if we instead just revert the recent changes and say that nowrap
flexboxes stretch or shrink to fit the cross size of the flexbox, like
before, we can end this discussion. :)

---- Morten Stenshorne, developer, Opera Software ASA ----
---- Office: +47 23693206 ---- Cellular: +47 93440112 ----
------------------ http://www.opera.com/ -----------------
Received on Tuesday, 8 May 2012 09:33:30 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:14 UTC