Last active
August 29, 2015 14:27
-
-
Save sajhd/b398fda8d3de60761d02 to your computer and use it in GitHub Desktop.
Row Machine Mixin
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
| // Row Machine /// | |
| @mixin rowMachine($numPerRow, $margin) { | |
| width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow); | |
| &:nth-of-type(n) { | |
| margin-right: $margin; | |
| } | |
| &:nth-of-type(#{$numPerRow}n) { | |
| margin-right: 0; | |
| margin-bottom: $margin; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment