Skip to content

Commit

Permalink
fix(stepper): showing hover state after tap on touch devices
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 committed Nov 10, 2018
1 parent ba31c72 commit d50faa5
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 {
color: mat-color($foreground, disabled-text);
Expand Down

0 comments on commit d50faa5

Please sign in to comment.