mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-28 20:52:21 +01:00
Move grid flex classes to utils instead maybe?
This commit is contained in:
parent
cac92017d3
commit
f50dedaaaf
@ -50,40 +50,3 @@
|
|||||||
|
|
||||||
@include make-grid-columns();
|
@include make-grid-columns();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Flex variation
|
|
||||||
//
|
|
||||||
// Custom styles for additional flex alignment options.
|
|
||||||
|
|
||||||
@if $enable-flex and $enable-grid-classes {
|
|
||||||
|
|
||||||
// Flex column reordering
|
|
||||||
|
|
||||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
||||||
@include media-breakpoint-up($breakpoint) {
|
|
||||||
.col-#{$breakpoint}-first { order: -1; }
|
|
||||||
.col-#{$breakpoint}-last { order: 1; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Alignment for every column in row
|
|
||||||
|
|
||||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
||||||
@include media-breakpoint-up($breakpoint) {
|
|
||||||
.row-#{$breakpoint}-top { align-items: flex-start; }
|
|
||||||
.row-#{$breakpoint}-center { align-items: center; }
|
|
||||||
.row-#{$breakpoint}-bottom { align-items: flex-end; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Alignment per column
|
|
||||||
|
|
||||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
||||||
@include media-breakpoint-up($breakpoint) {
|
|
||||||
.col-#{$breakpoint}-top { align-self: flex-start; }
|
|
||||||
.col-#{$breakpoint}-center { align-self: center; }
|
|
||||||
.col-#{$breakpoint}-bottom { align-self: flex-end; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
35
scss/utilities/_flex.scss
Normal file
35
scss/utilities/_flex.scss
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// Flex variation
|
||||||
|
//
|
||||||
|
// Custom styles for additional flex alignment options.
|
||||||
|
|
||||||
|
@if $enable-flex and $enable-grid-classes {
|
||||||
|
|
||||||
|
// 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user