2016-10-31 18:04:15 +00:00
|
|
|
//- 💫 CSS > BASE > GRID
|
2016-03-31 14:24:48 +00:00
|
|
|
|
2016-10-03 18:19:13 +00:00
|
|
|
//- Grid container
|
2016-03-31 14:24:48 +00:00
|
|
|
|
2016-10-03 18:19:13 +00:00
|
|
|
.o-grid
|
2016-03-31 14:24:48 +00:00
|
|
|
display: flex
|
|
|
|
flex-wrap: wrap
|
|
|
|
|
2016-10-03 18:19:13 +00:00
|
|
|
@include breakpoint(min, sm)
|
|
|
|
flex-direction: row
|
|
|
|
align-items: stretch
|
2016-03-31 14:24:48 +00:00
|
|
|
justify-content: space-between
|
|
|
|
|
|
|
|
|
2016-10-03 18:19:13 +00:00
|
|
|
//- Grid column
|
2016-03-31 14:24:48 +00:00
|
|
|
|
2016-10-03 18:19:13 +00:00
|
|
|
.o-grid__col
|
|
|
|
$grid-gutter: 2rem
|
2016-03-31 14:24:48 +00:00
|
|
|
|
2016-10-03 18:19:13 +00:00
|
|
|
margin-top: $grid-gutter
|
2016-03-31 14:24:48 +00:00
|
|
|
overflow: hidden
|
|
|
|
|
2016-10-03 18:19:13 +00:00
|
|
|
@include breakpoint(min, sm)
|
2016-03-31 14:24:48 +00:00
|
|
|
display: flex
|
|
|
|
flex: 0 0 100%
|
|
|
|
flex-direction: column
|
2016-10-03 18:19:13 +00:00
|
|
|
flex-wrap: wrap
|
2016-03-31 14:24:48 +00:00
|
|
|
|
2016-10-03 18:19:13 +00:00
|
|
|
@each $mode, $count in $grid
|
|
|
|
&.o-grid__col--#{$mode}
|
|
|
|
$percentage: calc(#{100% / $count} - #{$grid-gutter})
|
|
|
|
flex: 0 0 $percentage
|
|
|
|
max-width: $percentage
|
2016-03-31 14:24:48 +00:00
|
|
|
|
2016-10-03 18:19:13 +00:00
|
|
|
@include breakpoint(max, xs)
|
2016-03-31 14:24:48 +00:00
|
|
|
flex: 0 0 100%
|
|
|
|
flex-flow: column wrap
|
2016-10-03 18:19:13 +00:00
|
|
|
|
|
|
|
// Fix overflow issue in old browsers
|
|
|
|
|
|
|
|
& > *
|
|
|
|
flex-shrink: 1
|
|
|
|
max-width: 100%
|