We were not copying properties when assigning in four-values tokens.
As a result we were adding !important value to all components as they
were referencing the same object.
+[3.4.2 / 2015-xx-xx](https://github.com/jakubpawlowicz/clean-css/compare/v3.4.1...3.4)
+==================
+
+* Fixed issue [#660](https://github.com/jakubpawlowicz/clean-css/issues/660) - !important token overriding.
+
[3.4.1 / 2015-08-27](https://github.com/jakubpawlowicz/clean-css/compare/v3.4.0...v3.4.1)
==================
return [];
if (value.length < 2)
- value[1] = value[0];
+ value[1] = value[0].slice(0);
if (value.length < 3)
- value[2] = value[0];
+ value[2] = value[0].slice(0);
if (value.length < 4)
- value[3] = value[1];
+ value[3] = value[1].slice(0);
for (var i = componentNames.length - 1; i >= 0; i--) {
var component = wrapSingle([[componentNames[i], property.important]]);
]);
}
},
+ 'shorthand multiple !important': {
+ 'topic': 'a{border-color:#123 !important;border-top-color: #456 !important}',
+ 'into': function (topic) {
+ assert.deepEqual(_optimize(topic), [
+ [['border-color'], ['#456'], ['#123'], ['#123!important']]
+ ]);
+ }
+ },
'shorthand list-style #1': {
'topic': 'a{list-style-type:circle;list-style-position:outside;list-style-image:__ESCAPED_URL_CLEAN_CSS0__}',
'into': function (topic) {