I want to change the style of the mat-ink-bar for Angular material tab.
I wanted to archieve a design like this: Jsfiddle example
The problem is that the mat-ink-bar already absolute positioned and i cannot display my ::after element. Is there a way how i can archieve this ?
Here is what i tried on stackblitz: Mat tab on stackblitz
my style are located inside the style.css. The triangle at the bottom is hidden if you use the dev tool. I could not show it using z-index.. Any help would be appreciated.
here the code:
css
.c-tab .mat-ink-bar {
height: 5px;
}
.c-tab .mat-ink-bar::after {
content: '';
position: absolute;
top: 0;
right: 0;
left: 0;
margin: 0 auto;
width: 0;
height: 0;
border-top: solid 50px #3f51b5;
border-left: solid 50px transparent;
border-right: solid 50px transparent;
}
html
<mat-tab-group class="c-tab">
<mat-tab label="First"> Content 1 </mat-tab>
<mat-tab label="Second"> Content 2 </mat-tab>
<mat-tab label="Third"> Content 3 </mat-tab>
</mat-tab-group>

position: absolutedoes not prevent you from using::after- Code Spirit