I am using Angular Material 8.2.3 in my project and I am trying to change the selected value color for Mat-Select component(ie drop down menu) as below.
In chrome inspector I can see the font color is defined by class .mat-select-value
However when I try to change the color using class selectors nothing happens.
Is there a way to change the selected value color? I have other menu drop downs on the page so it has to be confined to this component. Many thanks in advance.
My code below.
HTML
<mat-select class="custom-color" [(ngModel)]="value">
<mat-option>
Yes
</mat-option>
<mat-option>
No
</mat-option>
</mat-select>
CSS
Attempt 1:
.custom-color.mat-select-value{
color: green !important;
}
Attempt 2:
.custom-color > .mat-select-value{
color: green !important;
}