Sha256: 2d5ad216db231a6c8fda5e08c0a82d3ad6044a9ee3ecb0f9cfce7098892b6022
Contents?: true
Size: 758 Bytes
Versions: 24
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
24 entries across 24 versions & 1 rubygems