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

@davidsgrogan If one of the inputs doesn't exist, the intention is definitely that it's ignored; it can't contribute to the calculation. We could be more explicit with scattering "(if it exists)" all over the spec, but that seemed like it harmed the readability without adding any real clarity, at least to us at the time. Let us know if you think the spec is unacceptably confusing without that, or if you have better edits to suggest.

@nightpool Both of those [examples render identically](http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cstyle%3Ebody%20%3E%20div%20%7B%20display%3A%20flex%3B%20width%3A%2050px%3B%20border%3A%20solid%3B%20%7D%20img%20%7B%20opacity%3A%200.5%20%7D%20body%20%3E%20div%20%3E%20*%20%7B%20flex%3A%201%3B%20min-width%3A%200%3B%20%7D%3C%2Fstyle%3E%0A%3Cdiv%3E%0A%20%20%20%3C!--%20These%20don%27t%20--%3E%0A%20%20%3Cdiv%3E%3Cimg%20src%3D%22https%3A%2F%2Fplacekitten.com%2F300%2F480%22%3E%3C%2Fdiv%3E%0A%20%20%3Cdiv%3E%3Cimg%20src%3D%22https%3A%2F%2Fplacekitten.com%2F300%2F480%22%3E%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A%3Cdiv%3E%0A%20%20%20%3C!--%20These%20imgs%20overflow%20their%20container%20--%3E%0A%20%20%3Cimg%20src%3D%22https%3A%2F%2Fplacekitten.com%2F300%2F480%22%3E%0A%20%20%3Cimg%20src%3D%22https%3A%2F%2Fplacekitten.com%2F300%2F480%22%3E%0A%3C%2Fdiv%3E%0A), with the flex items overflowing the flex container. (Old Firefox (82 or earlier) did render them differently, but exactly opposite to what your comments indicate.) There will be differences if you *also* set `flex: 1; min-width: 0` on the items, but that's a result of the flex items in the first case having an aspect ratio which factors into how their sizes are calculated by the flex model. In the second case the flex items don't have an aspect ratio, only their contents do, so the aspect ratio doesn't factor into the sizing of the flex items. (The images then size into the resulting flex item.)

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 4 November 2020 22:18:20 UTC