-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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] CSS grid support #9513
Comments
@tanekim77 I think that we should dive deeper into the potential of using CSS Grid. What can we improve? EDIT: The system allows using the CSS Grid properties with the |
I think CSS Grid is easy enough to implement on it's own. No need to include it as a part of Material UI. |
Our Grid component will need to continue to use flexbox for the forseeable. Only 76% of browsers in use globally support |
This comment has been minimized.
This comment has been minimized.
@oliviertassinari flexbox is working just fine for |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I have added the |
@oliviertassinari CSS grid is the "right" way to implement a grid system, with flexbox being more appropriate for component-level layout. I've been around long enough to remember pre-table layout challenges, and the abuse of table for layout,so it is exciting that we finally have an appropriate solution (hard to believe it's taken this long!). However, just as it took many years before flexbox stabilised and reached critical mass in terms of browser support, it will be a few years before grid is widely supported. For example, I have a 3rd gen iPad that is perfecty functional, but no loger recieves updates. It will sadly never support grid. Thanks Apple! (Also have a 1st gen iPad, but that's more of a museum piece, so fair enough!) It's right to consider when to support CSS grid, but we have to be pragmatic about the practicality of using it (given relatively limited broswer support), when flexbox is serving us well for now. |
This comment has been minimized.
This comment has been minimized.
Not yet: Global: 85.36% + 2.93% = 88.3% |
At which percentage of browser support will it be considered the norm? It's at 90% now. Also, I wanted to point out that the docs site is a little confusing on this issue. In the middle of the page discussing MUI's grid, there's this big heading and paragraph talking about CSS grid. I think the point is that you can also use CSS Grid, but MUI does not provide any sort of abstraction over it, but this is not explicitly stated anywhere and it seems like a discombobulating location to put this info even if it is explicitly stated. |
@dmwyatt The question to ask is whether the browsers we officially support have the feature or not. Chrome 49 support seems to be the only bottleneck. Also, please consider that Google Bot uses Chrome 41 for rendering your page. Anyway, we might be able to use CSS Grid internally.
I agree, do you want to clarify this documentation section? :) How do you think that we could leverage the CSS Grid? |
This comment has been minimized.
This comment has been minimized.
As discussed in mui#9513 starting at mui#9513 (comment) the current documentation was a little confusing and not really located in a logical place. I'm not sure there *is* a logical place for this information, but it seems like the end of the document is better than in the middle of information talking about grid stuff that MUI *does* support. I made the fact that Material UI doesn't provide any CSS Grid functionality explicit. I also took out the warning about CSS Grid only being supported in the latest browsers. As of right now it has 90% browser coverage at https://caniuse.com/#feat=css-grid.
* Better (?) CSS Grid documentation As discussed in #9513 starting at #9513 (comment) the current documentation was a little confusing and not really located in a logical place. I'm not sure there *is* a logical place for this information, but it seems like the end of the document is better than in the middle of information talking about grid stuff that MUI *does* support. I made the fact that Material UI doesn't provide any CSS Grid functionality explicit. I also took out the warning about CSS Grid only being supported in the latest browsers. As of right now it has 90% browser coverage at https://caniuse.com/#feat=css-grid. * Update grid.md
@oliviertassinari Google recently announced that their bot was updated to evergreen: link. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2020-11-18: 96.09% |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@jrhager84 Not sure yet. At least, we have a clean new demo for it: https://next.material-ui.com/components/grid/#css-grid-layout |
This comment has been minimized.
This comment has been minimized.
Regarding the next step on this issue, we have a couple of options:
I personally suspect that a great path could be to:
I think that we can wait for feedback from the developers, to better understand the space of the pain. |
CSS-Grid is now newer and better grid system than flexbox, but they can be used together. Please see the link:
https://css-tricks.com/snippets/css/complete-guide-grid/
And it's now supported by most browsers, and it's matter of time it will become the standard way of defining the grid layout.
Would Material UI implement CSS Grid as well for incoming updates?
Problems it could solve
Benchmark
The text was updated successfully, but these errors were encountered: