Created
January 21, 2015 23:08
-
-
Save DannyJoris/9312820eaef6b5a6ab50 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or 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
<article class="block"></article> | |
<article class="block"></article> | |
<article class="block"></article> | |
<article class="block hotpink"></article> | |
<article class="block hotpink"></article> | |
<article class="block"></article> | |
<article class="block"></article> | |
<article class="block"></article> |
This file contains hidden or 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.2.19) | |
// Compass (v0.12.7) | |
// Zen Grids (v1.4) | |
// ---- | |
@import "zen"; | |
article { | |
height: 75px; | |
box-sizing: border-box; | |
border: 5px solid white; | |
} | |
.block { | |
background: pink; | |
$zen-column-count: 12; | |
&:nth-child(8n + 1) { | |
@include zen-grid-item(4, 1, left); | |
@include zen-clear(left); | |
} | |
&:nth-child(8n + 2) { | |
@include zen-grid-item(4, 5, left); | |
@include zen-clear(none); | |
} | |
&:nth-child(8n + 3) { | |
@include zen-grid-item(4, 9, left); | |
@include zen-clear(none); | |
} | |
&:nth-child(8n + 4) { | |
@include zen-grid-item(6, 1, left); | |
@include zen-clear(left); | |
} | |
&:nth-child(8n + 5) { | |
@include zen-grid-item(6, 7, left); | |
@include zen-clear(none); | |
} | |
&:nth-child(8n + 6) { | |
@include zen-grid-item(4, 1, left); | |
@include zen-clear(left); | |
} | |
&:nth-child(8n + 7) { | |
@include zen-grid-item(4, 5, left); | |
@include zen-clear(none); | |
} | |
&:nth-child(8n) { | |
@include zen-grid-item(4, 9, left); | |
@include zen-clear(none); | |
} | |
} | |
.hotpink { | |
background: hotpink; | |
} |
This file contains hidden or 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
article { | |
height: 75px; | |
box-sizing: border-box; | |
border: 5px solid white; | |
} | |
.block { | |
background: pink; | |
} | |
.block:nth-child(8n + 1) { | |
float: left; | |
width: 33.33333%; | |
margin-left: 0%; | |
margin-right: -33.33333%; | |
padding-left: 10px; | |
padding-right: 10px; | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
-ms-box-sizing: border-box; | |
box-sizing: border-box; | |
word-wrap: break-word; | |
clear: left; | |
} | |
.block:nth-child(8n + 2) { | |
float: left; | |
width: 33.33333%; | |
margin-left: 33.33333%; | |
margin-right: -66.66667%; | |
padding-left: 10px; | |
padding-right: 10px; | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
-ms-box-sizing: border-box; | |
box-sizing: border-box; | |
word-wrap: break-word; | |
clear: none; | |
} | |
.block:nth-child(8n + 3) { | |
float: left; | |
width: 33.33333%; | |
margin-left: 66.66667%; | |
margin-right: -100%; | |
padding-left: 10px; | |
padding-right: 10px; | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
-ms-box-sizing: border-box; | |
box-sizing: border-box; | |
word-wrap: break-word; | |
clear: none; | |
} | |
.block:nth-child(8n + 4) { | |
float: left; | |
width: 50%; | |
margin-left: 0%; | |
margin-right: -50%; | |
padding-left: 10px; | |
padding-right: 10px; | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
-ms-box-sizing: border-box; | |
box-sizing: border-box; | |
word-wrap: break-word; | |
clear: left; | |
} | |
.block:nth-child(8n + 5) { | |
float: left; | |
width: 50%; | |
margin-left: 50%; | |
margin-right: -100%; | |
padding-left: 10px; | |
padding-right: 10px; | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
-ms-box-sizing: border-box; | |
box-sizing: border-box; | |
word-wrap: break-word; | |
clear: none; | |
} | |
.block:nth-child(8n + 6) { | |
float: left; | |
width: 33.33333%; | |
margin-left: 0%; | |
margin-right: -33.33333%; | |
padding-left: 10px; | |
padding-right: 10px; | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
-ms-box-sizing: border-box; | |
box-sizing: border-box; | |
word-wrap: break-word; | |
clear: left; | |
} | |
.block:nth-child(8n + 7) { | |
float: left; | |
width: 33.33333%; | |
margin-left: 33.33333%; | |
margin-right: -66.66667%; | |
padding-left: 10px; | |
padding-right: 10px; | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
-ms-box-sizing: border-box; | |
box-sizing: border-box; | |
word-wrap: break-word; | |
clear: none; | |
} | |
.block:nth-child(8n) { | |
float: left; | |
width: 33.33333%; | |
margin-left: 66.66667%; | |
margin-right: -100%; | |
padding-left: 10px; | |
padding-right: 10px; | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
-ms-box-sizing: border-box; | |
box-sizing: border-box; | |
word-wrap: break-word; | |
clear: none; | |
} | |
.hotpink { | |
background: hotpink; | |
} |
This file contains hidden or 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
<article class="block"></article> | |
<article class="block"></article> | |
<article class="block"></article> | |
<article class="block hotpink"></article> | |
<article class="block hotpink"></article> | |
<article class="block"></article> | |
<article class="block"></article> | |
<article class="block"></article> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment