In my app, the material tabs don't shrink correctly when the width of the page decreases when using flexbox.
I was able to replicate the issue here: https://stackblitz.com/edit/angular-xthdcw
Code:
.panel{
padding: 24px;
border: 1px solid black;
margin-right: 20px;
}
.container{
display: flex;
}
<div class="container">
<div class="panel">
<mat-tab-group>
<mat-tab label="FirstLongText"> Content 1 </mat-tab>
<mat-tab label="SecondLongText"> Content 2 </mat-tab>
<mat-tab label="ThirdLongText"> Content 3 </mat-tab>
</mat-tab-group>
</div>
<div class="panel">
TestText123
</div>
</div>
So shouldn't the material-tab-group shrink when the width of the page decreases and show the navigation arrows in the head-bar? But as you can see the second panel is out of place. So what is wrong here?