Created
October 21, 2014 12:20
-
-
Save laurenclark/ab20e14266b8aa8e56d7 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// Sass (v3.4.6) | |
// Compass (v1.0.1) | |
// ---- | |
@function grid-width($count, $gutter, $width){ | |
$grid-width: ($count - 1) * $gutter + ($count * $width); | |
@return $grid-width; | |
} | |
@function context-width($context, $width, $gutter) { | |
$context-width: $context * ($width + $gutter); | |
@return $context-width; | |
} | |
@mixin the-grid($count, $context: 12, $width: 60, $gutter: 20) { | |
$grid-width:grid-width($count, $gutter, $width); | |
$context-width:context-width($context, $width, $gutter); | |
width: percentage($grid-width / $context-width); | |
} | |
.block { | |
@include the-grid(6); | |
} |
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
.block { | |
width: 47.91667%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment