/** * Joins all elements of list with passed glue * * @link http://sassylists.com/documentation/#to-string * * @param {List} $list * @param {String} $glue * @param {Bool} $is-nested * * @return {String} */ @function flint-list-to-string($list, $glue: "", $is-nested: false) { $result: null; $length: length($list); @for $i from 1 through $length { $n: nth($list, $i); @if flint-is-list($n) { $result: $result#{flint-list-to-string($n, $glue, true)}; } @else { $result: if($i != length($list) or $is-nested, $result#{$n}#{$glue}, $result#{$n}); } } @return $result; }