default padding of mat-button’s, i need to subscribe the default padding (16px)
I’ve been trying to set the padding of a mat-button, but the component’s style isn’t changing. What can I do, I’ve already tried changing CSS properties, but none of them solve the problem
2
Answers
I don’t work with exact
mat-button
but work with similar 3rd party libraries and can provide usuall steps to override such styles:!important
Last one is better not to use at all. The 3rd one should be used only for styles which are already provided as inline by the 3rd party library.
The simplest method if you are changing padding only for buttons in that specific component is to add a
class
and style it in that component’s css or sass file.If you are doing it globally for all
mat-button
s use.mat-button { padding: 10px !important; }
in your styles.sass