spaCy/website/assets/css/_base/_grid.sass

44 lines
874 B
Sass
Raw Normal View History

2016-10-31 21:04:15 +03:00
//- 💫 CSS > BASE > GRID
2016-03-31 17:24:48 +03:00
2016-10-03 21:19:13 +03:00
//- Grid container
2016-03-31 17:24:48 +03:00
2016-10-03 21:19:13 +03:00
.o-grid
2016-03-31 17:24:48 +03:00
display: flex
flex-wrap: wrap
2016-10-03 21:19:13 +03:00
@include breakpoint(min, sm)
flex-direction: row
align-items: stretch
2016-03-31 17:24:48 +03:00
justify-content: space-between
2016-10-03 21:19:13 +03:00
//- Grid column
2016-03-31 17:24:48 +03:00
2016-10-03 21:19:13 +03:00
.o-grid__col
$grid-gutter: 2rem
2016-03-31 17:24:48 +03:00
2016-10-03 21:19:13 +03:00
margin-top: $grid-gutter
2016-03-31 17:24:48 +03:00
overflow: hidden
2016-11-01 02:16:21 +03:00
@include breakpoint(min, lg)
2016-03-31 17:24:48 +03:00
display: flex
flex: 0 0 100%
flex-direction: column
2016-10-03 21:19:13 +03:00
flex-wrap: wrap
2016-03-31 17:24:48 +03:00
2016-10-03 21:19:13 +03: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 17:24:48 +03:00
2016-11-01 02:16:21 +03:00
@include breakpoint(max, md)
2016-03-31 17:24:48 +03:00
flex: 0 0 100%
flex-flow: column wrap
2016-10-03 21:19:13 +03:00
// Fix overflow issue in old browsers
& > *
flex-shrink: 1
max-width: 100%