From d3cb2ca43cbf65f48dd433a4dfb1ebf0abf4fd34 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Fri, 23 Oct 2015 11:49:45 -0700 Subject: [PATCH] Stop hardcoding grid breakpoints in responsive alignment utility classes; fixes #18027 [skip sauce] [skip validator] --- scss/_utilities.scss | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/scss/_utilities.scss b/scss/_utilities.scss index 12e29626e7..d5bd4dfe04 100644 --- a/scss/_utilities.scss +++ b/scss/_utilities.scss @@ -60,32 +60,12 @@ // Responsive alignment -.text-xs-left { text-align: left; } -.text-xs-right { text-align: right; } -.text-xs-center { text-align: center; } - -@include media-breakpoint-up(sm) { - .text-sm-left { text-align: left; } - .text-sm-right { text-align: right; } - .text-sm-center { text-align: center; } -} - -@include media-breakpoint-up(md) { - .text-md-left { text-align: left; } - .text-md-right { text-align: right; } - .text-md-center { text-align: center; } -} - -@include media-breakpoint-up(lg) { - .text-lg-left { text-align: left; } - .text-lg-right { text-align: right; } - .text-lg-center { text-align: center; } -} - -@include media-breakpoint-up(xl) { - .text-xl-left { text-align: left; } - .text-xl-right { text-align: right; } - .text-xl-center { text-align: center; } +@each $breakpoint in map-keys($grid-breakpoints) { + @include media-breakpoint-up($breakpoint) { + .text-#{$breakpoint}-left { text-align: left; } + .text-#{$breakpoint}-right { text-align: right; } + .text-#{$breakpoint}-center { text-align: center; } + } } // Transformation