Created
November 22, 2012 09:00
-
-
Save LucaRosaldi/4130090 to your computer and use it in GitHub Desktop.
SASS: mixin breakpoint()
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
// http://css-tricks.com/media-queries-sass-3-2-and-codekit/ | |
.page-wrap { | |
width: 75%; | |
@include breakpoint(papa-bear) { width: 60%; } | |
@include breakpoint(mama-bear) { width: 80%; } | |
@include breakpoint(baby-bear) { width: 95%; } | |
} |
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
@mixin breakpoint($point) { | |
@if $point == desktop { | |
@media (max-width: 1600px) { @content; } | |
} | |
@if $point == tablet { | |
@media (max-width: 1024px) { @content; } | |
} | |
@else if $point == phone { | |
@media (max-width: 767px) { @content; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment