File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 8
8
*ngSwitchCase ="true "
9
9
[ngTemplateOutlet] ="iconOverrides.number "
10
10
[ngTemplateOutletContext] ="_getIconContext() "> </ ng-container >
11
- < span *ngSwitchDefault > {{index + 1}}</ span >
11
+ < span class =" mat-step-icon-content " *ngSwitchDefault > {{index + 1}}</ span >
12
12
</ ng-container >
13
13
14
14
< ng-container *ngSwitchCase ="'edit' " [ngSwitch] ="!!(iconOverrides && iconOverrides.edit) ">
15
15
< ng-container
16
16
*ngSwitchCase ="true "
17
17
[ngTemplateOutlet] ="iconOverrides.edit "
18
18
[ngTemplateOutletContext] ="_getIconContext() "> </ ng-container >
19
- < mat-icon *ngSwitchDefault > create</ mat-icon >
19
+ < mat-icon class =" mat-step-icon-content " *ngSwitchDefault > create</ mat-icon >
20
20
</ ng-container >
21
21
22
22
< ng-container *ngSwitchCase ="'done' " [ngSwitch] ="!!(iconOverrides && iconOverrides.done) ">
23
23
< ng-container
24
24
*ngSwitchCase ="true "
25
25
[ngTemplateOutlet] ="iconOverrides.done "
26
26
[ngTemplateOutletContext] ="_getIconContext() "> </ ng-container >
27
- < mat-icon *ngSwitchDefault > done</ mat-icon >
27
+ < mat-icon class =" mat-step-icon-content " *ngSwitchDefault > done</ mat-icon >
28
28
</ ng-container >
29
29
</ div >
30
30
< div class ="mat-step-label "
Original file line number Diff line number Diff line change @@ -26,10 +26,16 @@ $mat-step-header-icon-size: 16px !default;
26
26
border-radius : 50% ;
27
27
height : $mat-stepper-label-header-height ;
28
28
width : $mat-stepper-label-header-height ;
29
- align-items : center ;
30
- justify-content : center ;
31
- display : flex ;
32
29
flex-shrink : 0 ;
30
+ position : relative ;
31
+ }
32
+
33
+ .mat-step-icon-content {
34
+ // Use absolute positioning to center the content, because it works better with text.
35
+ position : absolute ;
36
+ top : 50% ;
37
+ left : 50% ;
38
+ transform : translate (-50% , -50% );
33
39
}
34
40
35
41
.mat-step-icon .mat-icon {
You can’t perform that action at this time.
0 commit comments