Comparing version 3.8.1 to 3.9.0
@@ -0,1 +1,20 @@ | ||
## 3.9.0 | ||
2018-11-28 | ||
- Added `range([start=1], end, [step=1])` function to generate lists | ||
- Fixes #3325 #3313 #3328 | ||
## 3.8.1 | ||
2018-08-07 | ||
- Fixes for sourcemaps and color functions | ||
- Support for #RRGGBBAA color format | ||
- Allows conversion of colors to `rgba()` or `hsla()` | ||
- Pass-through output of unknown properties in color functions (allows `var(--color)` for example) | ||
## 3.8.0 | ||
2018-07-22 | ||
- New feature: added rewrite urls to replace relative url option. Adds "local" option for modules | ||
## 3.7.1 | ||
@@ -2,0 +21,0 @@ |
@@ -230,3 +230,4 @@ 'use strict'; | ||
browserifyOptions: { | ||
standalone: 'less' | ||
standalone: 'less', | ||
noParse: ['clone'] | ||
} | ||
@@ -233,0 +234,0 @@ }, |
@@ -1,3 +0,5 @@ | ||
var Dimension = require('../tree/dimension'), | ||
var Comment = require('../tree/comment'), | ||
Dimension = require('../tree/dimension'), | ||
Declaration = require('../tree/declaration'), | ||
Expression = require('../tree/expression'), | ||
Ruleset = require('../tree/ruleset'), | ||
@@ -29,4 +31,32 @@ Selector = require('../tree/selector'), | ||
}, | ||
/** | ||
* Creates a Less list of incremental values. | ||
* Modeled after Lodash's range function, also exists natively in PHP | ||
* | ||
* @param {Dimension} [start=1] | ||
* @param {Dimension} end - e.g. 10 or 10px - unit is added to output | ||
* @param {Dimension} [step=1] | ||
*/ | ||
range: function(start, end, step) { | ||
var from, to, stepValue = 1, list = []; | ||
if (end) { | ||
to = end; | ||
from = start.value; | ||
if (step) { | ||
stepValue = step.value; | ||
} | ||
} | ||
else { | ||
from = 1; | ||
to = start; | ||
} | ||
for (var i = from; i <= to.value; i += stepValue) { | ||
list.push(new Dimension(i, to.unit)); | ||
} | ||
return new Expression(list); | ||
}, | ||
each: function(list, rs) { | ||
var i = 0, rules = [], newRules, iterator; | ||
var rules = [], newRules, iterator; | ||
@@ -41,2 +71,4 @@ if (list.value) { | ||
iterator = list.ruleset.rules; | ||
} else if (list.rules) { | ||
iterator = list.rules; | ||
} else if (Array.isArray(list)) { | ||
@@ -60,6 +92,5 @@ iterator = list; | ||
} | ||
iterator.forEach(function(item) { | ||
i = i + 1; | ||
var key, value; | ||
for (var i = 0; i < iterator.length; i++) { | ||
var key, value, item = iterator[i]; | ||
if (item instanceof Declaration) { | ||
@@ -69,5 +100,9 @@ key = typeof item.name === 'string' ? item.name : item.name[0].value; | ||
} else { | ||
key = new Dimension(i); | ||
key = new Dimension(i + 1); | ||
value = item; | ||
} | ||
if (item instanceof Comment) { | ||
continue; | ||
} | ||
@@ -82,3 +117,3 @@ newRules = rs.rules.slice(0); | ||
newRules.push(new Declaration(indexName, | ||
new Dimension(i), | ||
new Dimension(i + 1), | ||
false, false, this.index, this.currentFileInfo)); | ||
@@ -97,3 +132,3 @@ } | ||
)); | ||
}); | ||
} | ||
@@ -100,0 +135,0 @@ return new Ruleset([ new(Selector)([ new Element("", '&') ]) ], |
@@ -5,3 +5,3 @@ module.exports = function(environment, fileManagers) { | ||
var initial = { | ||
version: [3, 8, 1], | ||
version: [3, 9, 0], | ||
data: require('./data'), | ||
@@ -8,0 +8,0 @@ tree: require('./tree'), |
@@ -20,7 +20,10 @@ var Node = require('./node'), | ||
if (!detachedRuleset.ruleset) { | ||
if (Array.isArray(detachedRuleset)) { | ||
if (detachedRuleset.rules) { | ||
rules = detachedRuleset; | ||
} | ||
else if (Array.isArray(detachedRuleset)) { | ||
rules = new Ruleset('', detachedRuleset); | ||
} | ||
else if (Array.isArray(detachedRuleset.value)) { | ||
rules = detachedRuleset.value; | ||
rules = new Ruleset('', detachedRuleset.value); | ||
} | ||
@@ -30,3 +33,3 @@ else { | ||
} | ||
detachedRuleset = new DetachedRuleset(new Ruleset('', rules)); | ||
detachedRuleset = new DetachedRuleset(rules); | ||
} | ||
@@ -33,0 +36,0 @@ if (detachedRuleset.ruleset) { |
{ | ||
"name": "less", | ||
"version": "3.8.1", | ||
"version": "3.9.0", | ||
"description": "Leaner CSS", | ||
@@ -54,3 +54,2 @@ "homepage": "http://lesscss.org", | ||
"devDependencies": { | ||
"bootstrap": "3.3.7", | ||
"bootstrap-less-port": "0.3.0", | ||
@@ -57,0 +56,0 @@ "diff": "^3.2.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
Sorry, the diff of this file is not supported yet
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
25
2669559
1048
61361