Created
January 26, 2016 17:46
-
-
Save macx/f2359cbca0f0b2216339 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// libsass (v3.3.2) | |
// ---- | |
$layout-breakpoints: ( | |
small: 480px, | |
medium: 600px, | |
large: 1024px, | |
xlarge: 1300px, | |
xxlarge: 1600px, | |
xxxlarge: 1900px | |
); | |
@mixin respond($breakpoint, $type: 'from') { | |
@if $type == 'from' { | |
@media screen and (min-width: map-get($layout-breakpoints, $breakpoint)) { | |
@content; | |
} | |
} @else if $type == 'to' { | |
@media screen and (max-width: map-get($layout-breakpoints, $breakpoint)) { | |
@content; | |
} | |
} | |
} | |
body { | |
background: red; | |
@include respond('small') { | |
background: orange; | |
} | |
@include respond('medium') { | |
background: green; | |
} | |
@include respond('large') { | |
background: lightgreen; | |
} | |
} |
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
body { | |
background: red; | |
} | |
@media screen and (min-width: 480px) { | |
body { | |
background: orange; | |
} | |
} | |
@media screen and (min-width: 600px) { | |
body { | |
background: green; | |
} | |
} | |
@media screen and (min-width: 1024px) { | |
body { | |
background: lightgreen; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment