Skip to content

Commit

Permalink
fix(stepper): showing hover state after tap on touch devices (#14074)
Browse files Browse the repository at this point in the history
Fixes the `:hover` state of the step header lingering on the element after a tap on a touch device.
  • Loading branch information
crisbeto authored and jelbourn committed Dec 3, 2018
1 parent 0ef75ea commit f3031ad
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib/stepper/_stepper-theme.scss
Expand Up @@ -15,6 +15,15 @@
background-color: mat-color($background, hover);
}

// On touch devices the :hover state will linger on the element after a tap.
// Reset it via `@media` after the declaration, because the media query isn't
// supported by all browsers yet.
@media (hover: none) {
&:hover {
background: none;
}
}

.mat-step-label,
.mat-step-optional {
// TODO(josephperrott): Update to using a corrected disabled-text contrast
Expand Down

0 comments on commit f3031ad

Please sign in to comment.