Re: [csswg-drafts] [css-grid] Note implies losing an aspect-ratio when it shouldn't? (#5713)

@bfgeek In that case the elements have `justify-self: normal`, so I think
 - For the grid item, the width is "as for a block-level box" [[1]](https://drafts.csswg.org/css-grid/#grid-item-sizing) and "as for a replaced element" [[2]](https://drafts.csswg.org/css-sizing-4/#aspect-ratio-automatic). That is, [CSS 2 §10.3.4](https://drafts.csswg.org/css2/#block-replaced-width), which will respect the aspect ratio and the width will be `100px`.
 - For the block box, `justify-self: normal` theoretically behaves as `stretch` [[3]](https://drafts.csswg.org/css-align/#justify-block), but I think CSS Align is wrong here, since replaced block elements are not stretched. I think that due to aspect ratio it should be sized as a replaced element, resulting in [CSS 2 §10.3.4](https://drafts.csswg.org/css2/#block-replaced-width) again.

But if they had `justify-self: stretch`, then
 - Per [[4]](https://drafts.csswg.org/css-grid/#grid-item-sizing), the grid item would explicitly use [CSS 2 §10.3.3](https://drafts.csswg.org/css2/#blockwidth), resulting in a width of `200px`, ignoring the aspect ratio.
 - Per [[5]](https://drafts.csswg.org/css-align/#valdef-justify-self-stretch), the block box would be sized "to the length necessary to make its outer size as close to filling the alignment container as possible", which I guess maps to [CSS 2 §10.3.3](https://drafts.csswg.org/css2/#blockwidth) too.

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5713#issuecomment-725745114 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 12 November 2020 00:36:38 UTC