From bd47756a2b14e4c63a79eefb3dc6730ff5152f00 Mon Sep 17 00:00:00 2001 From: crisbeto Date: Sat, 13 Jun 2020 12:42:48 +0200 Subject: [PATCH] fix(input): incorrectly handling nested themes The color selectors in the input theme were too broad which means that they won't work correctly if themes are nested. The issue can be reproduced by placing a form field inside a tab group with an `accent` palette. These changes fix the issue by making the selector more specific. --- src/material/input/_input-theme.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/material/input/_input-theme.scss b/src/material/input/_input-theme.scss index 027f0005354a..57afcd9b8c24 100644 --- a/src/material/input/_input-theme.scss +++ b/src/material/input/_input-theme.scss @@ -45,11 +45,11 @@ } } - .mat-accent .mat-input-element { + .mat-form-field.mat-accent .mat-input-element { caret-color: mat-color($accent, text); } - .mat-warn .mat-input-element, + .mat-form-field.mat-warn .mat-input-element, .mat-form-field-invalid .mat-input-element { caret-color: mat-color($warn, text); }