mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
committed by
Jeremy Elbourn
parent
6314d15353
commit
947c29afcc
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user