Nested grids break custom column layout #36335
Labels
bug 🐛
Something doesn't work
component: Grid
The React component.
package: system
Specific to @mui/system
Duplicates
Latest version
Steps to reproduce 🕹
I have a nested grid with the standard 12 columns in the outer grid and two children with widths 4 and 8 (4 + 8 = 12):
Now I redefine the outer grid to have 24 columns, keeping the inner grid at 12 columns, and keep the children's ratio the same (8 + 16 = 24).
I would expect this to look the same, since all the ratios are equivalent, but it does not. (It doesn't seem like the
columns
argument on the inner grid is being ignored, as in #28554 and #30209; instead, the inner grid seems correct, but screws up the layout of the outer.)If I redefine the child grid's columns to equal 24, the same as the outer grid's, then everything works as expected again:
See demo.
Possibly related - #31340?
Current behavior 😯
The second grid layout wraps around to the next line, rather than staying in a single row.
Expected behavior 🤔
I would expect all three grids to look exactly the same, since the ratios of children are the same.
Context 🔦
No response
Your environment 🌎
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: