* Requires Node.js 4.0+ to run.
+[3.4.19 / 2016-xx-xx](https://github.com/jakubpawlowicz/clean-css/compare/v3.4.18...3.4)
+==================
+
+* Fixed issue [#795](https://github.com/jakubpawlowicz/clean-css/issues/795) - `!important` and override compacting.
+
[3.4.18 / 2016-06-15](https://github.com/jakubpawlowicz/clean-css/compare/v3.4.17...v3.4.18)
==================
if (right.important && !left.important)
continue;
+ if (!right.important && left.important) {
+ right.unused = true;
+ continue;
+ }
+
// Pending more clever algorithm in #527
if (moreSameShorthands(properties, i - 1, left.name))
continue;
}
},
'shorthand then longhand - important then non-important': {
- 'topic': 'p{background:__ESCAPED_URL_CLEAN_CSS0__ repeat!important;background-repeat:no-repeat}',
+ 'topic': 'p{background:__ESCAPED_URL_CLEAN_CSS0__ repeat-x!important;background-repeat:no-repeat}',
'into': function (topic) {
assert.deepEqual(_optimize(topic), [
- [['background'], ['__ESCAPED_URL_CLEAN_CSS0__'], ['no-repeat!important']]
+ [['background'], ['__ESCAPED_URL_CLEAN_CSS0__'], ['repeat-x!important']]
]);
}
},
}
}
})
+ .addBatch({
+ 'padding !important then not !important': {
+ 'topic': 'a{padding:0!important;padding-left:3px}',
+ 'into': function (topic) {
+ assert.deepEqual(_optimize(topic), [
+ [['padding'], ['0!important']]
+ ]);
+ }
+ }
+ })
.addBatch({
'overriding !important by a star hack': {
'topic': 'a{color:red!important;display:block;*color:#fff}',