Skip to content

Instantly share code, notes, and snippets.

@RB-Lab
Created February 10, 2015 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RB-Lab/655acea5b4ecc85034f8 to your computer and use it in GitHub Desktop.
Save RB-Lab/655acea5b4ecc85034f8 to your computer and use it in GitHub Desktop.
Very simple 12-column grid system in scss
$small: 320px;
*[class^="col-"]{
float: left;
box-sizing: border-box;
@media only screen and (max-width: $small) {
&.not-for-small{
width: 100%;
float: none
}
}
}
@for $i from 1 through 12 {
.col-#{$i}{
width: $i * 100% / 12;
}
}
@for $i from 1 through 12 {
.skip-#{$i}{
margin-left: $i * 100% / 12;
}
}
.row:after{
content: " ";
display: block;
clear: both
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment