Skip to content

Commit

Permalink
Merge pull request #2128 from SomMeri/issue-2127
Browse files Browse the repository at this point in the history
Mixin wrongly called
  • Loading branch information
lukeapage committed Aug 14, 2014
2 parents 5d406c4 + 62eb799 commit 3735d81
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/less/tree/selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ tree.Selector.prototype = {
css += v.value.value;
}

this._elements = css.match(/[,&#\.\w-]([\w-]|(\\.))*/g);
this._elements = css.match(/[,&#\*\.\w-]([\w-]|(\\.))*/g);

if (this._elements) {
if (this._elements[0] === "&") {
Expand Down
3 changes: 3 additions & 0 deletions test/css/mixins.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
.borders {
border-style: dashed;
}
.mixin > * {
border: do not match me;
}
#namespace .borders {
border-style: dotted;
}
Expand Down
1 change: 1 addition & 0 deletions test/less/mixins.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.mixin { border: 1px solid black; }
.mixout { border-color: orange; }
.borders { border-style: dashed; }
.mixin > * { border: do not match me; }

#namespace {
.borders {
Expand Down

0 comments on commit 3735d81

Please sign in to comment.