Sha256: 9f46deff5721fed3240bc3b1b0b37914325b32f8b88f8493710525fa531c7f7b

Contents?: true

Size: 547 Bytes

Versions: 15

Compression:

Stored size: 547 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

15 entries across 15 versions & 1 rubygems

Version Path
flint-gs-2.3.6 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.3.5 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.3.4 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.3.3 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.3.2 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.3.1 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.3.0 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.2.0 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.1.4 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.1.3 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.1.2 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.1.1 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.1.0 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.0.9 stylesheets/flint/functions/lib/_replace.scss
flint-gs-2.0.8 stylesheets/flint/functions/lib/_replace.scss