Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opacity stuck to $hamburger-hover-opacity after tapping (mobile) #76

Open
marinoguerieri opened this issue May 13, 2019 · 1 comment
Open

Comments

@marinoguerieri
Copy link

It seems that opacity never goes back to original value after tapping on mobile device, or at least my mobile devices. :) Hamburger stays as opaque as it were during hover. On desktop everything is fine.
Bug happens even on your demo, so it's not due to my implementation.

@marinoguerieri
Copy link
Author

Ok it seems that the cause is using :hover, which is fine on desktop but on mobile it has strange behaviour, i.e. it seems that button stays in hover mode after clicking, and that it's something that's known.
See this and similar issues:
https://stackoverflow.com/questions/29016648/submit-button-stays-hover-color-after-clicked

I've commented out this part of code, thus disabling hover functionality/opacity change, after which everything works:

  /*
  &:hover {
    @if $hamburger-hover-use-filter == true {
      filter: $hamburger-hover-filter;
    }
    @else {
      opacity: $hamburger-hover-opacity;
    }
  }

  &.is-active {
    &:hover {
      @if $hamburger-hover-use-filter == true {
        filter: $hamburger-active-hover-filter;
      }
      @else {
        opacity: $hamburger-active-hover-opacity;
      }
    }

    .hamburger-inner,
    .hamburger-inner::before,
    .hamburger-inner::after {
      background-color: $hamburger-active-layer-color;
    }
  }*/

I didn't have the time to actually make it work but I suppose the solution is to somehow NOT apply hover on mobile devices, maybe using media queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant