diff options
| author | Mark Otto <[email protected]> | 2016-10-27 22:17:48 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-10-27 22:17:48 -0700 |
| commit | 9d011a8a6f3d6eb87a908eeb4bb5d58b43a2376f (patch) | |
| tree | 4dc65a7d0966a9dfa63fddff5119067ca2631f68 | |
| parent | 96d8553becfdf219c40e046e1202d4f2a2723010 (diff) | |
| parent | d19e762d575245ad33ce2288a6bb4bc830b095d9 (diff) | |
| download | bootstrap-9d011a8a6f3d6eb87a908eeb4bb5d58b43a2376f.tar.xz bootstrap-9d011a8a6f3d6eb87a908eeb4bb5d58b43a2376f.zip | |
Merge pull request #20101 from heath3/patch-1
Re-use 'between' mixin for 'only' mixin
| -rw-r--r-- | scss/mixins/_breakpoints.scss | 20 |
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; + } +} |
