Sha256: 04d5484dec63cea5051cfc0b3c97bb94b2ff9d683f3c44bf82157974f9f71811

Contents?: true

Size: 534 Bytes

Versions: 4

Compression:

Stored size: 534 Bytes

Contents

/**
 * Replaces old by new in $list
 *
 * @access private
 *
 * @link http://sassylists.com/documentation.html#replace
 *
 * @param {List} $list
 * @param {*}    $old
 * @param {*}    $value
 *
 * @return {List}
 *
 * @group Internal Functions
 */
@function flint-replace($list, $old, $value) {
  $running: true;

	@while $running {
		$index: index($list, $old);

		@if not $index {
			$running: false;
		} @else {
			$list: set-nth($list, $index, $value);
		}
	}

	@return if(not flint-is-true($value), flint-purge($list), $list);
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
flint-gs-2.0.6 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.0.5 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.0.4 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.0.3 stylesheets/flint/functions/lib/_replace.scss