From 1c139f3e4fa14a6316a82dbbf5beb46e79cc5208 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 4 Jan 2018 21:47:05 +0200 Subject: [PATCH] fix(input): align caret color with spec (#8692) Based on the text field spec (https://material.io/guidelines/components/text-fields.html), the input caret color should match the underline color. --- src/lib/input/_input-theme.scss | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/lib/input/_input-theme.scss b/src/lib/input/_input-theme.scss index 168f1cd57040..055be25d1aba 100644 --- a/src/lib/input/_input-theme.scss +++ b/src/lib/input/_input-theme.scss @@ -6,6 +6,9 @@ @mixin mat-input-theme($theme) { + $primary: map-get($theme, primary); + $accent: map-get($theme, accent); + $warn: map-get($theme, warn); $foreground: map-get($theme, foreground); .mat-input-element:disabled { @@ -13,10 +16,21 @@ } .mat-input-element { + caret-color: mat-color($primary); + @include input-placeholder { color: _mat-control-placeholder-color($theme); } } + + .mat-accent .mat-input-element { + caret-color: mat-color($accent); + } + + .mat-warn .mat-input-element, + .mat-form-field-invalid .mat-input-element { + caret-color: mat-color($warn); + } } @mixin mat-input-typography($config) {