Commit 720d02c5 authored by Gleb Mazovetskiy's avatar Gleb Mazovetskiy
Browse files

Revert "Remove libsass @media nesting bug workaround"

This reverts commit d6a5ebf4.

There has not been a release of libsass with this fix yet, sorry!
parent f4a00dc0
Showing with 14 additions and 2 deletions
+14 -2
......@@ -68,9 +68,21 @@
// 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) {
@include media-breakpoint-up($name, $breakpoints) {
@include media-breakpoint-down($name, $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) {
@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;
}
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment