Created
May 10, 2013 15:49
-
-
Save kieran/5555317 to your computer and use it in GitHub Desktop.
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
/* ======== */ | |
/* = Grid = */ | |
/* ======== */ | |
// | |
// Configuration | |
// | |
$font-size: 16px | |
$em: $font-size / 1em | |
$column: 48px | |
$gutter: 24px | |
// | |
// Column-widths in variables, in ems | |
// | |
$cols1: ( 1 * ($column + $gutter) - $gutter) / $em | |
$cols2: ( 2 * ($column + $gutter) - $gutter) / $em | |
$cols3: ( 3 * ($column + $gutter) - $gutter) / $em | |
$cols4: ( 4 * ($column + $gutter) - $gutter) / $em | |
$cols5: ( 5 * ($column + $gutter) - $gutter) / $em | |
$cols6: ( 6 * ($column + $gutter) - $gutter) / $em | |
$cols7: ( 7 * ($column + $gutter) - $gutter) / $em | |
$cols8: ( 8 * ($column + $gutter) - $gutter) / $em | |
$cols9: ( 9 * ($column + $gutter) - $gutter) / $em | |
$cols10: (10 * ($column + $gutter) - $gutter) / $em | |
$cols11: (11 * ($column + $gutter) - $gutter) / $em | |
$cols12: (12 * ($column + $gutter) - $gutter) / $em | |
$cols13: (13 * ($column + $gutter) - $gutter) / $em | |
$cols14: (14 * ($column + $gutter) - $gutter) / $em | |
$cols15: (15 * ($column + $gutter) - $gutter) / $em | |
$cols16: (16 * ($column + $gutter) - $gutter) / $em | |
// | |
// Column-widths in a function, in ems | |
// | |
@mixin width ($cols:1) | |
width: ($cols * ($column + $gutter) - $gutter) / $em | |
@mixin min-width ($cols:1) | |
min-width: ($cols * ($column + $gutter) - $gutter) / $em | |
@mixin offset ($cols:1) | |
margin-left: ($cols * ($column + $gutter) - $gutter) / $em |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment