I have set the outline color on hover successfully. But when I try to set outline color for hover in invalid state it does not work. My code is given below:
&.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline {
//It works it set the color to blue
color: blue;
//It does not work
&.mat-form-field-invalid.mat-form-field-invalid {
color: red;
}
}
The color for invalid state &.mat-form-field-invalid.mat-form-field-invalid is not working. Please help me. If someone knows how to solve it the please let me know. Thank you
2
Answers
To change the outline color on hover for an invalid state, you should use the border-color property instead. Here’s the corrected code:
It can be done as follow: