changing font size of material-ui buttons, and having the buttons scale?

前端 未结 5 1420
不思量自难忘°
不思量自难忘° 2021-01-18 02:46

I seem to be having an issue with changing the font sizes on Material-UI\'s (for React) RaisedButton and having the button itself scale properly with it.

<         


        
5条回答
  •  萌比男神i
    2021-01-18 02:58

    The problem is Material-UI inlines all of the styles for their components, so if you try to override them with CSS selectors it doesn't usually work quite right. Instead, try overriding whatever inline styles you don't want using the style property directly on the component. It would look something like this:

    And if it still doesn't look quite right, just inspect all the generated inline styles on that component and see what you'd like to change, then just add that to the style object as well.

    http://www.material-ui.com/#/components/raised-button

提交回复
热议问题