W3C home > Mailing lists > Public > www-style@w3.org > April 2016

Re: [css-grid] Should we re-run the sizing algo on max-content size changes, too?

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 11 Apr 2016 16:30:42 -0400
To: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Cc: Rossen Atanassov <Rossen.Atanassov@microsoft.com>, Peter Salas <psalas@microsoft.com>, Mats Palmgren <matspal@gmail.com>
Message-ID: <570C0972.6090803@inkedblade.net>
On 04/11/2016 04:11 PM, Tab Atkins Jr. wrote:
> This is about Grid DoC Issue 20
> <https://drafts.csswg.org/css-grid/issues-wd-20150917#issue-20>.
>
> Currently, step 3 of the Grid Sizing Overview
> <https://drafts.csswg.org/css-grid/#algo-overview> requires that you
> rerun the sizing algorithm once if any of the grid items had their
> min-content contribution changed due to Step 2.  This catches things
> where their inline size depends on the available space in the block
> dimensions, such as column-wrap flexboxes, or orthogonal flows, and
> gives them a chance to stabilize to a "correct" size.  (Theoretically
> this is iterate-until-stable layout, but apparently it's good enough
> to just do it twice, at least according to MS's initial
> implementation.)
>
> This step has been present since the original Microsoft algorithm
> <https://www.w3.org/TR/2013/WD-css3-grid-layout-20130402/#layout-algorithm>,
> and it's always been solely about changing min-content contributions.
> But what about max-content contributions?  Some parts of the algo do
> care about max-content, and it seems like that would have a similar
> set of problems if we didn't adjust for it.
>
> Can anyone think of a good reason why that step only fires on
> min-content contribution changes, and not max-content?  If not, does
> anyone object to us making it fire on max-content contribution changes
> as well?

Even if we don't do that, it seems to me that if we're triggering
a recalculation of min-content and subsequent consequences, any
resulting changes to max-content should also be factored in.

But anyway, the rough proposal for handling issue 20 is in this
message: https://lists.w3.org/Archives/Public/www-style/2016Jan/0128.html
and it would be good to get some feedback on it from others!

~fantasai
Received on Monday, 11 April 2016 20:31:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:02 UTC