Skip to content

Instantly share code, notes, and snippets.

@zellwk
Created April 5, 2015 08:57
Show Gist options
  • Select an option

  • Save zellwk/9d3ed09f2751bef75c98 to your computer and use it in GitHub Desktop.

Select an option

Save zellwk/9d3ed09f2751bef75c98 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="wrap">
<div class="one item"></div>
<div class="two item"></div>
<div class="three item"></div>
<div class="four item"></div>
</div>
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// Susy (v2.1.3)
// ----
@import "susy";
$susy: (
container: 960px,
columns: 1 2 3 4 5,
column-width: 100px,
gutters: 0.25,
math: static,
output: isolate,
global-box-sizing: border-box,
gutter-position: after,
);
.wrap {
@include container;
}
.one {
@include span(1 at 1);
}
.two {
@include span(1 at 2);
}
.three {
@include span(1 at 3);
}
.four {
@include span(1 at 4);
}
.item {
height: 60px;
background: red;
&:nth-child(2n) {
background: blue;
}
}
.wrap {
width: 960px;
margin-left: auto;
margin-right: auto;
}
.wrap:after {
content: " ";
display: block;
clear: both;
}
.one {
width: 100px;
float: left;
margin-left: 0;
margin-right: -100%;
}
.two {
width: 200px;
float: left;
margin-left: 125px;
margin-right: -100%;
}
.three {
width: 300px;
float: left;
margin-left: 350px;
margin-right: -100%;
}
.four {
width: 400px;
float: left;
margin-left: 675px;
margin-right: -100%;
}
.item {
height: 60px;
background: red;
}
.item:nth-child(2n) {
background: blue;
}
<div class="wrap">
<div class="one item"></div>
<div class="two item"></div>
<div class="three item"></div>
<div class="four item"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment