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

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 using your GitHub account

Received on Wednesday, 19 April 2017 04:12:42 UTC