barebones/assets/styles/base/_grid.scss

20 lines
520 B
SCSS
Raw Normal View History

2019-10-01 13:17:53 +02:00
.grid {
display: grid;
grid-gap: $base-spacing-unit;
@include resp-max($breakpoint-sm) {
grid-gap: $base-spacing-unit / 2;
}
@each $breakpoint in $breakpoints {
$name: nth($breakpoint, 1);
$declaration: nth($breakpoint, 2);
@media only screen and #{$declaration} {
@for $i from 1 through 6 {
&.grid--#{$name}-#{$i}x {
grid-template-columns: repeat(#{$i}, 1fr);
}
}
}
}
}