Sha256: ef9b22320c439903c2ea61d4266ec926ad0773320226dc960ff960802ed5fb71
Contents?: true
Size: 758 Bytes
Versions: 8
Compression:
Stored size: 758 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 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 is-true($value), purge($list), $list); }
Version data entries
8 entries across 8 versions & 1 rubygems