2016-01-06 16:01:00 -08:00
|
|
|
// Flex variation
|
|
|
|
//
|
|
|
|
// Custom styles for additional flex alignment options.
|
|
|
|
|
2016-12-21 20:26:17 -08:00
|
|
|
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
|
|
@include media-breakpoint-up($breakpoint) {
|
|
|
|
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
2016-11-28 14:23:59 -07:00
|
|
|
|
2016-12-21 20:26:17 -08:00
|
|
|
// Flex column reordering
|
|
|
|
.flex#{$infix}-first { order: -1; }
|
|
|
|
.flex#{$infix}-last { order: 1; }
|
|
|
|
.flex#{$infix}-unordered { order: 0; }
|
2016-11-28 14:23:59 -07:00
|
|
|
|
2016-12-21 20:26:17 -08:00
|
|
|
// Alignment for every item
|
|
|
|
.flex-items#{$infix}-top { align-items: flex-start; }
|
|
|
|
.flex-items#{$infix}-middle { align-items: center; }
|
|
|
|
.flex-items#{$infix}-bottom { align-items: flex-end; }
|
2016-11-28 14:23:59 -07:00
|
|
|
|
2016-12-21 20:26:17 -08:00
|
|
|
// Alignment per item
|
|
|
|
.flex#{$infix}-top { align-self: flex-start; }
|
|
|
|
.flex#{$infix}-middle { align-self: center; }
|
|
|
|
.flex#{$infix}-bottom { align-self: flex-end; }
|
2016-11-28 14:23:59 -07:00
|
|
|
|
2016-12-21 20:26:17 -08:00
|
|
|
// Horizontal alignment of item
|
|
|
|
.flex-items#{$infix}-left { justify-content: flex-start; }
|
|
|
|
.flex-items#{$infix}-center { justify-content: center; }
|
|
|
|
.flex-items#{$infix}-right { justify-content: flex-end; }
|
|
|
|
.flex-items#{$infix}-around { justify-content: space-around; }
|
|
|
|
.flex-items#{$infix}-between { justify-content: space-between; }
|
2016-12-23 11:48:03 -08:00
|
|
|
|
|
|
|
//
|
|
|
|
// New flex utils to replace and extend the ones above
|
|
|
|
//
|
|
|
|
|
|
|
|
.flex#{$infix}-fill { flex: 1 1 auto; }
|
|
|
|
.flex#{$infix}-justify { flex: 1 1 100%; }
|
|
|
|
|
|
|
|
.flex#{$infix}-row { flex-direction: row !important; }
|
|
|
|
.flex#{$infix}-column { flex-direction: column !important; }
|
|
|
|
|
|
|
|
.flex#{$infix}-wrap { flex-wrap: wrap !important; }
|
|
|
|
.flex#{$infix}-nowrap { flex-wrap: nowrap !important; }
|
|
|
|
|
|
|
|
.justify-content#{$infix}-start { justify-content: flex-start !important; }
|
|
|
|
.justify-content#{$infix}-end { justify-content: flex-end !important; }
|
|
|
|
.justify-content#{$infix}-center { justify-content: center !important; }
|
|
|
|
.justify-content#{$infix}-between { justify-content: space-between !important; }
|
|
|
|
.justify-content#{$infix}-around { justify-content: space-around !important; }
|
|
|
|
|
|
|
|
.align-items#{$infix}-start { align-items: flex-start !important; }
|
|
|
|
.align-items#{$infix}-end { align-items: flex-end !important; }
|
|
|
|
.align-items#{$infix}-center { align-items: center !important; }
|
|
|
|
.align-items#{$infix}-baseline { align-items: baseline !important; }
|
|
|
|
.align-items#{$infix}-stretch { align-items: stretch !important; }
|
|
|
|
|
|
|
|
.align-content#{$infix}-start { align-content: flex-start !important; }
|
|
|
|
.align-content#{$infix}-end { align-content: flex-end !important; }
|
|
|
|
.align-content#{$infix}-center { align-content: center !important; }
|
|
|
|
.align-content#{$infix}-between { align-content: space-between !important; }
|
|
|
|
.align-content#{$infix}-around { align-content: space-around !important; }
|
|
|
|
.align-content#{$infix}-stretch { align-content: stretch !important; }
|
|
|
|
|
|
|
|
.align-self#{$infix}-auto { align-self: auto !important; }
|
|
|
|
.align-self#{$infix}-start { align-self: flex-start !important; }
|
|
|
|
.align-self#{$infix}-end { align-self: flex-end !important; }
|
|
|
|
.align-self#{$infix}-center { align-self: center !important; }
|
|
|
|
.align-self#{$infix}-baseline { align-self: baseline !important; }
|
|
|
|
.align-self#{$infix}-stretch { align-self: stretch !important; }
|
2016-01-06 16:01:00 -08:00
|
|
|
}
|
|
|
|
}
|