Created
April 10, 2015 13:49
-
-
Save juanbrujo/d9a97ad8adc6298b705b to your computer and use it in GitHub Desktop.
SCSS @media mixin
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
// The Mixin: | |
@mixin bp($type) { | |
@if $type == small { | |
@media (min-width: 24em) { @content; } | |
} | |
@else if $type == medium { | |
@media (min-width: 46.8em) { @content; } | |
} | |
@else if $type == large { | |
@media (min-width: 50em) { @content; } | |
} | |
} | |
// Use: | |
selector { | |
@include bp(small) { | |
} | |
@include bp(medium) { | |
} | |
@include bp(large) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment