Skip to content

Instantly share code, notes, and snippets.

@franzheidl
Created November 16, 2014 21:15
Show Gist options
  • Save franzheidl/018696907605fb7fcf68 to your computer and use it in GitHub Desktop.
Save franzheidl/018696907605fb7fcf68 to your computer and use it in GitHub Desktop.
@function arrayToString($list, $separator: " ") {
$str: null;
@each $item in $list {
$i: index($list, $item);
@if $i == 1 {
$str: $str #{$item};
}
@else {
$str: $str#{$separator} #{$item};
}
}
@return $str;
}
@franzheidl
Copy link
Author

Sass function to join e.g. (#222 #333 #444) to "#222 #333 #444".

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