Created
January 10, 2019 21:52
-
-
Save asipple1/e1ef9c2b72feef5460b27631465e2245 to your computer and use it in GitHub Desktop.
This file contains 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
/* -------------------------- | |
* RESPONSIVE MIXINS | |
* -------------------------- */ | |
$respond-to-queries: (smartphone: 'all and (max-width: 600px)', | |
tablet-portrait: 'all and (max-width: 768px)', | |
tablet: 'all and (max-width: 1024px)', | |
desktop-medium: 'all and (max-width: 1240px)' | |
); | |
@mixin respond-to($query) { | |
$media_query: $query; | |
@if map-has-key($respond-to-queries, $query) { | |
$media_query: map-get($respond-to-queries, $query); | |
} | |
@media #{$media_query} { | |
@content; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment