Skip to content

Instantly share code, notes, and snippets.

@ataylorme
Created January 14, 2015 22:15
Show Gist options
  • Save ataylorme/40212395ca8634de55e9 to your computer and use it in GitHub Desktop.
Save ataylorme/40212395ca8634de55e9 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.1.0-beta)
// ----
//BREAKPOINTS
$Mobile: 480px;
$Landscape: 801px;
$Desktop: 1400px;
//MEDIA QUERY MIXIN
@mixin respond($media) {
@if $media == mobile {
@media only screen and (max-width: $Mobile) { @content; }
}//mobile
@else if $media == portrait {
@media only screen and (min-width: $Mobile + 1px ) and (max-width: $Landscape - 1px ) { @content; }
}//portrait
@else if $media == portrait-up {
@media only screen and (min-width: $Mobile + 1px ) { @content; }
}//portrait-up
@else if $media == portrait-down {
@media only screen and (max-width: $Landscape - 1px ) { @content; }
}//portrait-down
@else if $media == landscape {
@media only screen and (min-width: $Landscape) and (max-width: $Desktop - 1px ) { @content; }
}//landscape
@else if $media == landscape-up {
@media only screen and (min-width: $Landscape) { @content; }
}//landscape-up
@else if $media == landscape-down {
@media only screen and (max-width: $Desktop - 1px) { @content; }
}//landscape-down
@else if $media == desktop {
@media only screen and (min-width: $Desktop) { @content; }
}//desktop
@else if $media == retina {
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and ( min--moz-device-pixel-ratio: 2), only screen and ( -o-min-device-pixel-ratio: 2/1), only screen and ( min-device-pixel-ratio: 2), only screen and ( min-resolution: 192dpi), only screen and ( min-resolution: 2dppx) { @content; }
}//retina
@else {
@content;
}//all
}//respond
#header{
width: 100%;
margin: 0 auto;
padding: 15px 45px;
@include respond(landscape-down){
padding: 15px 0;
}
}
#header {
width: 100%;
margin: 0 auto;
padding: 15px 45px; }
@media only screen and (max-width: 1399px) {
#header {
padding: 15px 0; } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment