+[2.2.14 / 2014-xx-xx](https://github.com/jakubpawlowicz/clean-css/compare/v2.2.13...v2.2.14)
+==================
+
+* Makes multival operations idempotent.
+
[2.2.13 / 2014-08-12](https://github.com/jakubpawlowicz/clean-css/compare/v2.2.12...v2.2.13)
+
==================
* Fixed issue [#337](https://github.com/jakubpawlowicz/clean-css/issues/337) - handling component importance.
var mergedValues = [];
var firstProcessed;
for (i = 0; i < partsCount; i++) {
+ var newTokens = [];
for (var k = 0, n = merged[i].length; k < n; k++) {
- tokens[k].value = merged[i][k];
+ var newToken = tokens[k].clone();
+ newToken.value = merged[i][k];
+ newTokens.push(newToken);
}
var meta = {
partsCount: partsCount,
position: i
};
- var processed = assembleFunction(prop, tokens, isImportant, meta);
+ var processed = assembleFunction(prop, newTokens, isImportant, meta);
mergedValues.push(processed.value);
if (!firstProcessed)
},
borderRadius: function (prop, tokens, isImportant) {
var verticalTokens = [];
+ var newTokens = [];
for (var i = 0, l = tokens.length; i < l; i++) {
var token = tokens[i];
+ var newToken = token.clone();
+ newTokens.push(newToken);
if (!Array.isArray(token.value))
continue;
});
}
- token.value = token.value[0];
+ newToken.value = token.value[0];
}
- var result = putTogether.takeCareOfInherit(putTogether.fourUnits)(prop, tokens, isImportant);
+ var result = putTogether.takeCareOfInherit(putTogether.fourUnits)(prop, newTokens, isImportant);
if (verticalTokens.length > 0) {
var verticalResult = putTogether.takeCareOfInherit(putTogether.fourUnits)(prop, verticalTokens, isImportant);
if (result.value != verticalResult.value)