Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// http://1kbgrid.com as a sass file.
//
// To use, import this file into another sass file that sets all the variables.
// For example, I use this within the following sass file to generate the grid
// for my iPhone blog
//
// !column_width = 40px
// !gutter_width = 20px
// !number_of_columns = 11
//
// @import grid.sass
//
@for !i from 1 through !number_of_columns
.grid_#{!i}
width = (!column_width + !gutter_width) * !i - !gutter_width
.column
margin = "0 #{!gutter_width / 2}"
overflow: hidden
float: left
display: inline
.row
width = (!column_width + !gutter_width) * !number_of_columns
margin: 0 auto
overflow: hidden
.row
margin = "0 -#{!gutter_width / 2}"
width: auto
display: inline-block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.