Skip to content

Commit e148414

Browse files
devversionjelbourn
authored andcommitted
fix(slide-toggle): blended ripples do not match spec (#12735)
* In order to fully align the slide-toggle with the 2018 specs, we need to reduce the opacity of the transient ripples because those blend together with the persistent ripple that has been introduced for hover/focus.
1 parent 2adced1 commit e148414

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/slide-toggle/slide-toggle.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,10 @@ $mat-slide-toggle-bar-track-width: $mat-slide-toggle-bar-width - $mat-slide-togg
191191
pointer-events: none;
192192

193193
.mat-ripple-element:not(.mat-slide-toggle-persistent-ripple) {
194-
opacity: 0.16;
194+
// Although the specs describe an opacity of 16% for ripples if the slide-toggle is being
195+
// pressed, we need to reduce the opacity a bit because besides the transient ripples,
196+
// the persistent ripple will still show up and blend with the transient ripple.
197+
opacity: 0.12;
195198
}
196199
}
197200

0 commit comments

Comments
 (0)