Skip to content

Instantly share code, notes, and snippets.

@BenjaminRCooper
Created April 7, 2014 08:18
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 BenjaminRCooper/10016557 to your computer and use it in GitHub Desktop.
Save BenjaminRCooper/10016557 to your computer and use it in GitHub Desktop.
Removed Singular and Halfs, as well as Quarters.
$cols: 12;
$max-width: 960;
$viewport-namespace: "desk";
$gutter-width: 20;
@while $cols > 2 {
@for $i from 1 through $cols {
@if $cols != 4 {
.#{$viewport-namespace}-#{$i}-#{$cols} {
$col-width: ($max-width / $cols * $i - $gutter-width);
width: (percentage($col-width / $max-width));
}
}
}
$cols: $cols - 1;
}
.desk-1-12 {
width: 6.25%;
}
.desk-2-12 {
width: 14.58333%;
}
.desk-3-12 {
width: 22.91667%;
}
.desk-4-12 {
width: 31.25%;
}
.desk-5-12 {
width: 39.58333%;
}
.desk-6-12 {
width: 47.91667%;
}
.desk-7-12 {
width: 56.25%;
}
.desk-8-12 {
width: 64.58333%;
}
.desk-9-12 {
width: 72.91667%;
}
.desk-10-12 {
width: 81.25%;
}
.desk-11-12 {
width: 89.58333%;
}
.desk-12-12 {
width: 97.91667%;
}
.desk-1-11 {
width: 7.00758%;
}
.desk-2-11 {
width: 16.09848%;
}
.desk-3-11 {
width: 25.18939%;
}
.desk-4-11 {
width: 34.2803%;
}
.desk-5-11 {
width: 43.37121%;
}
.desk-6-11 {
width: 52.46212%;
}
.desk-7-11 {
width: 61.55303%;
}
.desk-8-11 {
width: 70.64394%;
}
.desk-9-11 {
width: 79.73485%;
}
.desk-10-11 {
width: 88.82576%;
}
.desk-11-11 {
width: 97.91667%;
}
.desk-1-10 {
width: 7.91667%;
}
.desk-2-10 {
width: 17.91667%;
}
.desk-3-10 {
width: 27.91667%;
}
.desk-4-10 {
width: 37.91667%;
}
.desk-5-10 {
width: 47.91667%;
}
.desk-6-10 {
width: 57.91667%;
}
.desk-7-10 {
width: 67.91667%;
}
.desk-8-10 {
width: 77.91667%;
}
.desk-9-10 {
width: 87.91667%;
}
.desk-10-10 {
width: 97.91667%;
}
.desk-1-9 {
width: 9.02778%;
}
.desk-2-9 {
width: 20.13889%;
}
.desk-3-9 {
width: 31.25%;
}
.desk-4-9 {
width: 42.36111%;
}
.desk-5-9 {
width: 53.47222%;
}
.desk-6-9 {
width: 64.58333%;
}
.desk-7-9 {
width: 75.69444%;
}
.desk-8-9 {
width: 86.80556%;
}
.desk-9-9 {
width: 97.91667%;
}
.desk-1-8 {
width: 10.41667%;
}
.desk-2-8 {
width: 22.91667%;
}
.desk-3-8 {
width: 35.41667%;
}
.desk-4-8 {
width: 47.91667%;
}
.desk-5-8 {
width: 60.41667%;
}
.desk-6-8 {
width: 72.91667%;
}
.desk-7-8 {
width: 85.41667%;
}
.desk-8-8 {
width: 97.91667%;
}
.desk-1-7 {
width: 12.20238%;
}
.desk-2-7 {
width: 26.4881%;
}
.desk-3-7 {
width: 40.77381%;
}
.desk-4-7 {
width: 55.05952%;
}
.desk-5-7 {
width: 69.34524%;
}
.desk-6-7 {
width: 83.63095%;
}
.desk-7-7 {
width: 97.91667%;
}
.desk-1-6 {
width: 14.58333%;
}
.desk-2-6 {
width: 31.25%;
}
.desk-3-6 {
width: 47.91667%;
}
.desk-4-6 {
width: 64.58333%;
}
.desk-5-6 {
width: 81.25%;
}
.desk-6-6 {
width: 97.91667%;
}
.desk-1-5 {
width: 17.91667%;
}
.desk-2-5 {
width: 37.91667%;
}
.desk-3-5 {
width: 57.91667%;
}
.desk-4-5 {
width: 77.91667%;
}
.desk-5-5 {
width: 97.91667%;
}
.desk-1-3 {
width: 31.25%;
}
.desk-2-3 {
width: 64.58333%;
}
.desk-3-3 {
width: 97.91667%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment