Created
November 28, 2019 18:05
-
-
Save pigeonfresh/62388c517049715ab7a9b050a9ba90bd to your computer and use it in GitHub Desktop.
MQ
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
$mediaQueryHacks: (maxWidth767, '(max-width: 767px)'); | |
@mixin respond-to($name, $list: $mediaQueries) { | |
@if map-has-key($mediaQueries, $name) { | |
@media #{map-get($mediaQueries, $name)} { | |
@content; | |
} | |
} @else { | |
@error "MediaQuery #{$name} does not exist"; | |
} | |
} | |
@include respond-to(maxWidth767, $mediaQueryHacks) { | |
background: red; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment