|
62 | 62 |
|
63 | 63 | // Override ink bar when background color is the same
|
64 | 64 | &.mat-background-#{$name} {
|
65 |
| - @include _mat-ink-bar($color, default-contrast); |
| 65 | + > .mat-tab-header, > .mat-tab-link-container { |
| 66 | + @include _mat-ink-bar($color, default-contrast); |
| 67 | + } |
66 | 68 | }
|
67 | 69 | }
|
68 | 70 | }
|
|
96 | 98 | }
|
97 | 99 |
|
98 | 100 | @mixin _mat-tabs-background($background-color) {
|
| 101 | + // Note that these selectors target direct descendants so |
| 102 | + // that the styles don't apply to any nested tab groups. |
| 103 | + |
99 | 104 | // Set background color for the tab group
|
100 |
| - .mat-tab-header, .mat-tab-links, .mat-tab-header-pagination { |
| 105 | + > .mat-tab-header, > .mat-tab-link-container, > .mat-tab-header-pagination { |
101 | 106 | background-color: mat-color($background-color);
|
102 | 107 | }
|
103 | 108 |
|
104 | 109 | // Set labels to contrast against background
|
105 |
| - .mat-tab-label, .mat-tab-link { |
| 110 | + > .mat-tab-header .mat-tab-label, > .mat-tab-link-container .mat-tab-link { |
106 | 111 | color: mat-color($background-color, default-contrast);
|
107 | 112 |
|
108 | 113 | &.mat-tab-disabled {
|
|
111 | 116 | }
|
112 | 117 |
|
113 | 118 | // Set pagination chevrons to contrast background
|
114 |
| - .mat-tab-header-pagination-chevron { |
| 119 | + > .mat-tab-header-pagination .mat-tab-header-pagination-chevron { |
115 | 120 | border-color: mat-color($background-color, default-contrast);
|
116 | 121 | }
|
117 | 122 |
|
118 |
| - .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron { |
| 123 | + > .mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron { |
119 | 124 | border-color: mat-color($background-color, default-contrast, 0.4);
|
120 | 125 | }
|
121 | 126 |
|
122 | 127 | // Set ripples color to be the contrast color of the new background. Otherwise the ripple
|
123 | 128 | // color will be based on the app background color.
|
124 |
| - .mat-ripple-element { |
| 129 | + > .mat-tab-header .mat-ripple-element, |
| 130 | + > .mat-tab-link-container .mat-ripple-element { |
125 | 131 | background-color: mat-color($background-color, default-contrast, 0.12);
|
126 | 132 | }
|
127 | 133 | }
|
|
0 commit comments