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

a11y/media-prefers-reduced-motion keeps adding media queries. #66

Open
ElPrudi opened this issue May 7, 2024 · 0 comments
Open

a11y/media-prefers-reduced-motion keeps adding media queries. #66

ElPrudi opened this issue May 7, 2024 · 0 comments

Comments

@ElPrudi
Copy link

ElPrudi commented May 7, 2024

I have this scss mixin here:

@mixin safe-hover {
  @media (hover: hover) {
    &:hover,
    &:focus {
      background-color: $colorSecondary;
      transition: all 0.15s;
    }

    @media screen and (prefers-reduced-motion: reduce) {
      &:hover,
      &:focus {
        background-color: $colorSecondary;
        transition: none;
      }
    }
  }
}

And the auto fix keeps adding the same media query to it. It seems like the plugin does not check if nest media query is already there.

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