I have done my mat-tab customization as follows
.mat-tab-label {
font-weight:300;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
color:white !important;
font-size:18px;
opacity: 1 !important
}
.mat-tab-link {
color:white !important;
}
.mat-ink-bar {
background-color: white !important
}
.mat-tab-label-active {
font-weight:300;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
color:white !important;
font-size:18px;
opacity: 1 !important
}
the tab looks as
<mat-tab-group>
<mat-tab label="Sales">
<div fxLayout="row" fxFlex="100%"> </div>
</mat-tab>
<mat-tab label="Service">
<h1>Some more tab content</h1>
<p>...</p>
</mat-tab>
</mat-tab-group>
I have two problems:
- the ink-bar color is not changing
- I have two different tab groups. I want to style them differently. So with above solution, it basically changes all the tab components globally. How do I convert them to specific CSS classes? I did try like
.my-label
and using it asclass="my-label"
but that does not work.