Important on parametrized mixin #2404
Merged
lukeapage merged 1 commit intoless:masterfrom Jan 26, 2015
Merged
Conversation
The !important flag on mixin call prevented proper evaluation of variables inside nested mixins. less#2394
Member
There was a problem hiding this comment.
I was initially concerned, but this is only used from one place which has already copied the Ruleset.
Its a good change - but for my own curiousity, what is wrong with the new Ruleset that is causing un-eval'd rules?
Member
Author
There was a problem hiding this comment.
This would fail:
size(@aaa) {
.set-width(@aaa) {
width: @aaa; // this line is failing
}
.set-width(@aaa);
}
.when-calling-nested-issue-2394 {
.size(10px) !important;
}
with:
NameError: variable @aaa is undefined in c:\data\meri\less.js\tests\test.less on line 3, column 12:
2 .set-width(@aaa) {
3 width: @aaa;
4 }
I could not figure why. I tried to find missing property in new ruleset, compare new properties with old ones etc. Since the method was called only from one place, I gave up and did what worked.
This test case is inside mixins-important.less file.
lukeapage
added a commit
that referenced
this pull request
Jan 26, 2015
…2394 Important on parametrized mixin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should fix #2394
The issue was not with mixin being parametric, the problem was that variables of nested mixins did not evaluated properly.