Material-ui: How would you override the Grid item padding?

Created on 2 Oct 2017  路  1Comment  路  Source: mui-org/material-ui

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I am trying to override the Grid item style, specifically the padding, using the classes prop.

Current Behavior

They way the object key is generated for the grid item padding it makes it very difficult to override it.

Context


I want to use the grid system to generate 2 rows AppBar. The padding of the Grid item makes the AppBar not resize in height as the standard AppBar would do when the width changes.

Your Environment

| Tech | Version |
|--------------|---------|
| Material-UI | beta13 |
| React | 15.6.2 |
| browser | Chrome |
| etc | |

Grid question

Most helpful comment

I'm assuming you are referring to this style:
https://github.com/callemall/material-ui/blob/1c3297dd5008b255f385084ff140080215c61c7c/src/Grid/Grid.js#L74-L76

You have two options. You can disable the padding with spacing={0} or increase the specificity to match this selector (.a .b or !important)

>All comments

I'm assuming you are referring to this style:
https://github.com/callemall/material-ui/blob/1c3297dd5008b255f385084ff140080215c61c7c/src/Grid/Grid.js#L74-L76

You have two options. You can disable the padding with spacing={0} or increase the specificity to match this selector (.a .b or !important)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mb-copart picture mb-copart  路  3Comments

ghost picture ghost  路  3Comments

iamzhouyi picture iamzhouyi  路  3Comments

sys13 picture sys13  路  3Comments

finaiized picture finaiized  路  3Comments