Skip to content

Commit

Permalink
fix(ripple): fix ripple color in dark theme (#3094)
Browse files Browse the repository at this point in the history
* Fixes the incorrect color for ripple elements in dark-themes.
  • Loading branch information
devversion authored and andrewseguin committed Feb 16, 2017
1 parent 3beccb9 commit a91ae72
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/lib/core/ripple/_ripple.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import '../theming/theming';

$mat-ripple-element-color: rgba(0, 0, 0, 0.1);
$mat-ripple-color-opacity: 0.1;

@mixin mat-ripple() {
// The host element of an md-ripple directive should always have a position of "absolute" or
Expand All @@ -18,14 +18,20 @@ $mat-ripple-element-color: rgba(0, 0, 0, 0.1);
border-radius: 50%;
pointer-events: none;

background-color: $mat-ripple-element-color;

transition: opacity, transform 0ms cubic-bezier(0, 0, 0.2, 1);
transform: scale(0);
}
}

@mixin mat-ripple-theme($theme) {}
/* Theme for the ripple elements.*/
@mixin mat-ripple-theme($theme) {
$foreground: map_get($theme, foreground);
$foreground-base: map_get($foreground, base);

.mat-ripple-element {
background-color: rgba($foreground-base, $mat-ripple-color-opacity);

This comment has been minimized.

Copy link
@takamori

takamori Nov 21, 2017

why does this use the theme's foreground color to color the background of the ripple?

}
}


// A mixin, which generates temporary ink ripple on a given component.
Expand Down

0 comments on commit a91ae72

Please sign in to comment.