Created
November 19, 2016 18:20
-
-
Save angelicahl88/877067372de2e94cb6ada63db5ee3015 to your computer and use it in GitHub Desktop.
This file contains 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
@function grid-width($count, $gutter, $width) { | |
@return ($count - 1) * $gutter + ($count * $width); | |
} | |
@function context-width($context, $gutter, $width) { | |
@return $context * ($width + $gutter); | |
} | |
@mixin the-grid($count, $context: 12, $width: 60, $gutter: 20) { | |
width: percentage(grid-width($count, $gutter, $width) / context-width($context, $gutter, $width)); | |
} | |
.block { | |
@include the-grid(6); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment