You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-grid-1] Clarify interaction of percentages and intrinsic sizing and the grid algorithm overall #3418
Afaict, we could describe what is happening as the following (which is then implemented differently in UAs in order to optimize the number of passes):
Size the Grid Container (per axis, for both axes)
If it is definite, just get that size.
If it is indefinite, run the grid sizing algorithm under min/max-content constraints, treating percentages as auto, in order to find the indefinite size.
Size the Grid
Run the grid sizing algorithm under normal constraints: auto behaves as auto, and percentages resolve against the size of the grid container as calculated in step [css-syntax] Add a Previous Version link to the CR. #1.
Does this seem correct, or are there shortcuts under #1 that aren't reflected here?
Does this seem correct, or are there shortcuts under #1 that aren't reflected here?
Yes, probably that would be fine, despite Blink/WebKit implementation don't do that. So for us it'll imply an extra pass as described in #1 but probably that's just an implementation detail that shouldn't be considered in the spec.
Pulling this more editorial-level work out into this issue so I can close the main one.
Given that we sometimes should do two passes of grid sizing, where the first pass is akin to an "intrinsic sizing pass", I think the spec should say explicitly that both passes are supposed to run the algo under "no constraint". And that the grid container's block-axis size is definite and final after the first pass (so that it works similar to the inline-axis).
Activity
mrego commentedon Dec 12, 2018
Note that this comment from @MatsPalmgren might be taken into consideration too:
[css-grid-1][editorial] Rearrange the grid layout algo a little for c…
[css-grid-1][editorial] Rearrange the grid layout algo a little for c…
[css-grid-1][editorial] Rearrange the grid layout algo a little for c…