Skip to content

Instantly share code, notes, and snippets.

@garybernhardt
Created August 15, 2011 01:50
Show Gist options
  • Save garybernhardt/1145585 to your computer and use it in GitHub Desktop.
Save garybernhardt/1145585 to your computer and use it in GitHub Desktop.
$grid_column_width: 40px
$grid_column_margin: 10px
$grid_columns: 12
$grid_width: $grid_columns * ($grid_column_width + $grid_column_margin * 2)
=container
margin-left: auto
margin-right: auto
width: $grid_width
=alpha
margin-left: 0
=omega
margin-right: 0
=column($columns, $adjustment: 0px)
width: $columns * ($grid_column_width + $grid_column_margin * 2) - $grid_column_margin * 2 + $adjustment
display: inline
float: left
position: relative
margin-left: $grid_column_margin
margin-right: $grid_column_margin
=prefix($columns)
padding-left: $columns * ($grid_column_width + $grid_column_margin * 2)
=suffix($columns)
padding-right: $columns * ($grid_column_width + $grid_column_margin * 2)
=clearfix
*display: inline-block
&:after
content: " "
display: block
height: 0
clear: both
visibility: hidden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment