fix(button): don't show hover overlay on devices that don't support hovering (#12030)

Fixes the hover overlay persisting on touch devices after tapping on a button.

Fixes #12022.
This commit is contained in:
Kristiyan Kostadinov
2018-07-11 17:10:51 +02:00
committed by Jeremy Elbourn
parent 6314d15353
commit 947c29afcc
+10
View File
@@ -22,6 +22,16 @@
opacity: 1;
}
// Disable the hover styles on non-hover devices. Since this is more of a progressive
// enhancement and not all desktop browsers support this kind of media query, we can't
// use something like `@media (hover)`.
@media (hover: none) {
.mat-button:hover .mat-button-focus-overlay,
.mat-stroked-button:hover .mat-button-focus-overlay {
opacity: 0;
}
}
.mat-raised-button {
@include mat-raised-button;
}