2017-07-31 10:52:40 +02:00
|
|
|
/* ----------------------------- */
|
|
|
|
/* ==Autogrid object */
|
|
|
|
/* ----------------------------- */
|
2017-08-29 15:53:26 +02:00
|
|
|
/* recommanded HTML : <div class="autogrid">... some elements ...</div> */
|
2017-07-31 11:37:12 +02:00
|
|
|
/* see https://codepen.io/raphaelgoetter/pen/zzwxEE */
|
2017-07-31 10:52:40 +02:00
|
|
|
|
2017-12-04 15:48:16 +01:00
|
|
|
.autogrid,
|
|
|
|
.grid {
|
2017-08-01 21:02:01 +02:00
|
|
|
@media (min-width: $tiny) {
|
2017-07-31 11:37:12 +02:00
|
|
|
display: grid;
|
|
|
|
grid-auto-flow: column;
|
2017-12-27 00:57:18 +01:00
|
|
|
grid-auto-columns: 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-09-21 10:26:28 +02:00
|
|
|
}
|
|
|
|
}
|