Last active
March 9, 2022 11:51
-
-
Save sajanv88/ba080b03e9099c6a39447af7300c408d to your computer and use it in GitHub Desktop.
SCSS Responsive mixin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// break points | |
$sm: 576px; | |
$md: 768px; | |
$lg: 992px; | |
$xl: 1200px; | |
$xxl: 1400px; | |
@mixin respond-to($media) { | |
@if $media == sm { | |
@media (min-width: $sm) { | |
@content; | |
} | |
} @else if $media == md { | |
@media (min-width: $md) { | |
@content; | |
} | |
} @else if $media == lg { | |
@media (min-width: $lg) { | |
@content; | |
} | |
} @else if $media == xl { | |
@media (min-width: $xl) { | |
@content; | |
} | |
} @else if $media == xxl { | |
@media (min-width: $xxl) { | |
@content; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment