mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
@@ -59,8 +59,8 @@ tree.mixin.Call.prototype = {
|
||||
}
|
||||
if (conditionResult[0] || conditionResult[1]) {
|
||||
if (conditionResult[0] != conditionResult[1]) {
|
||||
candidate.group = conditionResult[1]
|
||||
? defTrue : defFalse;
|
||||
candidate.group = conditionResult[1] ?
|
||||
defTrue : defFalse;
|
||||
}
|
||||
|
||||
candidates.push(candidate);
|
||||
|
||||
@@ -144,6 +144,9 @@ tree.Ruleset.prototype = {
|
||||
},
|
||||
matchCondition: function (args, env) {
|
||||
var lastSelector = this.selectors[this.selectors.length-1];
|
||||
if (!lastSelector.evaldCondition) {
|
||||
return false;
|
||||
}
|
||||
if (lastSelector.condition &&
|
||||
!lastSelector.condition.eval(
|
||||
new(tree.evalEnv)(env,
|
||||
|
||||
@@ -25,7 +25,7 @@ tree.Selector.prototype = {
|
||||
},
|
||||
createDerived: function(elements, extendList, evaldCondition) {
|
||||
evaldCondition = (evaldCondition != null) ? evaldCondition : this.evaldCondition;
|
||||
var newSelector = new(tree.Selector)(elements, extendList || this.extendList, this.condition, this.index, this.currentFileInfo, this.isReferenced);
|
||||
var newSelector = new(tree.Selector)(elements, extendList || this.extendList, null, this.index, this.currentFileInfo, this.isReferenced);
|
||||
newSelector.evaldCondition = evaldCondition;
|
||||
return newSelector;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user