Sha256: 721e97641912f0d6b11a8a04ae71a4206747a4bbaa9b4f1a2e825c2cda2ee943
Contents?: true
Size: 777 Bytes
Versions: 7
Compression:
Stored size: 777 Bytes
Contents
// Replaces $old by $new in $list // ------------------------------------------------------------------------------- // @documentation http://sassylists.com/documentation.html#replace // ------------------------------------------------------------------------------- // @param $list [list] : list // @param $old [literal] : value to replace // @param $value [literal] : new value for $old // ------------------------------------------------------------------------------- // @return [list] @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
7 entries across 7 versions & 1 rubygems