Comparing version 3.5.0-beta.6 to 3.5.0-beta.7
@@ -16,4 +16,3 @@ var Node = require('./node'), | ||
NamespaceValue.prototype.eval = function (context) { | ||
var i, j, name, found, | ||
rules = this.value.eval(context); | ||
var i, j, name, rules = this.value.eval(context); | ||
@@ -26,3 +25,3 @@ for (i = 0; i < this.lookups.length; i++) { | ||
* Eval'd mixins return rules, so let's make a ruleset if we need it. | ||
* We need to do this because of late parsing of properties | ||
* We need to do this because of late parsing of values | ||
*/ | ||
@@ -33,3 +32,6 @@ if (Array.isArray(rules)) { | ||
if (name.charAt(0) === '@') { | ||
if (name === '') { | ||
rules = rules.lastDeclaration(); | ||
} | ||
else if (name.charAt(0) === '@') { | ||
if (name.charAt(1) === '@') { | ||
@@ -50,4 +52,10 @@ name = '@' + new Variable(name.substr(1)).eval(context).value; | ||
else { | ||
if (name.substring(0, 2) === '$@') { | ||
name = '$' + new Variable(name.substr(1)).eval(context).value; | ||
} | ||
else { | ||
name = name.charAt(0) === '$' ? name : '$' + name; | ||
} | ||
if (rules.properties) { | ||
rules = rules.property(name.charAt(0) === '$' ? name : '$' + name); | ||
rules = rules.property(name); | ||
} | ||
@@ -57,3 +65,3 @@ | ||
throw { type: 'Name', | ||
message: 'property "' + name + '" not found', | ||
message: 'property "' + name.substr(1) + '" not found', | ||
filename: this.fileInfo().filename, | ||
@@ -60,0 +68,0 @@ index: this.getIndex() }; |
@@ -321,2 +321,10 @@ var Node = require('./node'), | ||
}; | ||
Ruleset.prototype.lastDeclaration = function () { | ||
for (var i = this.rules.length; i > 0; i--) { | ||
var decl = this.rules[i - 1]; | ||
if (decl instanceof Declaration) { | ||
return this.parseValue(decl); | ||
} | ||
} | ||
}; | ||
Ruleset.prototype.parseValue = function(toParse) { | ||
@@ -323,0 +331,0 @@ var self = this; |
{ | ||
"name": "less", | ||
"version": "3.5.0-beta.6", | ||
"version": "3.5.0-beta.7", | ||
"description": "Leaner CSS", | ||
@@ -5,0 +5,0 @@ "homepage": "http://lesscss.org", |
@@ -10,3 +10,3 @@ var lessTest = require('./less-test'), | ||
var testMap = [ | ||
[{}, 'edge/'], | ||
[{}, 'namespacing/'], | ||
[{ | ||
@@ -13,0 +13,0 @@ strictMath: false, |
@@ -25,3 +25,4 @@ module.exports = { | ||
// console.log(manager); | ||
} | ||
}, | ||
minVersion: [2,0,0] | ||
}; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2248207
984
42848
28
8