KNACSS/sass/components/autogrid.scss
2017-08-01 11:57:50 +02:00

25 lines
579 B
SCSS

/* ----------------------------- */
/* ==Autogrid object */
/* ----------------------------- */
/* see https://codepen.io/raphaelgoetter/pen/zzwxEE */
.o-autogrid {
@media (min-width: $small) {
display: grid;
grid-auto-flow: column;
grid-auto-column: 1fr;
// gutters
@if variable_exists(grid-gutters) {
$gutter: $grid-gutters !global;
} @else {
$gutter: ( '': 1rem, '-l': 2rem, '-xl': 4rem ) !global;
}
@each $affix, $size in $gutter {
&.has-gutter#{$affix} {
grid-column-gap: $size;
}
}
}
}