mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
Conditionally include the flex utils in the import stack and reduce to a single query
This commit is contained in:
parent
f50dedaaaf
commit
044716ed4a
@ -6,3 +6,7 @@
|
||||
@import "utilities/spacing";
|
||||
@import "utilities/text";
|
||||
@import "utilities/visibility";
|
||||
|
||||
@if $enable-flex and $enable-grid-classes {
|
||||
@import "utilities/flex";
|
||||
}
|
||||
|
@ -2,34 +2,24 @@
|
||||
//
|
||||
// Custom styles for additional flex alignment options.
|
||||
|
||||
@if $enable-flex and $enable-grid-classes {
|
||||
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
// Flex column reordering
|
||||
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
.flex-#{$breakpoint}-first { order: -1; }
|
||||
.flex-#{$breakpoint}-last { order: 1; }
|
||||
}
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
.flex-#{$breakpoint}-first { order: -1; }
|
||||
.flex-#{$breakpoint}-last { order: 1; }
|
||||
}
|
||||
|
||||
// Alignment for every column in row
|
||||
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
.flex-all-#{$breakpoint}-top { align-items: flex-start; }
|
||||
.flex-all-#{$breakpoint}-center { align-items: center; }
|
||||
.flex-all-#{$breakpoint}-bottom { align-items: flex-end; }
|
||||
}
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
.flex-all-#{$breakpoint}-top { align-items: flex-start; }
|
||||
.flex-all-#{$breakpoint}-center { align-items: center; }
|
||||
.flex-all-#{$breakpoint}-bottom { align-items: flex-end; }
|
||||
}
|
||||
|
||||
// Alignment per column
|
||||
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
.flex-#{$breakpoint}-top { align-self: flex-start; }
|
||||
.flex-#{$breakpoint}-center { align-self: center; }
|
||||
.flex-#{$breakpoint}-bottom { align-self: flex-end; }
|
||||
}
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
.flex-#{$breakpoint}-top { align-self: flex-start; }
|
||||
.flex-#{$breakpoint}-center { align-self: center; }
|
||||
.flex-#{$breakpoint}-bottom { align-self: flex-end; }
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user