Skip to content

[css-grid] Is it possible to have different grid column gaps for different rows? #1661

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
praveenpuglia opened this issue Jul 29, 2017 · 4 comments

Comments

@praveenpuglia
Copy link
Contributor

praveenpuglia commented Jul 29, 2017

The question pretty much sums it up. Currently, there's no way we can have a single grid container with multiple rows and apply different grid column gaps between cells.

Right now, they way I do it is wrap the elements in another grid container and define the new grid-column-gap there.

I am not sure of possible breaks it might bring into the system but would love to have inputs on it.

@rachelandrew
Copy link
Contributor

That wouldn't be a grid, it sounds like flexbox would be the solution to that problem. Hopefully at some point we will get a flex-gap similar to grid-gap which would mean you could control the gaps between flex items better.

@praveenpuglia
Copy link
Contributor Author

More thoughts - I now think that it's best we don't have it because that might push us developers to go really flat and not maintain dom hierarchy / semantics using grid as excuse.

@SebastianZ
Copy link
Contributor

This looks like a duplicate of #1659.

Sebastian

@praveenpuglia
Copy link
Contributor Author

Yeah! That issue will close this one if repetition of a grid-gap pattern is allowed on both axis. Closing this.

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

3 participants