Skip to content

Instantly share code, notes, and snippets.

@aprilandjan
Created March 8, 2017 03:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aprilandjan/43aa1dcfe173118f383142b73c8034ee to your computer and use it in GitHub Desktop.
Save aprilandjan/43aa1dcfe173118f383142b73c8034ee to your computer and use it in GitHub Desktop.
simple flex grid system
.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