-
Notifications
You must be signed in to change notification settings - Fork 717
[css-flexbox] How to determine the main/block size of a column flex container? #4905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
…nce it's technically not defined by CSS2. #4905
We added a note defining that the automatic block size of a block-level flex container is its max-content size... technically that definition doesn't belong here, but in the spec defining block layout. Filed #5197 as a follow-up on CSS2 to at least get it to not conflict even if it's not possible to make it quite as tight a connection as we would in a CSS3+ spec. Let us know if this works for you. @SimonSapin |
"automatic block size" has link markup in 84dabef (presumably intended to link to https://drafts.csswg.org/css-sizing/#automatic-size, which I just learned is a formal concept we have) but it is not a link in in https://drafts.csswg.org/css-flexbox/#algo-main-container. Shouldn’t the first new sentence be normative rather than in a note? The new text says "The Block Layout spec should define this equivalency" but should it really? If it’s specifically about flex containers. |
No, it's Block Layout that decided that every box should use its max-content block size. Items in Flex Layout and Grid Layout, for example, don't use their max-content block size by default. (This should be normatively defined somewhere, but since it really doesn't belong in this spec we're leaving it as a note.) |
A somewhat early step of the Flex Layout Algorithm is: https://drafts.csswg.org/css-flexbox/#algo-main-container
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
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 toheight: max-content
in that case, "redirecting" to the rules in https://drafts.csswg.org/css-flexbox/#intrinsic-sizes?The text was updated successfully, but these errors were encountered: