Skip to content

Instantly share code, notes, and snippets.

@thyforhtian
Created October 27, 2014 15:13
Show Gist options
  • Select an option

  • Save thyforhtian/a009c91093ea2c562638 to your computer and use it in GitHub Desktop.

Select an option

Save thyforhtian/a009c91093ea2c562638 to your computer and use it in GitHub Desktop.
stylus - generate simple responsive grid
el = 100%
columns = 12
gutter = 0.5%
for i in 1..columns
div.col-lg-{i}
width ((el/columns * i) - (gutter *2))
margin-left: gutter;
margin-right: gutter;
height: 30px;
background: black;
box-shadow: 0 0 1px red inset;
float: left;
margin-bottom: 10px;
.container {
width: 640px;
margin: 0 auto;
}
.row {
width: 100%;
clear: both;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment