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

SimonSapin has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-flexbox] How to determine the main/block size of a column flex container? ==
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?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4905 using your GitHub account

Received on Friday, 27 March 2020 16:21:27 UTC