Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Generated by SassMeister.com.
<div class="body">
<div class="portfolio-item">thing</div>
<div class="portfolio-item">thing</div>
<div class="portfolio-item">thing</div>
</div>
// ----
// libsass (v3.2.5)
// ----
@import "susy";
$susy: (
columns: 3,
gutters: 30px/360px,
column-width: 360px,
);
.body {
@include container;
overflow: hidden;
}
.portfolio-item{
@include gallery(1 of 3);
background: skyblue;
}
.body {
max-width: 1140px;
margin-left: auto;
margin-right: auto;
overflow: hidden;
}
.body:after {
content: " ";
display: block;
clear: both;
}
.portfolio-item {
width: 31.57895%;
float: left;
background: skyblue;
}
.portfolio-item:nth-child(3n + 1) {
margin-left: 0;
margin-right: -100%;
clear: both;
margin-left: 0;
}
.portfolio-item:nth-child(3n + 2) {
margin-left: 34.21053%;
margin-right: -100%;
clear: none;
}
.portfolio-item:nth-child(3n + 3) {
margin-left: 68.42105%;
margin-right: -100%;
clear: none;
}
<div class="body">
<div class="portfolio-item">thing</div>
<div class="portfolio-item">thing</div>
<div class="portfolio-item">thing</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.