Skip to content

Instantly share code, notes, and snippets.

@laras126
Created July 21, 2016 01:23
Show Gist options
  • Save laras126/6558d1e8cf96b6ad447f36c9cb1213e2 to your computer and use it in GitHub Desktop.
Save laras126/6558d1e8cf96b6ad447f36c9cb1213e2 to your computer and use it in GitHub Desktop.
@mixin bp($point) {
@if ($MQs) {
$bp-sm: "(min-width: #{$screen-sm})";
$bp-md: "(min-width: #{$screen-md})";
$bp-lg: "(min-width: #{$screen-lg})";
$bp-xl: "(min-width: #{$screen-xl})";
$bp-xxl: "(min-width: #{$screen-xxl})";
@if $point == sm {
@media #{$bp-sm} { @content; }
}
@else if $point == md {
@media #{$bp-md} { @content; }
}
@else if $point == lg {
@media #{$bp-lg} { @content; }
}
@else if $point == xl {
@media #{$bp-xl} { @content; }
}
@else if $point == xxl {
@media #{$bp-xxl} { @content; }
}
@else {
@media(min-width: $point) { @content; }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment