mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-28 20:52:21 +01:00
Stop hardcoding grid tiers in flexbox alignment & ordering classes; fixes #18026
[skip sauce] [skip validator]
This commit is contained in:
parent
a19bcaef96
commit
f730162072
@ -47,78 +47,31 @@
|
|||||||
|
|
||||||
// Flex column reordering
|
// Flex column reordering
|
||||||
|
|
||||||
.col-xs-first { order: -1; }
|
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||||
.col-xs-last { order: 1; }
|
@include media-breakpoint-up($breakpoint) {
|
||||||
|
.col-#{$breakpoint}-first { order: -1; }
|
||||||
@include media-breakpoint-up(sm) {
|
.col-#{$breakpoint}-last { order: 1; }
|
||||||
.col-sm-first { order: -1; }
|
}
|
||||||
.col-sm-last { order: 1; }
|
|
||||||
}
|
|
||||||
@include media-breakpoint-up(md) {
|
|
||||||
.col-md-first { order: -1; }
|
|
||||||
.col-md-last { order: 1; }
|
|
||||||
}
|
|
||||||
@include media-breakpoint-up(lg) {
|
|
||||||
.col-lg-first { order: -1; }
|
|
||||||
.col-lg-last { order: 1; }
|
|
||||||
}
|
|
||||||
@include media-breakpoint-up(xl) {
|
|
||||||
.col-xl-first { order: -1; }
|
|
||||||
.col-xl-last { order: 1; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Alignment for every column in row
|
// Alignment for every column in row
|
||||||
|
|
||||||
.row-xs-top { align-items: flex-start; }
|
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||||
.row-xs-center { align-items: center; }
|
@include media-breakpoint-up($breakpoint) {
|
||||||
.row-xs-bottom { align-items: flex-end; }
|
.row-#{$breakpoint}-top { align-items: flex-start; }
|
||||||
|
.row-#{$breakpoint}-center { align-items: center; }
|
||||||
@include media-breakpoint-up(sm) {
|
.row-#{$breakpoint}-bottom { align-items: flex-end; }
|
||||||
.row-sm-top { align-items: flex-start; }
|
}
|
||||||
.row-sm-center { align-items: center; }
|
|
||||||
.row-sm-bottom { align-items: flex-end; }
|
|
||||||
}
|
|
||||||
@include media-breakpoint-up(md) {
|
|
||||||
.row-md-top { align-items: flex-start; }
|
|
||||||
.row-md-center { align-items: center; }
|
|
||||||
.row-md-bottom { align-items: flex-end; }
|
|
||||||
}
|
|
||||||
@include media-breakpoint-up(lg) {
|
|
||||||
.row-lg-top { align-items: flex-start; }
|
|
||||||
.row-lg-center { align-items: center; }
|
|
||||||
.row-lg-bottom { align-items: flex-end; }
|
|
||||||
}
|
|
||||||
@include media-breakpoint-up(xl) {
|
|
||||||
.row-xl-top { align-items: flex-start; }
|
|
||||||
.row-xl-center { align-items: center; }
|
|
||||||
.row-xl-bottom { align-items: flex-end; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Alignment per column
|
// Alignment per column
|
||||||
|
|
||||||
.col-xs-top { align-self: flex-start; }
|
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||||
.col-xs-center { align-self: center; }
|
@include media-breakpoint-up($breakpoint) {
|
||||||
.col-xs-bottom { align-self: flex-end; }
|
.col-#{$breakpoint}-top { align-self: flex-start; }
|
||||||
|
.col-#{$breakpoint}-center { align-self: center; }
|
||||||
@include media-breakpoint-up(sm) {
|
.col-#{$breakpoint}-bottom { align-self: flex-end; }
|
||||||
.col-sm-top { align-self: flex-start; }
|
}
|
||||||
.col-sm-center { align-self: center; }
|
|
||||||
.col-sm-bottom { align-self: flex-end; }
|
|
||||||
}
|
|
||||||
@include media-breakpoint-up(md) {
|
|
||||||
.col-md-top { align-self: flex-start; }
|
|
||||||
.col-md-center { align-self: center; }
|
|
||||||
.col-md-bottom { align-self: flex-end; }
|
|
||||||
}
|
|
||||||
@include media-breakpoint-up(lg) {
|
|
||||||
.col-lg-top { align-self: flex-start; }
|
|
||||||
.col-lg-center { align-self: center; }
|
|
||||||
.col-lg-bottom { align-self: flex-end; }
|
|
||||||
}
|
|
||||||
@include media-breakpoint-up(xl) {
|
|
||||||
.col-xl-top { align-self: flex-start; }
|
|
||||||
.col-xl-center { align-self: center; }
|
|
||||||
.col-xl-bottom { align-self: flex-end; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user