Skip to content

[css-grid-1] Step 2.2 of Distribute Extra Space confusingly written for growth limits #5351

Closed

Description

@fantasai

https://drafts.csswg.org/css-grid-1/

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.

Activity

  1. fantasai commented on Jul 22, 2020

    @fantasai
    CollaboratorAuthor

    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. :)

  2. fantasai commented on Jul 23, 2020

    @fantasai
    CollaboratorAuthor

    Fixed in 776a1fd (linked above; Tab pushed our edits before I could post the comment)

  3. fantasai commented on Jul 23, 2020

    @fantasai
    CollaboratorAuthor

    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? :)

  4. Loirooriol commented on Jul 23, 2020

    @Loirooriol
    Contributor

    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.

  5. Loirooriol commented on Jul 23, 2020

    @Loirooriol
    Contributor

    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

  6. Loirooriol commented on Jul 23, 2020

    @Loirooriol
    Contributor

    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".

  7. fantasai commented on Jul 31, 2020

    @fantasai
    CollaboratorAuthor

    @Loirooriol Good catch. :) Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions