Last active
December 18, 2015 11:49
-
-
Save iamtyce/5778876 to your computer and use it in GitHub Desktop.
Simple mixin to write inline responsive arguments within Rockhammer
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
// Respond-to mixin for Rock Hammer (https://github.com/malarkey/rock-hammer/) | |
// Author: @iamtyce | |
// Original author: @wernah, based on @benschwarz | |
// ******************** // | |
// RESPOND TO // | |
// ******************** // | |
// Use: @include respond-to(bp5) { } | |
@mixin respond-to($breakpoint) { | |
$respondToLoop: bp1, bp2, bp3, bp4, bp5, bp6; | |
@each $respondTo in $respondToLoop { | |
@if $breakpoint == #{$respondTo} { | |
@media only #{$media} and ($feature: #{$respondTo}) { @content } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment