Last active
May 19, 2016 10:20
-
-
Save lackneets/c797d2012c55e514307be3248d3368d6 to your computer and use it in GitHub Desktop.
Simple Grid System
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
// The Basic | |
.grids{ | |
letter-spacing: -.31em; | |
> * { | |
display: inline-block; | |
letter-spacing: 0.01em; | |
} | |
} | |
// Options | |
.grid > *{ | |
width: 100% / 6; // 6 grids in a row | |
box-sizing: border-box; // ignore padding from width | |
padding: 0 .25%; // spacing between grids | |
margin-bottom: 2%; // spacing between rows | |
vertical-align: top; // avoid messy from random height | |
} | |
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
.grids(@grid, @padding: 0.25em){ | |
letter-spacing: -.31em; | |
margin-left: @padding*-1; | |
margin-right: @padding*-1; | |
> * { | |
display: inline-block; | |
vertical-align: top; | |
letter-spacing: 0.01em; | |
width: 100%/@grid; | |
box-sizing: border-box; | |
padding-left: @padding; | |
padding-right: @padding; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment