mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-31 00:59:51 +02:00
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
This commit is contained in:
@@ -12,17 +12,11 @@
|
||||
|
||||
@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 {
|
||||
.text-#{$breakpoint}-left { text-align: left !important; }
|
||||
.text-#{$breakpoint}-right { text-align: right !important; }
|
||||
.text-#{$breakpoint}-center { text-align: center !important; }
|
||||
} @else {
|
||||
.text-left { text-align: left !important; }
|
||||
.text-right { text-align: right !important; }
|
||||
.text-center { text-align: center !important; }
|
||||
}
|
||||
.text#{$infix}-left { text-align: left !important; }
|
||||
.text#{$infix}-right { text-align: right !important; }
|
||||
.text#{$infix}-center { text-align: center !important; }
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user