Last active
January 3, 2016 20:09
-
-
Save iamtyce/8512994 to your computer and use it in GitHub Desktop.
Simple mixin to write inline responsive arguments within Sass Bootstrap v3
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 Bootstrap v3 (Sass) (https://github.com/twbs/bootstrap-sass) | |
// Author: @iamtyce | |
// Original author: @wernah, based on @benschwarz | |
// ******************** // | |
// RESPOND TO // | |
// ******************** // | |
// Use: @include respond-to(screen-xs) { } | |
@mixin respond-to($breakpoint) { | |
$respondToLoop: $screen-xs, $screen-sm, $screen-md, $screen-lg; | |
@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
Doesn't work cause you don't have
$feature
defined.