The MDC button's button.scss file emits the following style:
.mdc-button {
height:36px;
border-radius:4px;
border-radius:var(--mdc-shape-small,4px);
padding:08px08px
}When applying button density via theme mixin, the correct height is emitted into the theme (density -2 here):
.mat-mdc-button, .mat-mdc-raised-button, .mat-mdc-unelevated-button, .mat-mdc-outlined-button {
height:28px;
margin-top:0;
margin-bottom:0
}In the vast majority of cases, people will include their theme file in the document head. Angular, however, will append component-specific styles at the end of the head, meaning that the button's base styles will take precedence over the theme style.
The MDC button's
button.scssfile emits the following style:When applying button density via theme mixin, the correct
heightis emitted into the theme (density -2 here):In the vast majority of cases, people will include their theme file in the document head. Angular, however, will append component-specific styles at the end of the head, meaning that the button's base styles will take precedence over the theme style.