Skip to content

Instantly share code, notes, and snippets.

@lozandier
Created November 14, 2015 20:32
Show Gist options
  • Save lozandier/34c13ed665af392b4c37 to your computer and use it in GitHub Desktop.
Save lozandier/34c13ed665af392b4c37 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$total-columns: 12;
$column-width: 60px;
$gutter-width: 20px;
@mixin column-span($columns) {
// Output width property and take padding into account.
width: ($column-width * $columns) + ($columns * $gutter-width);
padding: 0 $gutter-width/2;
}
.wrap {
width: $total-columns * ($column-width+ $gutter-width); // ← replace with calculated total width
}
article {
@include column-span(8);
}
aside {
@include column-span(4);
}
.wrap {
width: 960px;
}
article {
width: 640px;
padding: 0 10px;
}
aside {
width: 320px;
padding: 0 10px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment