-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[Grid] Allow items to be containers as well [enhancement] #7744
Comments
That's an advanced use case, it's not documented as it might be counter intuitive for some users. |
@oliviertassinari I feel allowing a div to act as a container and an item at the same time is more logical that excess nested grids to accomplish the same objective. I could be missing something here, potentially in relation to breakpoints but I think it will save users a lot of time and reduce the number of elements rendered on a page. I'd like like to understand the advanced nature of this change. I'd be happy to help if needed. |
@emmanuelbuah Alright, I'm reopening this issue so we document this behavior. We would love some help. I believe it's about finding a compelling use case where the |
@oliviertassinari I disagree that this is an advanced use case. I'm fairly new to grids and flex and as soon as I wanted to nest layouts (which was immediately) I considered this. So your compelling use case is: any time you want to nest a flex layout :-) |
@cdietze has built a nice demo: https://codesandbox.io/s/8xw3205y10. It's a good starting point for documentation this feature :). |
What about allowing a
Grid
item to act as a container as well?In a common scenario where a
Grid[type=item]
must contain 3 nested items we have to :when we could just:
A
display:flex
div can haveflex
property as well and viceversa: we would achieve less DOM and the same effect.The text was updated successfully, but these errors were encountered: