Skip to content

Commit

Permalink
Add failing test case. Nesting the same mixin in content blocks more …
Browse files Browse the repository at this point in the history
…than once fails with an invalid loop detection error.
  • Loading branch information
chriseppstein committed Sep 14, 2011
1 parent d991857 commit 4ddfd69
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions test/sass/engine_test.rb
Expand Up @@ -2521,22 +2521,26 @@ def test_selector_in_content
def test_using_parent_mixin_in_content
assert_equal <<CSS, render(<<SASS)
.parent {
background-color: red;
border-color: red; }
.parent .child {
background-color: yellow;
color: blue;
border-color: yellow; }
before-color: red;
after-color: red; }
.parent .sibling {
before-color: yellow;
after-color: yellow; }
.parent .sibling .child {
before-color: green;
color: blue;
after-color: green; }
CSS
$color: blue
=context($class, $color: red)
.\#{$class}
background-color: $color
before-color: $color
@content
border-color: $color
after-color: $color
+context(parent)
+context(child, $color: yellow)
color: $color
+context(sibling, $color: yellow)
+context(child, $color: green)
color: $color
SASS
end

Expand Down

0 comments on commit 4ddfd69

Please sign in to comment.