From: Jakub Pawlowicz Date: Sun, 8 Jun 2014 20:31:17 +0000 (+0100) Subject: Disables new property optimizer if body is not optimizable. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=ff7ef3c67d3c5129cbda0963bda9bafe82fa189a;p=clean-css.git Disables new property optimizer if body is not optimizable. --- diff --git a/lib/properties/optimizer.js b/lib/properties/optimizer.js index fe7903e9..c4533e9d 100644 --- a/lib/properties/optimizer.js +++ b/lib/properties/optimizer.js @@ -266,7 +266,7 @@ module.exports = function Optimizer(compatibility, aggressiveMerging) { result = rebuild(optimized); } - if (!skipCompacting) { + if (!skipCompacting && processableInfo.implementedFor.test(result)) { result = compact(result); } diff --git a/lib/properties/processable.js b/lib/properties/processable.js index c39016c8..c98b9eac 100644 --- a/lib/properties/processable.js +++ b/lib/properties/processable.js @@ -751,6 +751,7 @@ module.exports = (function () { var Token = tokenModule.createTokenPrototype(processable); return { + implementedFor: /background|border|color|list|margin|outline|padding|transform/, processable: processable, Token: Token };