Skip to content

[css-flexbox] aspect-ratio item's intrinsic size contribution (editorial) #6778

Closed
@davidsgrogan

Description

@davidsgrogan

https://drafts.csswg.org/css-flexbox/#intrinsic-item-contributions says

The main-size min-content contribution of a flex item is the larger of its outer min-content size and outer preferred size (its width/height as appropriate) if that is not auto

The parenthetical in the above sentence equates preferred size with the width and height properties. But they are not always equal. As a result, the sentence is ambiguous. This issue is a request for clarification.

Is the intent of the spec's parenthetical to exclude preferred sizes that derive from an aspect ratio? Or is it a hint to the reader to explain the term "preferred size"? If the first, then please remove "preferred size". If the second, please remove the parenthetical or make it a Note that includes a term like "commonly" or "usually".

Concrete example. Consider the flex item in the example below when determining the flex container's intrinsic main size. The item has preferred size 100px even though its width is auto, due to stretching and https://drafts.csswg.org/css-sizing-4/#aspect-ratio-automatic.

If the parenthetical is merely a hint, then the min-content contribution is 100px.
If the parenthetical is meant to exclude aspect-ratio-derived preferred sizes, then the min-content contribution is 0px.

<div style="display: flex; height: 100px;">
  <div style="aspect-ratio: 1/1;">
</div>

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