Reputation: 310
I am working on Angular4 and have been using angular material. I have created a tab-group and I want to change the text color of a tab label when I select any tab. I have tried to override the default css but that didn't help me.
I can override the ink bar but I am not able to override tab-text color upon selection
.mat-ink-bar{
background-color:#00ADEE;
}
/*.mat-tab-label::selection{
color: #00ADEE !important;
} */
The commented part which I was trying to change the color of a tab-label-color.
Upvotes: 3
Views: 14793
Reputation: 395
.mat-tab-label-active .mat-tab-label-content {
//your style here
}
Upvotes: 0
Reputation: 34673
You need to use the following class for active tab:
.mat-tab-label-active {
color: #00ADEE !important;
}
Here is a link to working demo.
Upvotes: 7