File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,13 @@ $mat-tab-animation-duration: 500ms !default;
2828 & .mat-tab-disabled {
2929 cursor : default ;
3030 }
31+
32+ & .mat-tab-label-content {
33+ display : inline-flex ;
34+ justify-content : center ;
35+ align-items : center ;
36+ white-space : nowrap ;
37+ }
3138}
3239
3340// Mixin styles for the top section of the view; contains the tab labels.
Original file line number Diff line number Diff line change 1414 [matRippleDisabled] ="tab.disabled || disableRipple "
1515 (click) ="_handleClick(tab, tabHeader, i) ">
1616
17- <!-- If there is a label template, use it. -->
18- < ng-template [ngIf] ="tab.templateLabel ">
19- < ng-template [cdkPortalOutlet] ="tab.templateLabel "> </ ng-template >
20- </ ng-template >
2117
22- <!-- If there is not a label template, fall back to the text label. -->
23- < ng-template [ngIf] ="!tab.templateLabel "> {{tab.textLabel}}</ ng-template >
18+ < div class ="mat-tab-label-content ">
19+ <!-- If there is a label template, use it. -->
20+ < ng-template [ngIf] ="tab.templateLabel ">
21+ < ng-template [cdkPortalOutlet] ="tab.templateLabel "> </ ng-template >
22+ </ ng-template >
23+
24+ <!-- If there is not a label template, fall back to the text label. -->
25+ < ng-template [ngIf] ="!tab.templateLabel "> {{tab.textLabel}}</ ng-template >
26+ </ div >
2427 </ div >
2528</ mat-tab-header >
2629
You can’t perform that action at this time.
0 commit comments