-
-
Save mirisuzanne/3080741 to your computer and use it in GitHub Desktop.
susy grid mixin
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
//----------------------------------------------------------------------------- | |
// Imports | |
@import compass | |
@import susy | |
//----------------------------------------------------------------------------- | |
// Grid Settings | |
=grid-settings($cols: $total-columns, $width: $column-width, $gutter: $gutter-width, $padding: $grid-padding) | |
// keep the defaults around | |
$default-cols: $total-columns | |
$default-width: $column-width | |
$default-gutter: $gutter-width | |
$default-padding: $grid-padding | |
// use the new settings | |
$total-columns: $cols | |
$column-width: $width | |
$gutter-width: $gutter | |
$grid-padding: $padding | |
// apply to contents | |
@content | |
// re-instate the defaults | |
$total-columns: $default-cols | |
$column-width: $default-width | |
$gutter-width: $default-gutter | |
$grid-padding: $default-padding |
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
//----------------------------------------------------------------------------- | |
// Imports | |
@import grid | |
//----------------------------------------------------------------------------- | |
// Grid Settings | |
$grid-background-column-color: rgba(255, 236, 0, 0.2) | |
//----------------------------------------------------------------------------- | |
// Other Settings | |
* | |
+box-sizing(border-box) | |
+grid-settings(6,9.188em,1.313em,1.313em) | |
.wrapper | |
+container() | |
+susy-grid-background | |
#main,#sub | |
width: columns(2,6) + gutter()/2 | |
float: left | |
border-right: 1px solid lighten(#444444,20%) | |
padding: gutter()/2 | |
#aside | |
+span-columns(2 omega,6) | |
padding: gutter()/2 0 | |
+grid-settings(4,14.500em,1.313em,1.313em) | |
footer | |
clear: both | |
+container() | |
+susy-grid-background | |
div | |
+span-columns(4,16) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment