Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save azz0r/9c3f464b13101d1c18b75247be26bfad to your computer and use it in GitHub Desktop.
Save azz0r/9c3f464b13101d1c18b75247be26bfad to your computer and use it in GitHub Desktop.
$screen-sm-min: 768px;
$screen-xs-max: ($screen-sm-min - 1);
$screen-md-min: 992px;
$screen-sm-max: ($screen-md-min - 1);
$screen-lg-min: 1200px;
$screen-md-max: ($screen-lg-min - 1);
@mixin breakpoint($class) {
@if $class == xs {
@media (max-width: $screen-md-max) { @content; }
}
@else if $class == sm {
@media (min-width: $screen-md-min) { @content; }
}
@else if $class == lg {
@media (min-width: $screen-lg-min) { @content; }
}
@else {
@warn "Breakpoint mixin supports: xs, sm, lg";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment