From 9a4c68604db288148bc5ebb20fd64b6c9a1167a3 Mon Sep 17 00:00:00 2001 From: Miles Malerba Date: Tue, 28 Feb 2017 14:32:07 -0800 Subject: [PATCH] fix(input): make icons in prefix/suffix the right size --- src/demo-app/input/input-demo.html | 9 ++------- src/lib/input/input-container.scss | 10 +++++++++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/demo-app/input/input-demo.html b/src/demo-app/input/input-demo.html index d73c0cbb0aa6..b42834fc114f 100644 --- a/src/demo-app/input/input-demo.html +++ b/src/demo-app/input/input-demo.html @@ -206,13 +206,8 @@

Textarea

Both: - - email -   - - -  @gmail.com - + email  +  @gmail.com

diff --git a/src/lib/input/input-container.scss b/src/lib/input/input-container.scss index ee47af07997e..ccf8e410bf27 100644 --- a/src/lib/input/input-container.scss +++ b/src/lib/input/input-container.scss @@ -234,8 +234,16 @@ $mat-input-underline-disabled-background-image: } } -// Prevents the prefix and suffix from stretching together with the container. .mat-input-prefix, .mat-input-suffix { + // Prevents the prefix and suffix from stretching together with the container. width: 0.1px; white-space: nowrap; + + // Allow icons in a prefix/suffix to adapt to the correct size. + & .mat-icon { + width: auto; + height: auto; + font-size: 100%; + vertical-align: top; + } }