Skip to content

Instantly share code, notes, and snippets.

@Metnew
Created July 11, 2016 15:01
Show Gist options
  • Save Metnew/75302aff0f463ea728d76847a5e9317e to your computer and use it in GitHub Desktop.
Save Metnew/75302aff0f463ea728d76847a5e9317e to your computer and use it in GitHub Desktop.
SCSS ESSENTIAL MEDIA QUERIES
@mixin respond-to($media) {
@if $media == mobile{
@media only screen and (max-width: $break-small) {
@content;
}
}
@else if $media == tablet {
@media only screen and (min-width: $break-small + 1) and (max-width: $break-large - 1){
@content;
}
}
@else if $media == desktop {
@media only screen and (min-width: $break-large){
@content;
}
}
@else {
@media only screen and (min-width: $break-small + 1) and (max-width: $break-large - 1){
@content;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment