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] Step 2.2 of Distribute Extra Space confusingly written for growth limits #5351
Distribute space to base sizes up to growth limits: Find the item-incurred increase for each spanned track with an affected size by: distributing the space equally among such tracks, freezing a track’s item-incurred increase as its affected size + item-incurred increase reaches its growth limit (and continuing to grow the unfrozen tracks as needed). If a track was marked as infinitely growable for this phase, treat its growth limit as infinite for this calculation (and then unmark it).
Note: If the affected size was a growth limit, each item-incurred increase will be zero.
So this entire step effectively applies only to base sizes, not to growth limits, since all it does to growth limits is set them to zero. It would be nice if the editorial structure was clearer about this up front.
Actually this is incorrect, for infinitely-growable tracks this step does have an effect. The note is also wrong, therefore. Let's revise this again. :)
I will review tomorrow, but my understanding was that if the affected size was a growth limit, then the item-incurred increase would be zero, even if the track was marked as infinitely growable.
The infinitely growable flag would only matter when running the spanning algorithm with the next span amount, which distributes into base sizes again.
OK, I had a misconception because this step wasn't right, so it's good that you fixed it :)
The new text works well with Peter Salas' explanation of infinitely growable in https://drafts.csswg.org/css-grid/#infinitely-growable, and also seems to match what Chromium and Firefox implemented.
LGTM
Activity
[css-grid-1][editorial] Make initial calculation of item-incurred inc…
[css-grid-1] Revert but reword step 2 of Distributing Extra Space, as…
fantasai commentedon Jul 22, 2020
Actually this is incorrect, for infinitely-growable tracks this step does have an effect. The note is also wrong, therefore. Let's revise this again. :)
fantasai commentedon Jul 23, 2020
Fixed in 776a1fd (linked above; Tab pushed our edits before I could post the comment)
fantasai commentedon Jul 23, 2020
Final change is diff-marked in https://drafts.csswg.org/css-grid-1/#change-2017-distribute-space-readability and should be 100% editorial.
@Loirooriol Mind checking to make sure we didn't screw anything up? :)
[css-grid-1] Resimplify note. #5351
Loirooriol commentedon Jul 23, 2020
I will review tomorrow, but my understanding was that if the affected size was a growth limit, then the item-incurred increase would be zero, even if the track was marked as infinitely growable.
The infinitely growable flag would only matter when running the spanning algorithm with the next span amount, which distributes into base sizes again.
Loirooriol commentedon Jul 23, 2020
OK, I had a misconception because this step wasn't right, so it's good that you fixed it :)
The new text works well with Peter Salas' explanation of infinitely growable in https://drafts.csswg.org/css-grid/#infinitely-growable, and also seems to match what Chromium and Firefox implemented.
LGTM
Loirooriol commentedon Jul 23, 2020
Well, just a nit: step 2 is now called "Distribute space up to limits". Then step 3 should maybe be called "Distribute space beyond limits".
fantasai commentedon Jul 31, 2020
@Loirooriol Good catch. :) Fixed.
[css-grid-1] Adjust heading to match previous. #5351 (comment)