Sha256: 6b40507f1b09055b7b22721ac2ecdc2f7e8caa1767ef6c736adae8a549bff221

Contents?: true

Size: 828 Bytes

Versions: 24

Compression:

Stored size: 828 Bytes

Contents

// Joins all elements of $list with $glue
// -------------------------------------------------------------------------------
// @documentation http://sassylists.com/documentation/#to-string
// -------------------------------------------------------------------------------
// @param $list [List] : list
// @param $glue [String] : value to use as a join string
// -------------------------------------------------------------------------------
// @return [String]

@function list-to-string($list, $glue: "", $is-nested: false) {
	$result: null;
	$length: length($list);

	@for $i from 1 through $length {
		$n: nth($list, $i);

		@if is-list($n) {
			$result: $result#{list-to-string($n, $glue, true)};
		} @else {
			$result: if($i != length($list) or $is-nested, $result#{$n}#{$glue}, $result#{$n});
		}
	}

	@return $result;
}

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
flint-gs-1.3.5 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.3.4 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.3.3 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.3.2 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.3.1 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.3.0 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.2.0 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.1.0 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.0.9 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.0.8 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.0.7 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.0.6 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.0.5 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.0.4 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.0.3 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.0.2 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.0.1 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.0.0 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-0.1.7 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-0.1.6 stylesheets/flint/functions/lib/_list-to-string.scss