Skip to content

Instantly share code, notes, and snippets.

@gbissett
Created November 16, 2009 04:50
Show Gist options
  • Save gbissett/235739 to your computer and use it in GitHub Desktop.
Save gbissett/235739 to your computer and use it in GitHub Desktop.
I pretty much stole this from @quackingduck. But you can't own grids, man.
!column_width = 60px
!gutter = 20px
!baseline = 20px
=columns( !number_of_columns )
:width = !column_width * !number_of_columns + !gutter * (!number_of_columns - 1)
:display inline
:float left
:margin 0 10px
=rows( !number_of_rows )
:height = !number_of_rows * !baseline
=prefix( !number_of_columns )
:padding-left = !column_width * !number_of_columns + !gutter * !number_of_columns
=suffix( !number_of_columns )
:padding-right = !column_width * !number_of_columns + !gutter * !number_of_columns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment