Not sure if anyone still needs this, but I made the following function:
@mixin multiple-media($media...) { @each $query in $media { @include media($query) { @content } } }
which works for me very well.
@include multiple-media($mobile-landscape, $tablet-portrait, $tablet-landscape, $laptop, $desktop) { .mobile { @include display(none); } }
Produces
@media screen and (min-width: 29.25em) and (max-width: 48em) and (max-height: 29.25em) { .logo a .mobile { display: none; } } @media screen and (min-width: 29.25em) and (max-width: 50em) and (min-height: 29.25em) { .logo a .mobile { display: none; } } @media screen and (min-width: 48em) and (max-width: 80em) and (max-height: 50em) { .logo a .mobile { display: none; } } @media screen and (min-width: 80em) and (max-width: 105em) { .logo a .mobile { display: none; } } @media screen and (min-width: 105em) { .logo a .mobile { display: none; } }
Foxhoundn
source share