Skip to content

Instantly share code, notes, and snippets.

@yoshiokatsuneo
Last active August 29, 2015 14:07
Show Gist options
  • Save yoshiokatsuneo/95e2b9e2cff486059987 to your computer and use it in GitHub Desktop.
Save yoshiokatsuneo/95e2b9e2cff486059987 to your computer and use it in GitHub Desktop.
div
- for (var i = 0; i < 10; ++i)
div.item
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// Breakpoint (v2.5.0)
// Singularity.gs (v1.4.0)
// ----
@import "breakpoint";
@import "singularitygs";
@include add-grid(3);
@include add-grid(5 at 500px);
@include add-gutter(1/3);
@include sgs-change('output', 'float');
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
.item {
background-color: blue;
height: 100px;
@include float-span(1);
border: 2px solid black;
margin-bottom: 20px;
&:nth-child(3n) {
@include float-span(1, last);
}
}
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
.item {
background-color: blue;
height: 100px;
width: 27.27273%;
clear: right;
float: left;
margin-left: 0;
margin-right: 9.09091%;
border: 2px solid black;
margin-bottom: 20px;
}
.item:nth-child(3n) {
width: 27.27273%;
clear: right;
float: right;
margin-right: 0;
}
<div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment