Skip to content

Instantly share code, notes, and snippets.

@asipple1
Created January 10, 2019 21:52
Show Gist options
  • Save asipple1/e1ef9c2b72feef5460b27631465e2245 to your computer and use it in GitHub Desktop.
Save asipple1/e1ef9c2b72feef5460b27631465e2245 to your computer and use it in GitHub Desktop.
/* --------------------------
* 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