Created
October 3, 2015 17:22
-
-
Save zeusdeux/c752856b1945645b9e7c to your computer and use it in GitHub Desktop.
Revisions
-
zeusdeux created this gist
Oct 3, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,52 @@ /* Simple flexbox based grid system */ $columns: 12; @mixin layout-cols($device) { @for $i from 1 through 12 { .l-#{$device}-col-#{$i} { flex: 0 0 $i / $columns * 100%; } } } @mixin responsify { /* Common rules */ .l-container { margin-left: auto; margin-right: auto; .row { display: flex; flex-wrap: wrap; flex-direction: row; justify-content: center; @include layout-cols(d); } } /* Tablet rules */ @media only screen and (max-width: 768px) { .l-container { .row { @include layout-cols(t); } } } /* Mobile rules */ @media only screen and (max-width: 480px) { .l-container{ .row { @include layout-cols(m); } } } } @include responsify;