Skip to content

Commit 3ce4e8d

Browse files
devversionjelbourn
authored andcommitted
fix(slide-toggle): remove webkit tap highlight (#12708)
* Since the slide-toggle already has the ripples as feedback indicator, the webkit tap highlight can be removed to make the slide-toggle behave more like a native (Android) switch component on touch devices.
1 parent 803f73f commit 3ce4e8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ $mat-slide-toggle-bar-track-width: $mat-slide-toggle-bar-width - $mat-slide-togg
2121
max-width: 100%;
2222

2323
line-height: $mat-slide-toggle-height;
24-
2524
white-space: nowrap;
25+
outline: none;
2626

2727
// Disable user selection to ensure that dragging is smooth without grabbing
2828
// some elements accidentally.
2929
@include user-select(none);
3030

31-
outline: none;
31+
-webkit-tap-highlight-color: transparent;
3232

3333
&.mat-checked {
3434
.mat-slide-toggle-thumb-container {

0 commit comments

Comments
 (0)