Sha256: 0d5007a26fc990f758d0d7c7c69ec785ac244228ee3a4451bdf1c0b47ae2b84f

Contents?: true

Size: 847 Bytes

Versions: 7

Compression:

Stored size: 847 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 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;
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
flint-gs-1.12.0 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.11.2 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.10.0 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.9.1 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.8.0 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.7.2 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-1.7.0 stylesheets/flint/functions/lib/_list-to-string.scss