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 Spacing Support more than 40px #13967

Closed
2 tasks
softmarshmallow opened this issue Dec 20, 2018 · 6 comments
Closed
2 tasks

Grid Spacing Support more than 40px #13967

softmarshmallow opened this issue Dec 20, 2018 · 6 comments
Labels
component: Grid The React component. new feature New feature or request
Milestone

Comments

@softmarshmallow
Copy link

Need support for Spacing more than 40px.

As referred in doc.

The responsive grid focuses on consistent spacing widths, rather than column width. Material design margins and columns follow an 8dp square baseline grid. Spacing can be 8, 16, 24, 32 or 40dp wide

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior 🤔

8 px Rule is fine, but there are bunch alot of designs using more spacing than 40px.
64, 128 etc...

Current Behavior 😯

if not followed 8px rule, or over that. the spacing will be ignored and just be 0

@oliviertassinari oliviertassinari added new feature New feature or request component: Grid The React component. labels Dec 20, 2018
@joshwooding
Copy link
Member

@oliviertassinari I'm not sure how to handle this, whilst also thinking of your proposed change in #13663

Move away from hard-coded 8px public API. For instance, I think that the following API would be much better <Grid spacing={1|2|3} /> 👍. <Grid spacing={8|16|24} /> 👎.

@oliviertassinari oliviertassinari added this to the v4 milestone Jan 5, 2019
@oliviertassinari
Copy link
Member

@softmarshmallow This is already planned in #12925. I'm suggesting that we support 8 different grid values following what we do with the system package: https://material-ui.com/system/spacing/#transformation.

@eps1lon
Copy link
Member

eps1lon commented Jan 30, 2019

@oliviertassinari Where does this limit on 8 different spacings stem from? I would rather leave this to the user and simply add a recommendation to the docs if there are some resources that suggest spacing limits.

@oliviertassinari
Copy link
Member

@eps1lon 8 is an arbitrary number. We have to stop somewhere if we are using a static style sheet. We could do 10 not to confound it with theme.spacing.unit = 8.

@eps1lon
Copy link
Member

eps1lon commented Jan 30, 2019

Oh now I get it: We're creating the rules statically i.e. at build time. Can't we leverage our new styling solution with dynamic styles?

@oliviertassinari
Copy link
Member

@eps1lon We can try, otherwise, we can create a Grid generator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Grid The React component. new feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants