Skip to content

Commit 615fa2a

Browse files
crisbetommalerba
authored andcommitted
fix(button,tabs): potential clash with typography styles (#4915)
Since the buttons and tabs depend on their `line-height` for sizing, we shouldn't override it via the typography styles. This fix removes the `line-height` that is set from the typography, in order to prevent potential issues.
1 parent 4c98714 commit 615fa2a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/lib/button/_button-theme.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@
120120

121121
@mixin mat-button-typography($config) {
122122
.mat-button, .mat-raised-button, .mat-icon-button {
123-
@include mat-typography-level-to-styles($config, button);
123+
font: {
124+
family: mat-font-family($config);
125+
size: mat-font-size($config, button);
126+
weight: mat-font-weight($config, button);
127+
}
124128
}
125129
}

src/lib/tabs/_tabs-theme.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
}
4747

4848
.mat-tab-label, .mat-tab-link {
49-
@include mat-typography-level-to-styles($config, button);
49+
font: {
50+
family: mat-font-family($config);
51+
size: mat-font-size($config, button);
52+
weight: mat-font-weight($config, button);
53+
}
5054
}
5155
}

0 commit comments

Comments
 (0)