W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2019

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

From: Christian Biesinger via GitHub <sysbot+gh@w3.org>
Date: Sat, 16 Mar 2019 00:05:54 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-421744704-1552694753-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:26:58 UTC