File tree Expand file tree Collapse file tree 6 files changed +14
-10
lines changed
material-experimental/mdc-tabs Expand file tree Collapse file tree 6 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -144,16 +144,18 @@ $mat-tab-animation-duration: 500ms !default;
144
144
}
145
145
146
146
// Structural styles for the element that wraps the paginated header items.
147
- @mixin mat-mdc-paginated-tab-header-item-wrapper {
147
+ @mixin mat-mdc-paginated-tab-header-item-wrapper ( $parent ) {
148
148
display : flex ;
149
149
flex : 1 0 auto ;
150
150
151
+ // We need to set the parent here explicitly, in order to prevent the alignment
152
+ // from any parent tab groups from propagating down to the children when nesting.
151
153
// Note that these are used as inputs so they shouldn't be changed to `mat-mdc-`.
152
- [mat-align-tabs = ' center' ] & {
154
+ [mat-align-tabs = ' center' ] > #{ $parent } & {
153
155
justify-content : center ;
154
156
}
155
157
156
- [mat-align-tabs = ' end' ] & {
158
+ [mat-align-tabs = ' end' ] > #{ $parent } & {
157
159
justify-content : flex-end ;
158
160
}
159
161
}
Original file line number Diff line number Diff line change 17
17
}
18
18
19
19
.mat-mdc-tab-labels {
20
- @include mat-mdc-paginated-tab-header-item-wrapper ;
20
+ @include mat-mdc-paginated-tab-header-item-wrapper ( ' .mat-mdc-tab-header ' ) ;
21
21
}
Original file line number Diff line number Diff line change 6
6
@include mat-mdc-paginated-tab-header ;
7
7
8
8
.mat-mdc-tab-links {
9
- @include mat-mdc-paginated-tab-header-item-wrapper ;
9
+ @include mat-mdc-paginated-tab-header-item-wrapper ( ' .mat-mdc-tab-link-container ' ) ;
10
10
}
11
11
12
12
.mat-mdc-tab-link-container {
Original file line number Diff line number Diff line change @@ -138,14 +138,16 @@ $mat-tab-animation-duration: 500ms !default;
138
138
}
139
139
140
140
// Structural styles for the element that wraps the paginated header items.
141
- @mixin paginated-tab-header-item-wrapper {
141
+ @mixin paginated-tab-header-item-wrapper ( $parent ) {
142
142
display : flex ;
143
143
144
- [mat-align-tabs = ' center' ] & {
144
+ // We need to set the parent here explicitly, in order to prevent the alignment
145
+ // from any parent tab groups from propagating down to the children when nesting.
146
+ [mat-align-tabs = ' center' ] > #{$parent } & {
145
147
justify-content : center ;
146
148
}
147
149
148
- [mat-align-tabs = ' end' ] & {
150
+ [mat-align-tabs = ' end' ] > #{ $parent } & {
149
151
justify-content : flex-end ;
150
152
}
151
153
}
Original file line number Diff line number Diff line change 8
8
}
9
9
10
10
.mat-tab-labels {
11
- @include paginated-tab-header-item-wrapper ;
11
+ @include paginated-tab-header-item-wrapper ( ' .mat-tab-header ' ) ;
12
12
}
13
13
14
14
.mat-tab-label-container {
Original file line number Diff line number Diff line change 4
4
@include paginated-tab-header ;
5
5
6
6
.mat-tab-links {
7
- @include paginated-tab-header-item-wrapper ;
7
+ @include paginated-tab-header-item-wrapper ( ' .mat-tab-link-container ' ) ;
8
8
}
9
9
10
10
.mat-ink-bar {
You can’t perform that action at this time.
0 commit comments