Skip to content

Commit

Permalink
fix(stepper): showing hover state after tap on touch devices (angular…
Browse files Browse the repository at this point in the history
…#14074)

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 josephperrott committed Jan 14, 2019
1 parent d2ff2a7 commit 22f593b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib/stepper/_stepper-theme.scss
Original file line number Diff line number Diff line change
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 22f593b

Please sign in to comment.