Skip to content

Instantly share code, notes, and snippets.

@Grawl
Created April 23, 2019 11:45
Show Gist options
  • Select an option

  • Save Grawl/bd3757779cbe145a7172d3ac8844010f to your computer and use it in GitHub Desktop.

Select an option

Save Grawl/bd3757779cbe145a7172d3ac8844010f to your computer and use it in GitHub Desktop.
Sass nested media queries issue

With Sass, I can use nested media queries:

.selector
    @media (min-width: 100px)
        @media (max-width: 200px)
            color: white

And it combines all media queries with and:

@media (min-width: 100px) and (max-width: 200px) {
    .selector { 
        color: white;
    }
}

But I cannot use this trick to combine media queries with , to get this:

@media (min-width: 100px), (max-width: 200px) {
    .selector {
        color: white;
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment