Skip to content

Instantly share code, notes, and snippets.

@lolmaus
Last active December 16, 2015 07:19
Show Gist options
  • Save lolmaus/5397989 to your computer and use it in GitHub Desktop.
Save lolmaus/5397989 to your computer and use it in GitHub Desktop.
$tabletwidth: 40em;
$smalldesktopwidth: 60em;
$grids: 4;
$grids: add-grid(9 at $tabletwidth);
$grids: add-grid(12 at $smalldesktopwidth);
$gutters: 1/3;
$gutters: add-gutter(1/2 at $tabletwidth);
$gutters: add-gutter(1/2 at $smalldesktopwidth);
.element {
@include breakpoint($tabletwidth) {
margin-bottom: 1em;
&:nth-of-type(3n+1) {
@include grid-span(3, 1);
clear: both;
}
&:nth-of-type(3n+2) {
@include grid-span(3, 4);
}
&:nth-of-type(3n+3) {
@include grid-span(3, 7);
}
}
@include breakpoint($smalldesktopwidth) {
margin-bottom: 1em;
&:nth-of-type(4n+1) {
@include grid-span(3, 1);
clear: both;
}
&:nth-of-type(4n+2) {
@include grid-span(3, 4);
}
&:nth-of-type(4n+3) {
@include grid-span(3, 7);
}
&:nth-of-type(4n+4) {
@include grid-span(3, 10);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment