Skip to content

Instantly share code, notes, and snippets.

@Anahkiasen
Created May 16, 2014 17:18
Show Gist options
  • Save Anahkiasen/87713f087aa5ee30086e to your computer and use it in GitHub Desktop.
Save Anahkiasen/87713f087aa5ee30086e to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
main
.third
.third
.third
.half
.half
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// Susy (v2.1.2)
// ----
@import "susy";
$susy: (
columns: 12,
debug: (
image: show,
),
);
main {
// Create a 800px container
@include container(800px);
padding-top: 20px;
div {
background: Tomato;
height: 50px;
margin-bottom: 35px;
}
// Creates a layout of 12 columns with 4 column gutters
@include with-layout(12 4) {
.third {
@include span(4);
&:nth-child(3n) {
@include last;
}
}
.half {
@include span(6);
&:nth-child(2n) {
@include last;
}
}
}
}
main {
max-width: 800px;
margin-left: auto;
margin-right: auto;
background-image: linear-gradient(to right, rgba(102, 102, 255, 0.25), rgba(179, 179, 255, 0.25) 80%, transparent 80%);
background-size: 8.47458%;
background-origin: content-box;
background-clip: content-box;
background-position: left top;
padding-top: 20px;
}
main:after {
content: " ";
display: block;
clear: both;
}
main div {
background: Tomato;
height: 50px;
margin-bottom: 35px;
}
main .third {
width: 28.57143%;
float: left;
margin-right: 7.14286%;
}
main .third:nth-child(3n) {
float: right;
margin-right: 0;
}
main .half {
width: 46.42857%;
float: left;
margin-right: 7.14286%;
}
main .half:nth-child(2n) {
float: right;
margin-right: 0;
}
<main>
<div class="third"></div>
<div class="third"></div>
<div class="third"></div>
<div class="half"></div>
<div class="half"></div>
</main>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment