aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStarsam80 <[email protected]>2016-11-27 16:18:46 -0700
committerMark Otto <[email protected]>2016-11-27 15:18:46 -0800
commit94be2d2254a9cf807725d391347b24d5a290a41f (patch)
treef7b851c24910404bd281bac9463a195bf0471710
parentb1e8d60348ab84895b7b722487a03264a53aedfb (diff)
downloadbootstrap-94be2d2254a9cf807725d391347b24d5a290a41f.tar.xz
bootstrap-94be2d2254a9cf807725d391347b24d5a290a41f.zip
Remove redundant media queries (#21220)
-rw-r--r--scss/utilities/_display.scss16
-rw-r--r--scss/utilities/_float.scss8
-rw-r--r--scss/utilities/_spacing.scss26
3 files changed, 22 insertions, 28 deletions
diff --git a/scss/utilities/_display.scss b/scss/utilities/_display.scss
index a79dddbde..0e386cf6f 100644
--- a/scss/utilities/_display.scss
+++ b/scss/utilities/_display.scss
@@ -8,15 +8,13 @@
$min: breakpoint-min($breakpoint, $grid-breakpoints);
@if $min {
- @media (min-width: $min) {
- .d-#{$breakpoint}-none { display: none !important; }
- .d-#{$breakpoint}-inline { display: inline !important; }
- .d-#{$breakpoint}-inline-block { display: inline-block !important; }
- .d-#{$breakpoint}-block { display: block !important; }
- .d-#{$breakpoint}-table { display: table !important; }
- .d-#{$breakpoint}-table-cell { display: table-cell !important; }
- .d-#{$breakpoint}-flex { display: flex !important; }
- }
+ .d-#{$breakpoint}-none { display: none !important; }
+ .d-#{$breakpoint}-inline { display: inline !important; }
+ .d-#{$breakpoint}-inline-block { display: inline-block !important; }
+ .d-#{$breakpoint}-block { display: block !important; }
+ .d-#{$breakpoint}-table { display: table !important; }
+ .d-#{$breakpoint}-table-cell { display: table-cell !important; }
+ .d-#{$breakpoint}-flex { display: flex !important; }
} @else {
.d-none { display: none !important; }
.d-inline { display: inline !important; }
diff --git a/scss/utilities/_float.scss b/scss/utilities/_float.scss
index 99c2efdc0..6c8a5dba4 100644
--- a/scss/utilities/_float.scss
+++ b/scss/utilities/_float.scss
@@ -4,11 +4,9 @@
@if $min {
// everything else
- @media (min-width: $min) {
- .float-#{$breakpoint}-left { @include float-left; }
- .float-#{$breakpoint}-right { @include float-right; }
- .float-#{$breakpoint}-none { @include float-none; }
- }
+ .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; }
diff --git a/scss/utilities/_spacing.scss b/scss/utilities/_spacing.scss
index 9c13b6022..e7248badb 100644
--- a/scss/utilities/_spacing.scss
+++ b/scss/utilities/_spacing.scss
@@ -21,20 +21,18 @@
@if $min {
// everything else
- @media (min-width: $min) {
- .#{$abbrev}-#{$breakpoint}-#{$size} { #{$prop}: $length-y $length-x !important; } // a = All sides
- .#{$abbrev}t-#{$breakpoint}-#{$size} { #{$prop}-top: $length-y !important; }
- .#{$abbrev}r-#{$breakpoint}-#{$size} { #{$prop}-right: $length-x !important; }
- .#{$abbrev}b-#{$breakpoint}-#{$size} { #{$prop}-bottom: $length-y !important; }
- .#{$abbrev}l-#{$breakpoint}-#{$size} { #{$prop}-left: $length-x !important; }
- .#{$abbrev}x-#{$breakpoint}-#{$size} {
- #{$prop}-right: $length-x !important;
- #{$prop}-left: $length-x !important;
- }
- .#{$abbrev}y-#{$breakpoint}-#{$size} {
- #{$prop}-top: $length-y !important;
- #{$prop}-bottom: $length-y !important;
- }
+ .#{$abbrev}-#{$breakpoint}-#{$size} { #{$prop}: $length-y $length-x !important; } // a = All sides
+ .#{$abbrev}t-#{$breakpoint}-#{$size} { #{$prop}-top: $length-y !important; }
+ .#{$abbrev}r-#{$breakpoint}-#{$size} { #{$prop}-right: $length-x !important; }
+ .#{$abbrev}b-#{$breakpoint}-#{$size} { #{$prop}-bottom: $length-y !important; }
+ .#{$abbrev}l-#{$breakpoint}-#{$size} { #{$prop}-left: $length-x !important; }
+ .#{$abbrev}x-#{$breakpoint}-#{$size} {
+ #{$prop}-right: $length-x !important;
+ #{$prop}-left: $length-x !important;
+ }
+ .#{$abbrev}y-#{$breakpoint}-#{$size} {
+ #{$prop}-top: $length-y !important;
+ #{$prop}-bottom: $length-y !important;
}
} @else {
// xs