Skip to content

[css-flexbox] Should clarify if aspect ratio calculations use border-box or content-box #5246

Closed

Description

@cbiesinger

E.g. here:
https://drafts.csswg.org/css-flexbox/#min-size-auto

The transferred size uses the aspect ratio, but it's not clear whether it should use the content box or border box for the calculation.

Also, here:
https://drafts.csswg.org/css-flexbox/#algo-main-item
the calculation says explicitly that the inner cross size is used, which contradicts https://drafts.csswg.org/css-sizing-4/#valdef-aspect-ratio-ratio which says that box-sizing determines whether to use content-box or border-box

Activity

  1. cbiesinger commented on Jun 19, 2020

    @cbiesinger
    Author

    (however, the inner is probably correct for replaced elements with an intrinsic aspect ratio, which probably (?) shouldn't use box-sizing)

    cc @fantasai

  2. fantasai commented on Aug 4, 2020

    @fantasai
    Collaborator

    @cbiesinger Checked in edits to remove the explicit mention of "inner". Do you think this is acceptable to close now?

  3. cbiesinger commented on Aug 27, 2020

    @cbiesinger
    Author

    Thanks, that helps. I think it would be nice if there was a link to someplace that explicitly defines which box-sizing to use though.

  4. fantasai commented on Oct 6, 2020

    @fantasai
    Collaborator

    @cbiesinger I think at some point when the aspect ratio spec and related terminology is more stable, we'll end up adding a lot of cross-links across all our layout specs, but at this point if I add a note pointing to sizing-4 here, I have to add one everywhere else in the spec that mentions “aspect ratio” and I think that's too many notes... If you're implementing aspect-ratio, the spec for aspect-ratio is pretty explicit about which box to use.

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