Created
March 2, 2010 03:34
-
-
Save funkaoshi/319102 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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