diff options
| author | Starsam80 <[email protected]> | 2016-11-28 14:23:59 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2016-11-28 13:23:59 -0800 |
| commit | b226766b62bf91c54dba5e586e557c39a03bdda6 (patch) | |
| tree | 3888b37c71c80227daf16d3a69354d6975fb4ccb /scss/utilities/_float.scss | |
| parent | 2f9a94caac58a68a12c17818da0d1e2c2402368e (diff) | |
| download | bootstrap-b226766b62bf91c54dba5e586e557c39a03bdda6.tar.xz bootstrap-b226766b62bf91c54dba5e586e557c39a03bdda6.zip | |
Remove lots of duplication + minor cleanup (#21238)
* Remove comment that duplicated some code
* Use transition mixin whenever possible
* Create a new function to reduce duplication
* Use the new `breakpoint-infix` method
Diffstat (limited to 'scss/utilities/_float.scss')
| -rw-r--r-- | scss/utilities/_float.scss | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/scss/utilities/_float.scss b/scss/utilities/_float.scss index 5f8c2d587..01655e9a5 100644 --- a/scss/utilities/_float.scss +++ b/scss/utilities/_float.scss @@ -1,17 +1,9 @@ @each $breakpoint in map-keys($grid-breakpoints) { @include media-breakpoint-up($breakpoint) { - $min: breakpoint-min($breakpoint, $grid-breakpoints); + $infix: breakpoint-infix($breakpoint, $grid-breakpoints); - @if $min { - // everything else - .float-#{$breakpoint}-left { @include float-left; } - .float-#{$breakpoint}-right { @include float-right; } - .float-#{$breakpoint}-none { @include float-none; } - } @else { - // xs - .float-left { @include float-left; } - .float-right { @include float-right; } - .float-none { @include float-none; } - } + .float#{$infix}-left { @include float-left; } + .float#{$infix}-right { @include float-right; } + .float#{$infix}-none { @include float-none; } } } |
