Skip to content

Instantly share code, notes, and snippets.

@besabellacyrus
Created May 8, 2017 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save besabellacyrus/e6e8b733b7ae781607082267cabc5925 to your computer and use it in GitHub Desktop.
Save besabellacyrus/e6e8b733b7ae781607082267cabc5925 to your computer and use it in GitHub Desktop.
$xsmall: 320px;
$small: 544px;
$medium: 767px;
$large: 992px;
$xlarge: 1200px;
$laptopl: 1440px;
$sixteen: 1600px;
@mixin media-breakpoint($media) {
@if $media == xs {
@media only screen and (max-width: $xsmall) { @content; }
}
@else if $media == sm {
@media only screen and (min-width: $xsmall + 1) and (max-width: $small) { @content; }
}
@else if $media == md {
@media only screen and (min-width: $small + 1) and (max-width: $medium) { @content; }
}
@else if $media == lg {
@media only screen and (min-width: $medium + 1) and (max-width: $large) { @content; }
}
@else if $media == xl {
@media only screen and (min-width: $large + 1) and (max-width: $xlarge) { @content; }
}
@else if $media == laptopl {
@media only screen and (min-width: $xlarge + 1) and (max-width: $laptopl) { @content; }
}
@else if $media == laptopxl {
@media only screen and (min-width: $laptopl + 1) and (max-width: $sixteen){ @content; }
}
}
@mixin media-breakpoint-width($min-width, $max-width) {
@media only screen and (min-width: $min-width) and (max-width: $max-width) { @content; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment