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

Re: [css3-grid-layout] "stretch" value in grid-row/column-align is underspecified

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 6 Aug 2012 12:09:20 -0700
Message-ID: <CAAWBYDD8w2LJDax_Vxh=oz7gFisX-YstxwewT1_hEPzNcDvdvg@mail.gmail.com>
To: Phil Cupp <pcupp@microsoft.com>
Cc: www-style list <www-style@w3.org>, Chris Jones <cjon@microsoft.com>, Markus Mielke <mmielke@microsoft.com>, Alex Mogilevsky <alexmog@microsoft.com>, Sylvain Galineau <sylvaing@microsoft.com>, "fantasai (fantasai.lists@inkedblade.net)" <fantasai.lists@inkedblade.net>
On Mon, Aug 6, 2012 at 10:56 AM, Phil Cupp <pcupp@microsoft.com> wrote:
> Stretch can impact auto margins when width/height are not auto.  Also in the over-constrained case the ending margin is adjusted to make the grid item's box fit its grid cell.  Here is what we have in the current working draft [1] (note: please ignore section 8 of the current editor's draft, important bits were accidentally edited out in the last round of updates but will be restored shortly):
>
> Section 8.1
> A value of ‘stretch’ causes the Grid item’s width to shrink or grow in accordance with the equation for calculating block width described in section 9.3 of the CSS3 Box Model. Note that this calculation is symmetric for both the width and height of the Grid item.
>
> Section 9.3 of CSS3 Box [2] defines the sizing for block-level, non-replaced elements in normal flow when ‘overflow’ computes to ‘visible’, which I think is the behavior that both the grid and flexbox implement for stretching items.
>
> Let me know if you think more is needed and I'll open an issue in bugzilla.
>
> Also, should we centralize this definition?  Fantasai's alignment spec [3] has the following for defining align-self stretch which we could expand on: ‘stretch’ Sizes the box to exactly fit its containing block.

I'm not sure how it affects auto margins.  If the width/height are
fixed, auto margins presumably shift it around in the box by
themselves, regardless of what the alignment says.  At least, that's
how we decided Flexbox should work, and it would be confusing to have
Grid work in a different way.

~TJ
Received on Monday, 6 August 2012 19:10:07 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:58 GMT