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

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 UTC