From 94be2d2254a9cf807725d391347b24d5a290a41f Mon Sep 17 00:00:00 2001 From: Starsam80 Date: Sun, 27 Nov 2016 16:18:46 -0700 Subject: [PATCH] Remove redundant media queries (#21220) --- scss/utilities/_display.scss | 16 +++++++--------- scss/utilities/_float.scss | 8 +++----- scss/utilities/_spacing.scss | 26 ++++++++++++-------------- 3 files changed, 22 insertions(+), 28 deletions(-) diff --git a/scss/utilities/_display.scss b/scss/utilities/_display.scss index a79dddbde1..0e386cf6fb 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 99c2efdc03..6c8a5dba4b 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 9c13b6022f..e7248badb6 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