]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Remove libsass @media nesting bug workaround
authorChris Rebert <code@rebertia.com>
Mon, 5 Jan 2015 21:05:10 +0000 (13:05 -0800)
committerGleb Mazovetskiy <glex.spb@gmail.com>
Thu, 8 Jan 2015 21:41:33 +0000 (21:41 +0000)
https://github.com/sass/libsass/issues/185 has been fixed.
Refs #48

scss/mixins/_breakpoints.scss

index 232b9416f9553cd43e24a6f062abf571a2d20f4b..790bb73433ee9dd9ebba954c015537474f5a484f 100644 (file)
 // 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;
-      }
-    }
   }
 }