Re: [csswg-drafts] [css-grid-1][css-sizing-3] aspect-ratio-only boxes should be able to size to grid container (#4228)

This issue could benefit from a better description of the problem it's trying to solve.  It sounds like what you really want is ratio-preserving stretching, so that for example:

```html
<div style="display:grid; grid-template-rows:200px">
  <img src="https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/reftests/w3c-css/submitted/images3/support/colors-16x8-noSize.svg">
</div>
```
would result in an 400x200 sized image?

Issue #523 has a useful discussion of this problem. (Note that the example above works as expected in Firefox 51 (and older), but then we changed it as a result of that issue...)

That problem can be solved with `align-self:stretch-with-ratio` or `height:contain` or something. I don't think we need to mess with intrinsic sizes to solve this.

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

Received on Saturday, 2 November 2019 08:50:03 UTC