W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2020

Re: [csswg-drafts] [css-flexbox] automatic minimum size: what does min(250, undefined) return? (#5347)

From: nightpool via GitHub <sysbot+gh@w3.org>
Date: Fri, 07 Aug 2020 13:33:30 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-670518964-1596807209-sysbot+gh@w3.org>
While I understand that the spec text in this are is probably most correctly interpreted as returning 250, I think that's a really regrettable result, and as an author, I find Firefox's behavior a lot more intuitive and useful then Chrome's in this area.

Ultimately, if I'm using an image (or another sort of replaced element) in a flexbox, it's almost certain that I want a responsive behavior, rather then being too concerned with the original inherent size of the image. Another concern is that, since flex-shrink is enabled by default, I would expect images to shrink along with other elements, so the use of min-width here seems to me to be inappropriate.

Additionally, the fact that these two documents below render differently is VERY surprising to me, and as an author I would prefer a solution that provided consistency in this area:

```html
<div style="display: flex; width: 300px;">
   <!-- These imgs overflow their container -->
  <img src="https://placekitten.com/300/480">
  <img src="https://placekitten.com/300/480">
</div>
```

```html
<div style="display: flex; width: 300px;">
   <!-- These don't -->
  <div><img src="https://placekitten.com/300/480"></div>
  <div><img src="https://placekitten.com/300/480"></div>
</div>
```

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 7 August 2020 13:33:33 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:13 UTC