Skip to content

Instantly share code, notes, and snippets.

@Anahkiasen
Created May 19, 2014 09:06
Show Gist options
  • Save Anahkiasen/527f0d69b0d5c3f42830 to your computer and use it in GitHub Desktop.
Save Anahkiasen/527f0d69b0d5c3f42830 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<main>
<div class="third"></div>
<div class="third"></div>
<div class="third"></div>
</main>
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// Susy (v2.1.2)
// ----
@import "susy";
$susy: (
columns: 3,
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
.third {
@include span(1);
&:nth-child(3n) {
@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: 35.71429%;
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>
<div class="third"></div>
<div class="third"></div>
<div class="third"></div>
</main>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment