Skip to content

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

Closed
@aethanyc

Description

@aethanyc

As @davidsgrogan noticed in this comment, 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, 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 where a definite cross size is used to compute flex base size)

Consider the following example:

<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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions