Created
April 18, 2015 18:59
-
-
Save una/453580a9dc26f311773d 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
<div></div> |
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.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
$breakpoints: ( | |
'break-1': 600px, | |
'break-2': 800px | |
); | |
@mixin breakpoint($name) { | |
@if not map-has-key($breakpoints, $name) { | |
@warn "Invalid breakpoint `#{$name}`."; | |
} | |
@else { | |
@media (min-width: map-get($breakpoints, $name)) { | |
@content; | |
} | |
} | |
} | |
div { | |
width: 100%; | |
height: 100px; | |
display: block; | |
background: blue; | |
@include breakpoint(break-1) { | |
background: red; | |
} | |
} |
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 { | |
width: 100%; | |
height: 100px; | |
display: block; | |
background: blue; | |
} | |
@media (min-width: 600px) { | |
div { | |
background: red; | |
} | |
} |
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></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment