From a0772c7f9b471bed6b41393469fb6e320e545533 Mon Sep 17 00:00:00 2001 From: crisbeto Date: Thu, 11 May 2017 18:56:27 +0200 Subject: [PATCH] fix(input): input placeholder not being hidden in IE under certain conditions Fixes cases where the input's native placeholder won't be hidden on IE, if the consumer was using a higher specificity selector to override the input color. Fixes #4464. --- src/lib/input/input-container.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/input/input-container.scss b/src/lib/input/input-container.scss index 819f10f7b37d..9afc0c7f0990 100644 --- a/src/lib/input/input-container.scss +++ b/src/lib/input/input-container.scss @@ -117,7 +117,9 @@ $mat-input-underline-disabled-background-image: // display: none, because IE ends up preventing the user from // focusing the input altogether. @include input-placeholder { - color: transparent; + // Needs to be !important, because the placeholder will end up inheriting the + // input color in IE, if the consumer overrides it with a higher specificity. + color: transparent !important; } }