Skip to content

Commit

Permalink
Merge pull request twbs#20101 from heath3/patch-1
Browse files Browse the repository at this point in the history
Re-use 'between' mixin for 'only' mixin
  • Loading branch information
mdo committed Oct 28, 2016
2 parents 96d8553 + d19e762 commit 9d011a8
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions scss/mixins/_breakpoints.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
}
}

0 comments on commit 9d011a8

Please sign in to comment.