-
-
Save alexmattorr/7f1fb76f158557d7d7ef 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-max: 12; | |
$grid-column: 80px; | |
$grid-gutter: 0; | |
@function gridw ($span: $grid-max, $offset: 0) { | |
@if $span != -1 { | |
@return ($grid-column * $span) + ($grid-gutter * ($span - 1)) + $offset; | |
} | |
@return -1; | |
} | |
@mixin grid ($span: $grid-max, $offset: 0) { | |
width: gridw($span, $offset); | |
} | |
@mixin grid-respond ($min: -1, $max: -1, $media: "all") { | |
// mixin from respond.scss | |
// https://gist.github.com/krambuhl/9dd229f391aceb3012b4 | |
@include respond(gridw($min), gridw($max), $media) { @content }; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment