Created
January 14, 2015 22:15
-
-
Save ataylorme/40212395ca8634de55e9 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// 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; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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