Skip to content

[css-flexbox] How to determine the main/block size of a column flex container? #4905

Closed
@SimonSapin

Description

@SimonSapin

A somewhat early step of the Flex Layout Algorithm is: https://drafts.csswg.org/css-flexbox/#algo-main-container

Determine the main size of the flex container using the rules of the formatting context in which it participates. For this computation, auto margins on flex items are treated as 0.

Let’s say that that we have a column flex container in horizontal writing mode (so the main size is the block size which is the height) with height: auto.

Let’s also that that it is block-level, so the relevant definition is: https://drafts.csswg.org/css2/visudet.html#normal-block

The element's height is the distance from its top content edge to the first applicable of the following: […]

This definition for the height of block-level boxes relies on the content being fully laid out, which is not the case this early in the Flex Layout Algorithm.

Am I missing something or is this under-specified? Should there be something that specifies that height: auto resolves to height: max-content in that case, "redirecting" to the rules in https://drafts.csswg.org/css-flexbox/#intrinsic-sizes?

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