richthegeek/phpsass — pull request #155 by gabrielfin (2014-04-30 01:54:52+00:00)
Title: @extends in rules of 2 o more levels deep were always ignored

In the following example the @extend rule was completely ignored

File a:
```SCSS
@import 'b';
```

File b:
```SCSS
.foo {
color: red;
}
.bar {
.baz {
@extend .foo;
}
}
```

Expected output:
```CSS
.foo, .bar .baz {
color: red;
}
```

Actual output:
```CSS
.foo {
color: red;
}
```

The problem was that when "moving" nodes of "b" to tree "a", the root property was updated only on the first 2 levels. This fix adds a method SassNode::setRoot which changes the root of every node of the subtree being "moved".