Last active
August 29, 2015 14:05
-
-
Save krambuhl/4d2862f8d9822de68547 to your computer and use it in GitHub Desktop.
updated grid version using respond.scss general media query maker
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
$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
how to use: