From: Chris Rebert Date: Mon, 5 Jan 2015 21:05:10 +0000 (-0800) Subject: Remove libsass @media nesting bug workaround X-Git-Tag: v4.0.0-alpha~218^2~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=807a837afe1c5ee2ac5f962658a5741673c04231;p=thirdparty%2Fbootstrap.git Remove libsass @media nesting bug workaround https://github.com/sass/libsass/issues/185 has been fixed. Refs #48 --- diff --git a/scss/mixins/_breakpoints.scss b/scss/mixins/_breakpoints.scss index 232b9416f9..790bb73433 100644 --- a/scss/mixins/_breakpoints.scss +++ b/scss/mixins/_breakpoints.scss @@ -68,21 +68,9 @@ // No minimum for the smallest breakpoint, and no maximum for the largest one. // Makes the @content apply only to the given breakpoint, not viewports any wider or narrower. @mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) { - // Nested media query combination does not work in libsass yet - // https://github.com/sass/libsass/issues/185 - // Work around until the issue is resolved: - $min: breakpoint-min($name, $breakpoints); - $max: breakpoint-max($name, $breakpoints); - @if $min and $max { - @media (min-width: $min) and (max-width: $max) { + @include media-breakpoint-up($name, $breakpoints) { + @include media-breakpoint-down($name, $breakpoints) { @content; } - } @else { - // One of min or max is a no-op, so this branch is not affected by libsass#185 - @include media-breakpoint-up($name, $breakpoints) { - @include media-breakpoint-down($name, $breakpoints) { - @content; - } - } } }