Skip to content

Instantly share code, notes, and snippets.

@mixonic
Created May 29, 2012 17:50
Show Gist options
  • Save mixonic/2829724 to your computer and use it in GitHub Desktop.
Save mixonic/2829724 to your computer and use it in GitHub Desktop.
compact
@function mycompact($one, $two, $three, $four, $five, $six, $seven, $eight, $nine, $ten) {
$originalList: $one, $two, $three, $four, $five, $six, $seven, $eight, $nine, $ten;
$compactList: ();
@each $item in $one, $two, $three, $four, $five, $six, $seven, $eight, $nine, $ten {
@if $item != false {
append $compactList, $item;
}
}
@return( $compactList );
}
@geksilla
Copy link

   append $compactList, $item;

throws error for me. Fixed:

   $compactList: append( $compactList, $item );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment