Skip to content

Instantly share code, notes, and snippets.

@scsskid
Created November 30, 2018 13:52
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 scsskid/a502803079d7e6649b14b8cd301d5cd7 to your computer and use it in GitHub Desktop.
Save scsskid/a502803079d7e6649b14b8cd301d5cd7 to your computer and use it in GitHub Desktop.
@mixin breakpoint($class) {
@if $class == xs {
@media (max-width: 767px) { @content; }
}
@else if $class == sm {
@media (min-width: 768px) { @content; }
}
@else if $class == md {
@media (min-width: 992px) { @content; }
}
@else if $class == lg {
@media (min-width: 1200px) { @content; }
}
@else {
@warn "Breakpoint mixin supports: xs, sm, md, lg";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment