Created
December 12, 2013 07:50
-
-
Save sugarenia/7924548 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// Sass (v3.3.0.rc.1) | |
// Compass (v0.13.alpha.10) | |
// ---- | |
$breakpoints: ( | |
sm: 30em, | |
med: 50em, | |
lrg: 80em | |
); | |
@mixin bp($bp) { | |
@each $breakpoint, $value in $breakpoints { | |
@if $breakpoint == $bp { | |
@media screen and (min-width: $value) { | |
@content; | |
} | |
} | |
} | |
} | |
div { | |
background-color: blue; | |
@include bp(sm) { | |
background-color: red; | |
} | |
@include bp(med) { | |
background-color: green; | |
} | |
@include bp(lrg) { | |
background-color: yellow; | |
} | |
} |
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
div { | |
background-color: blue; | |
} | |
@media screen and (min-width: 30em) { | |
div { | |
background-color: red; | |
} | |
} | |
@media screen and (min-width: 50em) { | |
div { | |
background-color: green; | |
} | |
} | |
@media screen and (min-width: 80em) { | |
div { | |
background-color: yellow; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment