aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorheath3 <[email protected]>2016-06-09 16:07:27 +0100
committerheath3 <[email protected]>2016-06-09 16:07:27 +0100
commitd19e762d575245ad33ce2288a6bb4bc830b095d9 (patch)
treefb879882b156c760d1417ead744131e1c8403999
parent9ddd62d391d906606bdb715cddc98fccd0620234 (diff)
downloadbootstrap-d19e762d575245ad33ce2288a6bb4bc830b095d9.tar.xz
bootstrap-d19e762d575245ad33ce2288a6bb4bc830b095d9.zip
Re-use 'between' mixin for 'only' mixin
Keeps the code DRY in the same way 'between' uses 'up' and 'down'.
-rw-r--r--scss/mixins/_breakpoints.scss20
1 files changed, 9 insertions, 11 deletions
diff --git a/scss/mixins/_breakpoints.scss b/scss/mixins/_breakpoints.scss
index a868833b4..5abe25266 100644
--- a/scss/mixins/_breakpoints.scss
+++ b/scss/mixins/_breakpoints.scss
@@ -64,17 +64,6 @@
}
}
-// Media between the breakpoint's minimum and maximum widths.
-// 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) {
- @content;
- }
- }
-}
-
// Media that spans multiple breakpoint widths.
// Makes the @content apply between the min and max breakpoints
@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {
@@ -84,3 +73,12 @@
}
}
}
+
+// Media between the breakpoint's minimum and maximum widths.
+// 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-between($name, $name, $breakpoints) {
+ @content;
+ }
+}