Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bfgeek opened this issue Feb 9, 2021 · 3 comments

Comments

@bfgeek
Copy link

bfgeek commented Feb 9, 2021

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.

@Loirooriol
Copy link
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.

@bfgeek
Copy link
Author

bfgeek commented Feb 9, 2021

Yup place-content thanks :).

@fantasai
Copy link
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
Projects
None yet
Development

No branches or pull requests

3 participants