Created
November 24, 2013 01:30
-
-
Save NatalieMac/7622248 to your computer and use it in GitHub Desktop.
Sass Breakpoint for Mobile
This file contains hidden or 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
Setting up breakpoints: | |
@mixin bp($point) { | |
@if $point == lg { | |
@media screen and (min-width: 960px) { @content; } | |
} | |
@else if $point == md { | |
@media screen and (min-width: 600px) { @content; } | |
} | |
@else if $point == sm { | |
@media screen and (max-width: 400px) { @content; } | |
} | |
@else if $point == pt { | |
@media print { @content; } | |
} | |
} | |
Using them: | |
.menu-toggle { | |
font-family: $font-title; | |
@include bp(md) { | |
display: none; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment