Skip to content

Instantly share code, notes, and snippets.

@mturjak
Created January 30, 2014 23:31
Show Gist options
  • Select an option

  • Save mturjak/8722420 to your computer and use it in GitHub Desktop.

Select an option

Save mturjak/8722420 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.2.14)
// Compass (v0.12.2)
// ----
$number-of-columns: 12;
%all-columns {
display: block;
}
@for $i from 1 through $number-of-columns {
.column-#{$i} {
width: ($i / $number-of-columns) * 100%;
@extend %all-columns;
}
}
.column-1, .column-2, .column-3, .column-4, .column-5, .column-6, .column-7, .column-8, .column-9, .column-10, .column-11, .column-12 {
display: block;
}
.column-1 {
width: 8.33333%;
}
.column-2 {
width: 16.66667%;
}
.column-3 {
width: 25%;
}
.column-4 {
width: 33.33333%;
}
.column-5 {
width: 41.66667%;
}
.column-6 {
width: 50%;
}
.column-7 {
width: 58.33333%;
}
.column-8 {
width: 66.66667%;
}
.column-9 {
width: 75%;
}
.column-10 {
width: 83.33333%;
}
.column-11 {
width: 91.66667%;
}
.column-12 {
width: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment