[csswg-drafts] [css-flexbox] Why does flex item aspect ratio sizing not take max-width into account? (#3736)

cbiesinger has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-flexbox] Why does flex item aspect ratio sizing not take max-width into account? ==
Here:
https://drafts.csswg.org/css-flexbox/#algo-main-item
The cross axis max-size is not taken into account. That differs from the min-size calculation here:
https://drafts.csswg.org/css-flexbox/#min-size-auto

This leads to unfortunate outcomes, e.g.:
<div style="display: flex; flex-direction: column; width: 10px;">
  <img src="10x10.png" style="max-width: 5px">
</div>

Now, the algorithm will compute a height of 10px, but the width is limited to 5px, and the image is distorted.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3736 using your GitHub account

Received on Saturday, 16 March 2019 00:05:56 UTC