File tree 2 files changed +16
-6
lines changed
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;
28
28
& .mat-tab-disabled {
29
29
cursor : default ;
30
30
}
31
+
32
+ & .mat-tab-label-content {
33
+ display : inline-flex ;
34
+ justify-content : center ;
35
+ align-items : center ;
36
+ white-space : nowrap ;
37
+ }
31
38
}
32
39
33
40
// Mixin styles for the top section of the view; contains the tab labels.
Original file line number Diff line number Diff line change 14
14
[matRippleDisabled] ="tab.disabled || disableRipple "
15
15
(click) ="_handleClick(tab, tabHeader, i) ">
16
16
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 >
21
17
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 >
24
27
</ div >
25
28
</ mat-tab-header >
26
29
You can’t perform that action at this time.
0 commit comments