Skip to content

Commit 02d3eb6

Browse files
devversionandrewseguin
authored andcommitted
fix(tabs): incorrect ripple color for tabs with background (#8123)
* Tabs with a background color need to set the ripple colors to be the contrast color. Otherwise the ripples might be too dark/or light, depending on the color palette that is being used.
1 parent 75bccde commit 02d3eb6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib/tabs/_tabs-theme.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@
111111
.mat-tab-header-pagination-disabled .mat-tab-header-pagination-chevron {
112112
border-color: mat-color($background-color, default-contrast, 0.4);
113113
}
114+
115+
// Set ripples color to be the contrast color of the new background. Otherwise the ripple
116+
// color will be based on the app background color.
117+
.mat-ripple-element {
118+
background-color: mat-color($background-color, default-contrast, 0.12);
119+
}
114120
}
115121

116122
@mixin mat-tabs-typography($config) {

0 commit comments

Comments
 (0)