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

<Grid container> component receiving width: calc(100% + 16px); #8022

Closed
mrwillis opened this issue Sep 3, 2017 · 1 comment
Closed

<Grid container> component receiving width: calc(100% + 16px); #8022

mrwillis opened this issue Sep 3, 2017 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@mrwillis
Copy link

mrwillis commented Sep 3, 2017

Problem description

The <Grid container> component receives these props

.MuiGrid-spacing-xs-16-1335 {
    width: calc(100% + 16px);
    margin: -8px;
}

causing a horizontal scrollbar. See this question for a more accurate example and the (unelegant) fix.

Steps to reproduce

Create an empty project and create one <Grid> with a single item inside. Your page will have a horizontal scroll bar.

Versions

  • Material-UI: beta 5
  • React: 15.6.1
  • Browser: Chrome 60

Proposed solution

Only apply the spacing class and its variants on <Grid> children. I suppose this may be a little inconsistent in the case where you are nesting <Grid> containers, so an alternative could be to just have a prop like applySpacingToContainerOnly={true} (default: false) or something?

@oliviertassinari
Copy link
Member

Duplicate of #7466.

@oliviertassinari oliviertassinari added the duplicate This issue or pull request already exists label Sep 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants