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;
144144}
145145
146146// 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 ) {
148148 display : flex ;
149149 flex : 1 0 auto ;
150150
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.
151153 // 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 } & {
153155 justify-content : center ;
154156 }
155157
156- [mat-align-tabs = ' end' ] & {
158+ [mat-align-tabs = ' end' ] > #{ $parent } & {
157159 justify-content : flex-end ;
158160 }
159161}
Original file line number Diff line number Diff line change 1717}
1818
1919.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 ' ) ;
2121}
Original file line number Diff line number Diff line change 66@include mat-mdc-paginated-tab-header ;
77
88.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 ' ) ;
1010}
1111
1212.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;
138138}
139139
140140// 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 ) {
142142 display : flex ;
143143
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 } & {
145147 justify-content : center ;
146148 }
147149
148- [mat-align-tabs = ' end' ] & {
150+ [mat-align-tabs = ' end' ] > #{ $parent } & {
149151 justify-content : flex-end ;
150152 }
151153}
Original file line number Diff line number Diff line change 88}
99
1010.mat-tab-labels {
11- @include paginated-tab-header-item-wrapper ;
11+ @include paginated-tab-header-item-wrapper ( ' .mat-tab-header ' ) ;
1212}
1313
1414.mat-tab-label-container {
Original file line number Diff line number Diff line change 44@include paginated-tab-header ;
55
66.mat-tab-links {
7- @include paginated-tab-header-item-wrapper ;
7+ @include paginated-tab-header-item-wrapper ( ' .mat-tab-link-container ' ) ;
88}
99
1010.mat-ink-bar {
You can’t perform that action at this time.
0 commit comments