Skip to content

Commit da9c707

Browse files
authored
fix(input): incorrectly handling nested themes (#19637)
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.
1 parent 3ffcc63 commit da9c707

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/material/input/_input-theme.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
}
4646
}
4747

48-
.mat-accent .mat-input-element {
48+
.mat-form-field.mat-accent .mat-input-element {
4949
caret-color: mat-color($accent, text);
5050
}
5151

52-
.mat-warn .mat-input-element,
52+
.mat-form-field.mat-warn .mat-input-element,
5353
.mat-form-field-invalid .mat-input-element {
5454
caret-color: mat-color($warn, text);
5555
}

0 commit comments

Comments
 (0)