Skip to content

Instantly share code, notes, and snippets.

@cray0000
Last active December 20, 2015 07:59
Show Gist options
  • Save cray0000/6097203 to your computer and use it in GitHub Desktop.
Save cray0000/6097203 to your computer and use it in GitHub Desktop.
Combined +span() and +nested() for Susy. Using custom mixin with extended functionality instead of +span()
// "/test/scss/ag.sass"
// ...
// Complex AG tests
// ----------------
=col($params)
+span($params)
@if nth($params, length($params)) == container
+nested($params)
@content
=ag-test($class)
.#{$class}
+container
+leader(0.5)
+trailer(0.5)
> .size1of5
min-height: rhythm(10)
&:first-of-type
+col(first 2)
~ .size1of5
+col(last 2)
> .size3of5
+col(6 at 3 container)
> .size1of2
&:first-child
+col(first 3)
+ .size1of2
+col(last 3)
> .full
clear: both
background: none
.full
.size1of3
+col(first 2)
min-height: rhythm(6.5)
.size2of3
+col(last 4 container)
.size1of2
&:first-child
+col(first 2)
+ .size1of2
+col(last 2)
.full
clear: both
.gallery
div
+gallery(2)
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment