Created
July 11, 2017 21:59
-
-
Save paulfarino/4a39811dd4d92df51bf84cb22ccead23 to your computer and use it in GitHub Desktop.
CSS Grid Loop π
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$gtc: grid-template-columns; | |
$gtr: grid-template-rows; | |
$gcs: grid-column-start; | |
$gce: grid-column-end; | |
$grs: grid-row-start; | |
$gre: grid-row-end; | |
$gridOptions: ( | |
("gtc", $gtc), | |
("gtr", $gtr), | |
("gcs", $gcs), | |
("gce", $gce), | |
("grs", $grs), | |
("gre", $gre) | |
); | |
@each $gridOptions, $gridValue in $gridOptions { | |
@for $number from 1 through 12 { | |
.#{$gridOptions}-#{$number}{ | |
#{$gridValue}: $number; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment