Material-ui: How to override default media queried component styles

Created on 15 Jan 2020  路  1Comment  路  Source: mui-org/material-ui

Hey there,

so the only way i could find to do it in createMuiTheme() is:

overrides: {
  MuiToolbar: {
      gutters: {
        '@media (min-width: 600px)': {
          paddingLeft: 0,
          paddingRight: 0,
        },
      },
    },
  }

Problem here is that i need to come up with my own breakpoint values while it should rather use the [theme.breakpoints.up('sm')] approach of makeStyles(), using the default themes' breakpoint presets as values.

Is something like this or equivalent possible? If not, could this maybe be put on the ToDo list. I noticed a lot of people requiring this.

Thanks in advance.

docs good to take

Most helpful comment

You can find more details on #11649. However, I think that we can improve the documentation in the meantime (before changing the theme structure or the code in v5). I believe that we should have a customization section in https://material-ui.com/customization/breakpoints/ to answer you very question.

>All comments

You can find more details on #11649. However, I think that we can improve the documentation in the meantime (before changing the theme structure or the code in v5). I believe that we should have a customization section in https://material-ui.com/customization/breakpoints/ to answer you very question.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

revskill10 picture revskill10  路  3Comments

chris-hinds picture chris-hinds  路  3Comments

ghost picture ghost  路  3Comments

activatedgeek picture activatedgeek  路  3Comments

mattmiddlesworth picture mattmiddlesworth  路  3Comments