| 1 |
@mixin prepend-foo { |
| 2 |
$parent: &; |
| 3 |
|
| 4 |
@if $parent { |
| 5 |
.foo & { |
| 6 |
@content; |
| 7 |
} |
| 8 |
} @else { |
| 9 |
.foo { |
| 10 |
@content; |
| 11 |
} |
| 12 |
} |
| 13 |
} |
| 14 |
|
| 15 |
@include prepend-foo { |
| 16 |
bar { |
| 17 |
color: red; |
| 18 |
} |
| 19 |
} |
| 20 |
|
| 21 |
bar { |
| 22 |
@include prepend-foo { |
| 23 |
baz { |
| 24 |
color: red; |
| 25 |
} |
| 26 |
} |
| 27 |
} |