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

Re: [csswg-drafts] [css-flexbox] Non-interop with shrinking images

From: Jen Simmons via GitHub <sysbot+gh@w3.org>
Date: Sat, 06 May 2017 14:58:06 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-299645246-1494082685-sysbot+gh@w3.org>
We have a bunch of images. They have various intrinsic sizes. And they are wrapped with a div. Like this markup:
`  <img>`
`  <img>`
`  <img>`

Now let's make the div into flex container. Making the images flex children.

Perhaps there are only a few images, and they are set to no-wrap.
Perhaps there are many images, and they are set to wrap. 

Now apply variations of the `flex` property to this situation. 

If the images are set to shrink, they should shrink. 
If the images are set to stretch, they should stretch while maintaining the aspect ratio (adjusting height through a transferred size).

Only Firefox gets this right. Every other browser has problems. 

Here, look for yourself: http://labs.jensimmons.com/2017/02-008-bug.html

This is bad. It means Flexbox is not doing a huge part of what it's supposed to do. It doesn't size content properly if that content has an intrinsic size. 

Can we fix this? 

GitHub Notification of comment by jensimmons
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1322#issuecomment-299645246 using your GitHub account
Received on Saturday, 6 May 2017 14:58:12 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 10:12:53 UTC