- From: Phil Cupp <pcupp@microsoft.com>
- Date: Mon, 6 Aug 2012 17:56:04 +0000
- To: 'Tab Atkins Jr.' <jackalmage@gmail.com>, www-style list <www-style@w3.org>
- CC: 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>
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. Thanks, Phil [1] http://www.w3.org/TR/css3-grid-layout/#calculating-the-size-of-grid-items [2] http://www.w3.org/TR/css3-box/#blockwidth [3] http://www.w3.org/TR/2012/WD-css3-align-20120612/#align-self -----Original Message----- From: Tab Atkins Jr. [mailto:jackalmage@gmail.com] Sent: Thursday, August 2, 2012 11:46 AM To: www-style list Subject: [css3-grid-layout] "stretch" value in grid-row/column-align is underspecified I presume that the "stretch" value only has an effect when the width/height of the item is "auto", right? This should be specified similarly to Flexbox. ~TJ
Received on Monday, 6 August 2012 17:56:43 UTC