2017-07-31 10:52:40 +02:00
|
|
|
/* ----------------------------- */
|
|
|
|
/* ==Autogrid object */
|
|
|
|
/* ----------------------------- */
|
2017-07-31 11:37:12 +02:00
|
|
|
/* see https://codepen.io/raphaelgoetter/pen/zzwxEE */
|
2017-07-31 10:52:40 +02:00
|
|
|
|
2017-07-31 11:37:12 +02:00
|
|
|
.o-autogrid {
|
|
|
|
@media (min-width: $small) {
|
|
|
|
display: grid;
|
|
|
|
grid-auto-flow: column;
|
|
|
|
grid-auto-column: 1fr;
|
2016-12-08 14:24:27 +01:00
|
|
|
|
2017-07-31 11:37:12 +02:00
|
|
|
// gutters
|
|
|
|
@if variable_exists(grid-gutters) {
|
|
|
|
$gutter: $grid-gutters !global;
|
2016-09-21 10:26:28 +02:00
|
|
|
|
2017-07-31 11:37:12 +02:00
|
|
|
} @else {
|
|
|
|
$gutter: ( '': 1rem, '-l': 2rem, '-xl': 4rem ) !global;
|
|
|
|
}
|
|
|
|
@each $affix, $size in $gutter {
|
|
|
|
&.has-gutter#{$affix} {
|
|
|
|
grid-column-gap: $size;
|
|
|
|
}
|
|
|
|
}
|
2016-12-08 14:24:27 +01:00
|
|
|
|
2017-07-31 11:37:12 +02:00
|
|
|
& > * {
|
|
|
|
min-width: 0; /* avoid min-width: auto on children */
|
|
|
|
}
|
2016-09-21 10:26:28 +02:00
|
|
|
}
|
|
|
|
}
|