Skip to content
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

Chrome: justify/align-content do not work with flexbox #41

Open
MondoGao opened this issue Apr 12, 2018 · 1 comment
Open

Chrome: justify/align-content do not work with flexbox #41

MondoGao opened this issue Apr 12, 2018 · 1 comment

Comments

@MondoGao
Copy link

With flexbox's flex-grow applying to the grid container, Chrome seems to ignore justify-content

Test case: https://codepen.io/MondoGao/pen/KoYBja

Chrome 66.0: image

Firefox 59:
image

@alinnert
Copy link

If you look at the DevTools grid guide lines it seems that rows with a height of 1fr don't span the available vertical space ‒ or the entire grid doesn't grow even if it contains a 1fr row. The grid behaves as if flex-grow was 0. Only the background of the grid container element (= the flex item) grows to full height.

I can still reproduce this in Chrome 69.

I found a solution though: You need to split the grid container from the flex item. The flex item needs to be a (horizontal) flex box itself. Here's a fiddle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants