From d74d0242c6f361f4b5877dac0f00734b4c707441 Mon Sep 17 00:00:00 2001 From: crisbeto Date: Thu, 15 Jun 2017 22:57:57 +0200 Subject: [PATCH] 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. --- src/lib/core/typography/_typography.scss | 2 +- src/lib/input/_input-theme.scss | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/core/typography/_typography.scss b/src/lib/core/typography/_typography.scss index 7ea07725f0a9..6730b69c97c6 100644 --- a/src/lib/core/typography/_typography.scss +++ b/src/lib/core/typography/_typography.scss @@ -26,7 +26,7 @@ $caption: mat-typography-level(12px, 20px, 400), $button: mat-typography-level(14px, 14px, 500), // Line-height must be unit-less fraction of the font-size. - $input: mat-typography-level(inherit, 1.125, 400) + $input: mat-typography-level(16px, 1.125, 400) ) { @return ( font-family: $font-family, diff --git a/src/lib/input/_input-theme.scss b/src/lib/input/_input-theme.scss index ed15940be785..f69fd9dcc6b3 100644 --- a/src/lib/input/_input-theme.scss +++ b/src/lib/input/_input-theme.scss @@ -142,7 +142,10 @@ } .mat-input-container { - @include mat-typography-level-to-styles($config, input); + font-family: mat-font-family($config); + font-size: inherit; + font-weight: mat-font-weight($config, input); + line-height: mat-line-height($config, input); } .mat-input-wrapper {