Media queries shortcut

@mixin breakpoint($point, $max-point: false) { @if $enable-responsive == true { $min-width: false; @if $point == lg { $min-width: $screen-lg; } @else if $point == md { $min-width: $screen-md; } @else if $point == sm { $min-width: $screen-sm; } @else if $point == xs { $min-width: $screen-xs; } @if $max-point { $max-width: $screen-xs-max; @if $max-point == md { $max-width: $screen-md-max; } @else if $max-point == sm { $max-width: $screen-sm-max; } @else if $max-point == xs { $max-width: $screen-xs-max; } @if $min-width != false { @media (min-width: $min-width) and (max-width: $max-width) { @content; } } @else { @media (max-width: $max-width) { @content; } } } @else if $min-width != false { @media (min-width: $min-width) { @content; } } } }
A mixin to create shotcuts for @media queries use

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.