Skip to content

Instantly share code, notes, and snippets.

@anthonybrown
Forked from JeffreyWay/grid.css
Created December 15, 2012 19:00
Show Gist options
  • Save anthonybrown/4298183 to your computer and use it in GitHub Desktop.
Save anthonybrown/4298183 to your computer and use it in GitHub Desktop.
full_width = 80
columns = 12
gutter = 1
.container
width unit(full_width, '%')
margin auto
overflow hidden
div[class^="grid_"]
display inline
float left
margin-left unit(gutter, '%')
margin-right unit(gutter, '%')
for col in 1..columns
.grid_{col}
width unit((col / columns - gutter / 100 * 2) * 100, '%')
@media screen and (max-width: 480px)
div[class^="grid_"]
float none
display block
width 100%
margin 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment