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

46 lines
946 B
Sass
Raw Normal View History

2016-10-03 21:19:13 +03:00
//- ----------------------------------
//- 💫 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-10-03 21:19:13 +03:00
@include breakpoint(min, sm)
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-10-03 21:19:13 +03:00
@include breakpoint(max, xs)
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%