Add $cols to grid system

This commit is contained in:
ml-uni 2018-09-24 09:14:03 +02:00 committed by GitHub
parent 60dfa8a772
commit 98d49f1f58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -57,14 +57,14 @@ $medium: 768px !default;
} }
// grid constructor (.grid-2 to .grid-12) // grid constructor (.grid-2 to .grid-12)
@for $i from 2 through 12 { @for $i from 2 through $cols {
[class*="grid-#{$i}"] { [class*="grid-#{$i}"] {
grid-template-columns: repeat(#{$i}, 1fr); grid-template-columns: repeat(#{$i}, 1fr);
} }
} }
// grid items constructor (.col-1 to .col-12, .row-1 to .row-12) // grid items constructor (.col-1 to .col-$cols, .row-1 to .row-$cols)
@for $i from 1 through 12 { @for $i from 1 through $cols {
[class*="col-#{$i}"] { [class*="col-#{$i}"] {
grid-column: auto / span #{$i}; grid-column: auto / span #{$i};
} }