Created
May 7, 2015 15:38
-
-
Save DarbyBrown/6884592729d23e3bb777 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
// ---- | |
// libsass (v3.2.0-beta.6) | |
// ---- | |
$breakpoints: 480px 640px 900px; | |
@mixin cycle-breakpoints() { | |
@for $i from 1 through length($breakpoints) { | |
$i: $i !global; | |
$val: nth($breakpoints, $i); | |
@media only screen and (min-width: #{$val}) { | |
@content | |
} | |
} | |
} | |
div { | |
@include cycle-breakpoints { | |
padding: 2rem * $i; | |
} | |
} |
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
@media only screen and (min-width: 480px) { | |
div { | |
padding: 2rem; | |
} | |
} | |
@media only screen and (min-width: 640px) { | |
div { | |
padding: 4rem; | |
} | |
} | |
@media only screen and (min-width: 900px) { | |
div { | |
padding: 6rem; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment