Created
November 19, 2015 15:25
-
-
Save adamjohnson/9719e08b6b6ab4ee5e03 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.14) | |
// Compass (v1.0.3) | |
// Bourbon (v4.2.3) | |
// Neat (v1.6.0) | |
// ---- | |
@import "bourbon/bourbon"; | |
@import "neat/neat"; | |
@mixin omega-reset($nth) { | |
&:nth-child(#{$nth}) { margin-right: flex-gutter(); } | |
&:nth-child(#{$nth}+1) { clear: none } | |
} | |
.grid-item { | |
@include span-columns(6); // Two column grid | |
@include omega(2n); // The omega mixin clears every 2nd grid item | |
@media (min-width: 40em) { | |
@include omega-reset(2n); // Since we're already clearing every second item, we have to undo that so our 3 column grid works. | |
@include span-columns(4); // Three column grid | |
@include omega(3n); // Clear every third grid item | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
.grid-item { | |
float: left; | |
display: block; | |
margin-right: 2.35765%; | |
width: 48.82117%; | |
} | |
.grid-item:last-child { | |
margin-right: 0; | |
} | |
.grid-item:nth-child(2n) { | |
margin-right: 0; | |
} | |
.grid-item:nth-child(2n+1) { | |
clear: left; | |
} | |
@media (min-width: 40em) { | |
.grid-item { | |
float: left; | |
display: block; | |
margin-right: 2.35765%; | |
width: 31.76157%; | |
} | |
.grid-item:nth-child(2n) { | |
margin-right: 2.35765%; | |
} | |
.grid-item:nth-child(2n+1) { | |
clear: none; | |
} | |
.grid-item:last-child { | |
margin-right: 0; | |
} | |
.grid-item:nth-child(3n) { | |
margin-right: 0; | |
} | |
.grid-item:nth-child(3n+1) { | |
clear: left; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment