Sha256: 4389cad5673317b892417ee46fff5a4391c0fb056bf0d68f1edd1c4bdc7f0b2c

Contents?: true

Size: 825 Bytes

Versions: 7

Compression:

Stored size: 825 Bytes

Contents

///
/// Joins all elements of list with passed glue
///
/// @access private
///
/// @link http://sassylists.com/documentation/#to-string
///
/// @param {List}   $list
/// @param {String} $glue
/// @param {Bool}   $is-nested
///
/// @return {String}
///
/// @group Internal Functions
///
@function flint-list-to-string($list, $glue: "", $is-nested: false) {

	// Use Ruby function if available
	@if $flint__use-ruby-functions {
		@return flint_ruby_list_to_string($list, $glue);
	} @else {
		$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 unquote($result);
	}
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
flint-gs-2.1.4 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-2.1.3 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-2.1.2 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-2.1.1 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-2.1.0 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-2.0.9 stylesheets/flint/functions/lib/_list-to-string.scss
flint-gs-2.0.8 stylesheets/flint/functions/lib/_list-to-string.scss