From a83cd0e7325198fe6b14b5094c060e65d318ac5b Mon Sep 17 00:00:00 2001 From: marshall007 Date: Tue, 7 Mar 2017 18:15:17 -0600 Subject: [PATCH 1/2] fix(input): make all icons in input containers the correct size --- src/demo-app/baseline/baseline-demo.scss | 7 ------- src/demo-app/input/input-demo.html | 9 ++++++--- src/demo-app/input/input-demo.scss | 7 ------- src/lib/input/input-container.scss | 16 ++++++++-------- 4 files changed, 14 insertions(+), 25 deletions(-) diff --git a/src/demo-app/baseline/baseline-demo.scss b/src/demo-app/baseline/baseline-demo.scss index 2e25ae8f1518..259047d9b26b 100644 --- a/src/demo-app/baseline/baseline-demo.scss +++ b/src/demo-app/baseline/baseline-demo.scss @@ -9,13 +9,6 @@ width: 100%; } -.demo-icons { - font-size: 100%; - height: inherit; - vertical-align: top; - width: inherit; -} - .demo-card { margin: 16px; } diff --git a/src/demo-app/input/input-demo.html b/src/demo-app/input/input-demo.html index b42834fc114f..b47b2b839939 100644 --- a/src/demo-app/input/input-demo.html +++ b/src/demo-app/input/input-demo.html @@ -40,7 +40,10 @@ - {{postalCode.value.length}} / 5 + + mode_edit + {{postalCode.value.length}} / 5 + @@ -152,10 +155,10 @@

Textarea

- I favorite bold placeholder + I favorite bold placeholder - I also home italic hint labels + I also home italic hint labels

diff --git a/src/demo-app/input/input-demo.scss b/src/demo-app/input/input-demo.scss index 5e5a3ef59da3..2325e7c67896 100644 --- a/src/demo-app/input/input-demo.scss +++ b/src/demo-app/input/input-demo.scss @@ -8,13 +8,6 @@ width: 100%; } -.demo-icons { - font-size: 100%; - height: inherit; - vertical-align: top; - width: inherit; -} - .demo-card { margin: 16px; } diff --git a/src/lib/input/input-container.scss b/src/lib/input/input-container.scss index 134a05e9df1f..7a7f10934076 100644 --- a/src/lib/input/input-container.scss +++ b/src/lib/input/input-container.scss @@ -27,6 +27,14 @@ $mat-input-underline-disabled-background-image: [dir='rtl'] & { text-align: right; } + + // Allow icons in a prefix/suffix/hint/etc to adapt to the correct size. + & .mat-icon { + width: auto; + height: auto; + font-size: 100%; + vertical-align: top; + } } // Global wrapper. We need to apply margin to the element for spacing, but @@ -238,12 +246,4 @@ $mat-input-underline-disabled-background-image: // 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; - } } From 02a65f66583e06c6619b2b367a90d4d07ef87ebe Mon Sep 17 00:00:00 2001 From: marshall007 Date: Tue, 7 Mar 2017 19:14:00 -0600 Subject: [PATCH 2/2] docs(input): add icon prefix/suffix example --- src/demo-app/input/input-demo.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/demo-app/input/input-demo.html b/src/demo-app/input/input-demo.html index b47b2b839939..7559ddf3891e 100644 --- a/src/demo-app/input/input-demo.html +++ b/src/demo-app/input/input-demo.html @@ -54,11 +54,19 @@ Prefix + Suffix +

Text

.00 + +

Icons

+ + + attach_money + mode_edit +