W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2019

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

From: Mats Palmgren via GitHub <sysbot+gh@w3.org>
Date: Sat, 02 Nov 2019 08:50:02 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-549024293-1572684601-sysbot+gh@w3.org>
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:

<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">
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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:56 UTC