Skip to content

Commit

Permalink
fix(input): invalid font declaration (#5154)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
crisbeto authored and andrewseguin committed Jul 26, 2017
1 parent f4f64ac commit 92d8368
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/core/typography/_typography.scss
Expand Up @@ -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(inherit, 1.125, 400)
$input: mat-typography-level(16px, 1.125, 400)
) {

// Declare an initial map with all of the levels.
Expand Down
5 changes: 4 additions & 1 deletion src/lib/input/_input-theme.scss
Expand Up @@ -150,7 +150,10 @@
$wrapper-padding-bottom: 0.5em + ($line-height * $subscript-font-scale);

.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 {
Expand Down

0 comments on commit 92d8368

Please sign in to comment.