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..7559ddf3891e 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 + @@ -51,11 +54,19 @@ Prefix + Suffix +

Text

.00 + +

Icons

+ + + attach_money + mode_edit +
@@ -152,10 +163,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; - } }