Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

less

Package Overview
Dependencies
Maintainers
5
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

less - npm Package Compare versions

Comparing version 3.5.0-beta.6 to 3.5.0-beta.7

test/browser/less.js

20

lib/less/tree/namespace-value.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc