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
I think there is the remaining case of both sizing functions being indefinite, like a grid container with width: max-content; max-width: 100px; grid-template-columns: repeat(auto-fill, 50%). This falls into this case because the max size is definite, but the preferred size is intrinsic, so the percentage track size is initially treated as auto, right?
The spec currently says:
When auto-fill is given as the repetition number, if the grid container has a definite size or max size in the relevant axis, then the number of repetitions is the largest possible positive integer that does not cause the grid to overflow its grid container (treating each track as its max track sizing function if that is definite or as its minimum track sizing function otherwise, and taking gap into account); if any number of repetitions would overflow, then 1 repetition. Otherwise, if the grid container has a definite min size in the relevant axis, the number of repetitions is the smallest possible positive integer that fulfills that minimum requirement. Otherwise, the specified track list repeats only once.
The intention was to make the repetition calculation something that can be performed without resolving indefinite sizes on the grid or the tracks, but if the grid has an indefinite min size, for example, the current wording doesn't handle that case well.
Probably what should happen is we resolve percentages and calculate the repetitions against the hypothetical size of the grid, where the hypothetical size is the first definite option of { preferred size, max size, min size } and is clamped by any definite min or max size.
The text was updated successfully, but these errors were encountered:
Discussing offline between @fantasai@Loirooriol and I, we decided that trying to resolve the % against sizes other than the preferred size doesn't make sense, since the %s in the final layout won't use those sizes anyway, so the resulting repetition won't be meaningful.
Instead we just caught the relevant case (both min and max track sizing functions are indefinite) and made it cause the repeat() to only give one repetition.
From @Loirooriol in #4043:
The spec currently says:
The intention was to make the repetition calculation something that can be performed without resolving indefinite sizes on the grid or the tracks, but if the grid has an indefinite min size, for example, the current wording doesn't handle that case well.
Probably what should happen is we resolve percentages and calculate the repetitions against the hypothetical size of the grid, where the hypothetical size is the first definite option of { preferred size, max size, min size } and is clamped by any definite min or max size.
The text was updated successfully, but these errors were encountered: