Skip to content

[css-grid] Spec doesn't indicate the stretching auto tracks should apply when content-alignment is non-stretch. #5966

Closed

Description

@bfgeek

As above. (Unless I'm missing something).

Just by reading the spec from https://drafts.csswg.org/css-grid-1/#algo-stretch it isn't clear that stretching auto tracks shouldn't happen when you have place-items: center or similar.

Activity

  1. Loirooriol commented on Feb 9, 2021

    @Loirooriol
    Contributor

    place-items doesn't seem to prevent that, I guess you meant place-content (align-content + justify-content).

    I agree this should be clearer, now there is only the subtle https://drafts.csswg.org/css-grid/#valdef-grid-template-columns-auto

    auto
    As a maximum: represents the largest max-content contribution of the grid items occupying the grid track; however, unlike max-content, allows expansion of the track by the align-content and justify-content properties.

  2. bfgeek commented on Feb 9, 2021

    @bfgeek
    Author

    Yup place-content thanks :).

  3. fantasai commented on Jun 16, 2021

    @fantasai
    Collaborator

    Good catch. This is a regression from this set of changes: https://www.w3.org/TR/2020/CR-css-grid-1-20200818/#change-2016-stretch-algo

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