2016-01-07 01:01:00 +01:00
|
|
|
// Flex variation
|
|
|
|
//
|
|
|
|
// Custom styles for additional flex alignment options.
|
|
|
|
|
2016-02-08 13:25:45 +01:00
|
|
|
@if $enable-flex {
|
2016-02-06 10:29:51 +01:00
|
|
|
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
|
|
// Flex column reordering
|
|
|
|
@include media-breakpoint-up($breakpoint) {
|
|
|
|
.flex-#{$breakpoint}-first { order: -1; }
|
2016-02-06 21:32:43 +01:00
|
|
|
.flex-#{$breakpoint}-last { order: 1; }
|
2016-02-06 10:29:51 +01:00
|
|
|
}
|
2016-01-07 01:01:00 +01:00
|
|
|
|
2016-02-06 10:46:14 +01:00
|
|
|
// Alignment for every item
|
2016-02-06 10:29:51 +01:00
|
|
|
@include media-breakpoint-up($breakpoint) {
|
2016-02-06 21:32:43 +01:00
|
|
|
.flex-items-#{$breakpoint}-top { align-items: flex-start; }
|
2016-02-06 10:46:42 +01:00
|
|
|
.flex-items-#{$breakpoint}-middle { align-items: center; }
|
2016-02-06 10:29:51 +01:00
|
|
|
.flex-items-#{$breakpoint}-bottom { align-items: flex-end; }
|
|
|
|
}
|
2016-01-07 01:01:00 +01:00
|
|
|
|
2016-02-06 10:46:14 +01:00
|
|
|
// Alignment per item
|
2016-02-06 10:29:51 +01:00
|
|
|
@include media-breakpoint-up($breakpoint) {
|
2016-02-06 21:32:43 +01:00
|
|
|
.flex-#{$breakpoint}-top { align-self: flex-start; }
|
2016-02-06 10:46:42 +01:00
|
|
|
.flex-#{$breakpoint}-middle { align-self: center; }
|
2016-02-06 10:29:51 +01:00
|
|
|
.flex-#{$breakpoint}-bottom { align-self: flex-end; }
|
|
|
|
}
|
2016-02-06 10:47:04 +01:00
|
|
|
|
|
|
|
// Horizontal alignment of item
|
|
|
|
@include media-breakpoint-up($breakpoint) {
|
2016-02-06 21:32:43 +01:00
|
|
|
.flex-items-#{$breakpoint}-left { justify-content: flex-start; }
|
|
|
|
.flex-items-#{$breakpoint}-center { justify-content: center; }
|
|
|
|
.flex-items-#{$breakpoint}-right { justify-content: flex-end; }
|
|
|
|
.flex-items-#{$breakpoint}-around { justify-content: space-around; }
|
2016-02-06 10:47:04 +01:00
|
|
|
.flex-items-#{$breakpoint}-between { justify-content: space-between; }
|
|
|
|
}
|
2016-01-07 01:01:00 +01:00
|
|
|
}
|
|
|
|
}
|