Created
January 20, 2015 16:32
-
-
Save sugarenia/ccee16592d78550ddc2d 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
// ---- | |
// Sass (v3.4.9) | |
// Compass (v1.0.1) | |
// ---- | |
// Breakpoints | |
@mixin breakpoint($points...) { | |
@for $i from 1 through length($points) { | |
$point: nth($points, $i); | |
// iPhone 4/4s | |
@if $point == mobile-narrow { | |
@media (max-device-width: 320px) and (max-device-height: 480px) { @content; } | |
} | |
// iPhone 5 and medium android phones | |
@if $point == mobile-normal { | |
@media (max-device-width: 320px) and (min-device-height: 481px) { @content; } | |
} | |
// iPhone 6/6 plus and wide android phones | |
@else if $point == mobile-wide { | |
@media (max-device-width: 599px) and (min-device-width: 321px) { @content; } | |
} | |
// Tablets | |
@else if $point == tablet { | |
@media (min-device-width: 600px) { @content; } | |
} | |
} | |
} | |
.body { | |
@include breakpoint(mobile-narrow, mobile-normal, tablet) { | |
background: red; | |
} | |
} |
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
@media (max-device-width: 320px) and (max-device-height: 480px) { | |
.body { | |
background: red; | |
} | |
} | |
@media (max-device-width: 320px) and (min-device-height: 481px) { | |
.body { | |
background: red; | |
} | |
} | |
@media (min-device-width: 600px) { | |
.body { | |
background: red; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment