W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2016

[csswg-drafts] [css-grid][css-align] Align vs Grid vs undefined on how grid items are sized

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Tue, 09 Aug 2016 22:32:21 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-170287028-1470781939-sysbot+gh@w3.org>
fantasai has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-grid][css-align] Align vs Grid vs undefined on how grid items 
are sized ==
https://drafts.csswg.org/css-grid-1/#grid-item-sizing
> A grid item is sized within the containing block defined by its grid
 area similarly to an equivalent block-level box in an 
equivalently-sized containing block, except that auto margins and the 
box alignment properties have special effects. (See §11 Alignment and 
Spacing.)

https://drafts.csswg.org/css-align/#valdef-justify-self-stretch
> When the box’s computed width/height (as appropriate to the axis) is
 auto and neither of its margins (in the appropriate axis) are auto, 
the stretch keyword sets the box’s used size to the length necessary 
to make its outer size as close to filling the alignment container as 
possible while still respecting the constraints imposed by 
min-height/min-width/max-height/max-width.

CSS Align is missing a definition of how `auto` blocks are sized when 
the alignment is not `stretch`; specifically, it neglects to say they 
are fit-content sized (a difference from the `normal` behavior of 
blocks as specified in 2.1). Grid items, since they are sized like 
blocks, are likewise missing this definition.

Also, given `normal` for grid items is `stretch`, I'm unsure what was 
intended in the block axis. Blocks are normally content-sized, and the
 spec sortof implies they should behave like blocks; but the css-align
 spec defines grid items to exactly fit the track when stretched.

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/394 using your GitHub 
account
Received on Tuesday, 9 August 2016 22:32:27 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:30:22 UTC