Skip to content

Instantly share code, notes, and snippets.

@Jared-Prime
Created April 26, 2012 17:28
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 Jared-Prime/2501154 to your computer and use it in GitHub Desktop.
Save Jared-Prime/2501154 to your computer and use it in GitHub Desktop.
sample of Sass responsive grid
@for $i from 1 through 4 {
.span#{$i} {
margin:0;
padding:0;
float:left;
@media (min-width:960px) {
width: percentage(1/$i);
}
@media (max-width:780px) and (max-width:959px) {
@if $i == 1 or $i == 4 {
width:100%;
}
@else {
width:50%;
}
}
@media (max-width:779px) {
width:100%;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment