Skip to content

a11y/media-prefers-reduced-motion doesn't detect override for rule with multiple selectors #57

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

Open
ghost opened this issue Oct 10, 2020 · 0 comments

Comments

@ghost
Copy link

ghost commented Oct 10, 2020

These rules trigger an error with a11y/media-prefers-reduced-motion:

.Zoom-img,
.Zoom-wrap {
  position: relative;
  transition: all var(--Zoom-transition);
  z-index: 1;
}

@media screen and (prefers-reduced-motion) {
  .Zoom-img,
  .Zoom-wrap {
    transition: none;
  }
}

Modifying the above to rules with single selectors gets rid of the error:

.Zoom-wrap {
  position: relative;
  transition: all var(--Zoom-transition);
  z-index: 1;
}

@media screen and (prefers-reduced-motion) {
  .Zoom-wrap {
    transition: none;
  }
}

So it seems that this rule does not parse css rules with multiple selectors correctly. Neither of the above cases should return a linting error.

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

0 participants