selector() bugs in block mixins
See original GitHub issueIf 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"
}
Issue Analytics
- State:
- Created 9 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Is it possible to perform some operations on the & selector inside a ...
I'm trying to perform some string operations on the current selector & while inside a LESS mixin, but no matter what I try,...
Read more >Extends in less - Scott Logic Blog
With extends I can say that one class wants to have the properties of another by the inclusion of the selector in the...
Read more >Extending In Sass Without Creating A Mess
The @extend directive in Sass is a powerful directive that facilitates the sharing of rules and relationships between selectors.
Read more >Changelog | Stylelint
Added: ignore: ["inside-block"] and splitList to selector-disallowed-list ... Fixed: selector-class-pattern false positives for Less parametric mixins ...
Read more >Lists - Sass
The @each rule evaluates a block of styles for each element in a list, ... If the value isn't in the list at...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any updates?
Highly interested seeing this fixed as it disallows me from porting
chili
to Stylus, which was originally the intended compiler for the project. https://github.com/salsita/chili