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

Issue with SCSS $variables in media queries triggering no-mergeable-selectors rule #703

Closed
dallanlee opened this issue May 11, 2016 · 3 comments
Assignees
Labels
Milestone

Comments

@dallanlee
Copy link

I use Sass variable interpolation for media queries. (i.e. @media #{$media-query-md-only} { … }) Sass-lint throws a warning that I can merge rules that I actually can't. Sass-lint sees my media queries as null because of the variable interpolation. I'm sure this can be fixed.

To be more clear:

.navigation {
  @media #{$media-query-lg-up} {
    .nav-item {
      display: inline-block;
    }
  }
  @media #{$media-query-md-down} {
    .nav-item {
      display: block;
    }
  }
}

This would throw a warning like:
Rule '.navigation @media null .nav-item' should be merged with the rule on line 3 at line 8 col 5

@bgriffith
Copy link
Member

Thanks for the report @dallanlee 👍 Managed to replicate it.

@bgriffith bgriffith added the bug label May 11, 2016
@DanPurdy DanPurdy self-assigned this May 11, 2016
@DanPurdy
Copy link
Member

I'll take a look at it

DanPurdy added a commit to DanPurdy/sass-lint that referenced this issue May 11, 2016
@dallanlee
Copy link
Author

Quick response time! Thanks!

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

No branches or pull requests

3 participants