From 66dc73a5fd0f71c75c2429e2f86fe4d20d6a51d6 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Tue, 23 Jan 2018 16:33:02 +0100 Subject: [PATCH] fix(form-field): unable to override font-size through typography config (#9463) Fixes the form field ignoring the typography config's font size which prevents consumers from being able to override it. --- src/lib/core/typography/_typography.scss | 2 +- src/lib/form-field/_form-field-theme.scss | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lib/core/typography/_typography.scss b/src/lib/core/typography/_typography.scss index b743c629fea..1950fb441f9 100644 --- a/src/lib/core/typography/_typography.scss +++ b/src/lib/core/typography/_typography.scss @@ -32,7 +32,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(16px, 1.125, 400) + $input: mat-typography-level(inherit, 1.125, 400) ) { // Declare an initial map with all of the levels. diff --git a/src/lib/form-field/_form-field-theme.scss b/src/lib/form-field/_form-field-theme.scss index ee21101bc02..e40a05e7296 100644 --- a/src/lib/form-field/_form-field-theme.scss +++ b/src/lib/form-field/_form-field-theme.scss @@ -146,10 +146,7 @@ $dedupe: 0; $wrapper-padding-bottom: ($subscript-margin-top + $line-height) * $subscript-font-scale; .mat-form-field { - font-family: mat-font-family($config); - font-size: inherit; - font-weight: mat-font-weight($config, input); - line-height: mat-line-height($config, input); + @include mat-typography-level-to-styles($config, input); } .mat-form-field-wrapper {