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

[csswg-drafts] [css-flexbox] Should definite cross size be used to compute flex item's transferred size suggestion? (#5663)

From: Ting-Yu Lin via GitHub <sysbot+gh@w3.org>
Date: Mon, 26 Oct 2020 18:47:33 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-729818095-1603738051-sysbot+gh@w3.org>
aethanyc has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-flexbox] Should definite cross size be used to compute flex item's transferred size suggestion? ==
As @davidsgrogan noticed in [this comment](https://github.com/web-platform-tests/wpt/pull/26250#issuecomment-716387767), for transferred size, the spec says:

> If the item has a preferred aspect ratio and its computed cross size property is definite

In [9.8](https://drafts.csswg.org/css-flexbox-1/#definite), the definite rule says:

    the outer cross size of any stretched flex items ... is considered definite.

Should the stretched definite cross size be used in computing transferred size?  Or in other words, should the transferred size defined as **If the item has a preferred aspect ratio and a definite cross size, then ...**? (similar to the flex algo [3B](https://drafts.csswg.org/css-flexbox-1/#algo-main-item) where a definite cross size is used to compute flex base size)

Consider [the following example](https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=8622):
```
<div style="display:flex; width:0; height: 50px;">
  <img style="" src="https://placehold.it/300x100" >
</div>
```
It's obvious that the image has no specified size suggestion and the content size suggestion is 300px. Currently Firefox Nightly gives the image 150px width as it does use definite cross size and aspect-ratio to compute to transferred size. Chrome and Safari gives the image 300px width. (I guess both implementations think the image has no transferred size.) 

cc @tabatkins @dholbert 


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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 26 October 2020 18:47:34 UTC

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