Created
March 8, 2017 03:28
-
-
Save aprilandjan/43aa1dcfe173118f383142b73c8034ee to your computer and use it in GitHub Desktop.
simple flex grid system
This file contains 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
.row { | |
display: flex; | |
flex-wrap: nowrap; | |
flex-shrink: 0; | |
flex-grow: 0; | |
align-items: flex-start; | |
.col-auto { | |
flex: 1; | |
} | |
@for $i from 1 through 12 { | |
.col-#{$i} { | |
width: percentage($i / 12); | |
} | |
.col-offset-#{$i} { | |
margin-left: percentage($i / 12); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment