nex3/sass — Issue #260: @extend is extending more than it should
Author: hefler
Created: 2012-01-31 16:38:32+00:00
State: open

When extending a selector with the same name but in a different context, the parser thinks that selector is meant to be extended as well. Making it clear, take this example for instance:

p {
font-size: 1em;
font-weight: bold;
text-transform: uppercase;
}

ul, ol {
@extend p;
}

.my-other-rule-context {
margin: 10px;
p {
color: red;
}
}

Outputs:

```CSS
p, ul, ol, ul .my-other-rule-context, ol .my-other-rule-context {
font-size: 1em;
font-weight: bold;
text-transform: uppercase;
}

.my-other-rule-context {
margin: 10px;
}

.my-other-rule-context p {
color: red;
}
```

As far as I understand ul .my-other-rule-context, ol .my-other-rule-context shouldn't be created by the parser. Agreed?