Skip to content

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

Closed

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>

Activity

  1. tabatkins commented on Oct 29, 2021

    @tabatkins
    Member

    I'm virtually certain that we mean to include preferred sizes from any source. It looks like the parenthetical is a leftover from a previous iteration of the sentence 1992cf3, and can be removed.

    ping @fantasai to confirm?

  2. tabatkins commented on Mar 31, 2022

    @tabatkins
    Member

    Confirmed with @fantasai in person, so I removed the parenthetical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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