Skip to content

Instantly share code, notes, and snippets.

@julienhay
Forked from remyzv/mediamixin
Created September 23, 2014 08:33
Show Gist options
  • Save julienhay/0147459557efab535d31 to your computer and use it in GitHub Desktop.
Save julienhay/0147459557efab535d31 to your computer and use it in GitHub Desktop.
@mixin media($point) {
@if $point == mobile {
@media screen and (max-width : em(768)) { @content ; }
}
@else if $point == tablet {
@media screen and (max-width : em(992)) and (min-width: em(768)) { @content ; }
}
@else if $point == laptop {
@media screen and (max-width : em(1200)) and (min-width: em(992)) { @content ; }
}
@else if $point == desktop {
@media screen and (min-width: em(1200)) { @content ; }
}
@else if $point == desktop-only {
@media screen and (min-width: em(992)) { @content ; }
}
@else if $point == tablet-only {
@media screen and (max-width: em(992)) { @content ; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment