Last active
August 29, 2015 14:09
-
-
Save AdmireNL/c4a05752cdd08713c166 to your computer and use it in GitHub Desktop.
Media Queries map with each loop
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
// ---- | |
// Sass (v3.4.7) | |
// Compass (v1.0.1) | |
// ---- | |
$mqs: ( | |
'500px': ('font-size': 12px, 'color': #000), | |
'1000px': ('font-size': 18px, 'color': #ccc), | |
); | |
body { | |
@each $width, $properties in $mqs { | |
@media (max-width: $width) { | |
@each $property, $value in $properties { | |
#{$property}: $value; | |
} | |
} | |
} | |
} |
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
@media (max-width: 500px) { | |
body { | |
font-size: 12px; | |
color: #000; | |
} | |
} | |
@media (max-width: 1000px) { | |
body { | |
font-size: 18px; | |
color: #ccc; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment