Skip to content

Commit d74d024

Browse files
committed
fix(input): invalid font declaration
Fixes the `font` declaration on the `md-input-container` being ignored, because it was invalid. Note: I updated the font size to the correct value from [the spec](https://material.io/guidelines/components/text-fields.html#text-fields-states), however I'm not using it, in order to avoid any breaking changes. Also note that since the line height wasn't being used before, the baseline is now slightly off when next to a select. Fixes #5262.
1 parent 734eccc commit d74d024

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/lib/core/typography/_typography.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
$caption: mat-typography-level(12px, 20px, 400),
2727
$button: mat-typography-level(14px, 14px, 500),
2828
// Line-height must be unit-less fraction of the font-size.
29-
$input: mat-typography-level(inherit, 1.125, 400)
29+
$input: mat-typography-level(16px, 1.125, 400)
3030
) {
3131
@return (
3232
font-family: $font-family,

src/lib/input/_input-theme.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@
142142
}
143143

144144
.mat-input-container {
145-
@include mat-typography-level-to-styles($config, input);
145+
font-family: mat-font-family($config);
146+
font-size: inherit;
147+
font-weight: mat-font-weight($config, input);
148+
line-height: mat-line-height($config, input);
146149
}
147150

148151
.mat-input-wrapper {

0 commit comments

Comments
 (0)