Skip to content

Commit f3031ad

Browse files
crisbetojelbourn
authored andcommittedDec 3, 2018
fix(stepper): showing hover state after tap on touch devices (#14074)
Fixes the `:hover` state of the step header lingering on the element after a tap on a touch device.
1 parent 0ef75ea commit f3031ad

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎src/lib/stepper/_stepper-theme.scss

+9
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
background-color: mat-color($background, hover);
1616
}
1717

18+
// On touch devices the :hover state will linger on the element after a tap.
19+
// Reset it via `@media` after the declaration, because the media query isn't
20+
// supported by all browsers yet.
21+
@media (hover: none) {
22+
&:hover {
23+
background: none;
24+
}
25+
}
26+
1827
.mat-step-label,
1928
.mat-step-optional {
2029
// TODO(josephperrott): Update to using a corrected disabled-text contrast

0 commit comments

Comments
 (0)
Please sign in to comment.