Skip to content

Instantly share code, notes, and snippets.

@samusgray
Created February 19, 2014 01:38
Show Gist options
  • Save samusgray/9084543 to your computer and use it in GitHub Desktop.
Save samusgray/9084543 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.4)
// Compass (v1.0.0.alpha.18)
// ----
$total-columns: 24;
$column-width: 4em;
$gutter-width: 1em;
@function columns-width(
$columns : $total-columns // 12
) {
@return ($columns * $column-width) // 48
+ (if($columns >= 1, ceil($columns - 1), 0) * $gutter-width);
}
.this {
this: $total-columns * $column-width;
plus: if($total-columns >= 1, ceil($total-columns - 1), 0);
}
.this {
this: 96em;
plus: 23;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment