Skip to content

Instantly share code, notes, and snippets.

@chasewoodford
Last active December 25, 2015 23:39
Show Gist options
  • Save chasewoodford/7058775 to your computer and use it in GitHub Desktop.
Save chasewoodford/7058775 to your computer and use it in GitHub Desktop.
Simple Sass @for loop to build grid classes at 5% width intervals. Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// ----
@for $i from 1 through 20 {
.grid-#{($i * 5)} {
width: ($i * 5%);
}
}
.grid-5 {
width: 5%;
}
.grid-10 {
width: 10%;
}
.grid-15 {
width: 15%;
}
.grid-20 {
width: 20%;
}
.grid-25 {
width: 25%;
}
.grid-30 {
width: 30%;
}
.grid-35 {
width: 35%;
}
.grid-40 {
width: 40%;
}
.grid-45 {
width: 45%;
}
.grid-50 {
width: 50%;
}
.grid-55 {
width: 55%;
}
.grid-60 {
width: 60%;
}
.grid-65 {
width: 65%;
}
.grid-70 {
width: 70%;
}
.grid-75 {
width: 75%;
}
.grid-80 {
width: 80%;
}
.grid-85 {
width: 85%;
}
.grid-90 {
width: 90%;
}
.grid-95 {
width: 95%;
}
.grid-100 {
width: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment