Skip to content

Instantly share code, notes, and snippets.

@anderssvendal
Created August 19, 2012 17:41
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 anderssvendal/3396633 to your computer and use it in GitHub Desktop.
Save anderssvendal/3396633 to your computer and use it in GitHub Desktop.
Small sass gridsystem
// 12 column grid
$column-width: 60px !default
$gutter-width: 20px !default
$grid-columns: 12 !default
$grid-width: $column-width * $grid-columns + $gutter-width * ($grid-columns - 1)
@function column-width($n)
@return $column-width * $n + $gutter-width * ($n - 1)
@mixin container
margin-left: -$gutter-width
+pie-clearfix
@mixin span($n, $padding: 0)
margin-left: $gutter-width
width: column-width($n) - ($padding * 2)
padding: $padding
float: left
@mixin offset($n)
margin-left: +column-width($n) + $gutter-width * 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment