-
Notifications
You must be signed in to change notification settings - Fork 688
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
[css-flexbox-1] 9.2. Line Length Determination Issue #11392
Comments
Regarding point 4 in the same section:
It’s unclear why this step appears after calculating the flex base size and hypothetical main size of each item. Excluding the note about the automatic block size of a block-level flex container, this instruction seems more appropriate in point 2, as the flex container's definite main size establishes the available main space for the flex items. Perhaps the intention here is to determine the main size of an indefinite flex container based on the sum of the hypothetical main sizes of its flex items? |
There are things like
Your testcase doesn't show that. Flex items can re-resolve their percentages after the final size of the flex container is known. |
How are these values applicable in this context? The specification for flex-basis lists its possible values as
What do you mean it doesn't show that? Here is the render from the current version of Chrome: Clearly, this is not resolved as
Are you suggesting that a flex container sized under Where is this behavior specified in the algorithm details? |
First, you are looking at an old TR from 2018. Not that the draft is up-to-date with latest resolutions either, but at least if you checked https://drafts.csswg.org/css-flexbox-1/#flex-basis-property you would get a link to a syntax of But then for
Yes, that's kind of the idea. Please read about cyclic percentages in CSS Sizing. |
What do you mean I'm referencing an outdated TR from 2018? This is the latest published version, and all the quotes in this issue are taken directly from it. Specifically, the issue regarding "available space" originates from this version. Why isn't this considered a bug in the specification? While many things in drafts reflect improvements and enhancements, the current published version should, at the very least, be correct, shouldn't it? For example, why hasn't the link for width been updated? How can common reader make sense of things ? If the logic is to always goto the latest draft to verify things, than what's the value of the published version ? |
Yeah the latest published thing is from 2018, so I'm calling it old.
I mean, not always. But if you want to discuss the spec details, then looking at an old thing isn't much productive.
See https://www.w3.org/policies/process/#maturity-stages. In particular, editor's drafts are lacking in some areas:
Seems like that could be it. Not sure if it's clearly explained somewhere, I'm not that familiar with the flexbox spec, I know grid better (explained in https://drafts.csswg.org/css-grid/#layout-algorithm) Note re-resolving percentages isn't specific of flexbox/grid, it's the same for the contents of an inline-block (in the inline axis only). |
It's not just about discussing the details — it's about pointing out errors in the current version to ensure they get 'patched' For example, shouldn't the incorrect
So, who actually knows? And who should be asked about this? |
@tabatkins Is point 9.2(4) effectively a reference back to 9.2(2) for the case when the flex container has an indefinite size, to make it definite after the flex items main sizes have been determined? |
It's not incorrect. It's just that the definition of
You can file an issue asking for this to be clarified, like #3418 did for grid. |
I disagree. In the context of this issue (e.g published version), the provided link for I initially asked:
You replied:
To which I responded:
Given this, how can one interpret "used flex basis value that depends on its available space" as anything other than Possible solutions:
|
What's the reason for the downvote? I repeat:
It's unclear what "or depends on its available space" means here, given that the possible values for flex-basis are limited to The only other relevant value that depends on the available space according to the CSS2 specification is percentage values, which, as noted, are resolved to You pointed out that the definition of |
According to CSS Flexible Box Layout Module Level 1, 9.2. Line Length Determination (3)(C):
Problems:
It is unclear what constitutes a "used flex basis value that depends on its available space", as none seem relevant in this context aside from the value
content
.When a used
flex-basis
value is derived from a percentage that is resolved against an indefinite containing block (e.g., the flex container in this case), the resulting used value iscontent
.References:
According to CSS Box Sizing Module Level 3:
According to CSS Flexible Box Layout Module Level 1, Section 7.2.3:
However, in practice, when a
flex-basis
used value ofcontent
is derived from a percentage resolved against an indefinite size flex container, flex items are not consistently sized under the same constraint set on the flex container (e.g.,max-content
), as specified in 9.2(3)(c).Test (Chrome and Firefox)
The text was updated successfully, but these errors were encountered: