W3C home > Mailing lists > Public > public-css-archive@w3.org > April 2017

Re: [csswg-drafts] [css-grid] Stretching image grid items in both dimensions

From: Mats Palmgren via GitHub <sysbot+gh@w3.org>
Date: Wed, 19 Apr 2017 04:12:35 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-295075752-1492575154-sysbot+gh@w3.org>
I still think image grid items should grow (or shrink) to fill their grid area while preserving their intrinsic ratio _by default_.  I think `width/height:contain` is a fine feature to have, but it's sub-optimal since authors have to opt-in to what should be the default behavior, and it will also take a while before all UAs have implemented it. (I've already explained in a previous comment why `max-size:100%` and `object-fit` are bad solutions so I won't repeat that here.) 

> Fran├žois argued (during the break) that upscaling images isn't great, and it's likely people will want to place smaller images into grid areas and use alignment to control their placement.

Opting out from that can be done by specifying `width/height:min-content`, no?

If option 2 makes image grid items grow/shrink to fill their grid area in a "contain sizing" way _by default_, that's certainly acceptable to me. I'd be interested to review a more fleshed out proposal though.

GitHub Notification of comment by MatsPalmgren
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/523#issuecomment-295075752 using your GitHub account
Received on Wednesday, 19 April 2017 04:12:42 UTC

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