stylus: selector() bugs in block mixins

If you nest block mixins the selectors get created correctly but the selector() bif fails to return the full path.

aBlockMixin(name){
    outerSel = selector();
    .{name} {
        {block}
        sel: selector()
        outerSel: outerSel
    }
}


+aBlockMixin(joe){
    color: blue;

    +aBlockMixin(bob){
        color: green;
    }
}

yields:

.joe {
  color: #00f;
  sel: '.joe';  //correct
  outerSel: '&';  //correct 
}
.joe .bob {
  color: #008000;
  sel: '.bob';  //should be ".joe .bob"
  outerSel: '&';  //should be ".joe"
}

About this issue

  • Original URL
  • State: open
  • Created 10 years ago
  • Comments: 15 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Any updates?