sass-spec/spec/output_styles/nested/libsass-closed-issues/issue_988/input.scss
raw| 1 | @function str-replace($string, $search, $replace: '') { |
| 2 | $index: str-index($string, $search); |
| 3 | @if $index { |
| 4 | @return str-slice($string, 1, $index - 1) + $replace + |
| 5 | str-replace(str-slice($string, $index + str-length($search)), $search, $replace); |
| 6 | } |
| 7 | @return $string; |
| 8 | } |
| 9 | |
| 10 | $string: 'Foo Bar Baz Qux'; |
| 11 | .foo { |
| 12 | content: str-replace($string, ' ', '-'); |
| 13 | } |