From c5d9b3c54d0941b2a9c0e7124223574f1e59ae5d Mon Sep 17 00:00:00 2001 From: Jakub Pawlowicz Date: Sat, 29 Nov 2014 23:01:08 +0000 Subject: [PATCH] Fixes #373 - background merging is entirely handled by shorthand compactor. --- History.md | 1 + lib/properties/optimizer.js | 6 ------ test/integration-test.js | 3 ++- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/History.md b/History.md index 8fb2b5d2..68cc3939 100644 --- a/History.md +++ b/History.md @@ -21,6 +21,7 @@ * Fixed issue [#352](https://github.com/GoalSmashers/clean-css/issues/352) - honors rebasing in imported stylesheets. * Fixed issue [#360](https://github.com/GoalSmashers/clean-css/issues/360) - adds 7 extra CSS colors. * Fixed issue [#363](https://github.com/GoalSmashers/clean-css/issues/363) - `rem` units overriding `px`. +* Fixed issue [#373](https://github.com/GoalSmashers/clean-css/issues/373) - proper background shorthand merging. * Fixed issue [#395](https://github.com/GoalSmashers/clean-css/issues/395) - unescaped brackets in data URIs. [2.2.19 / 2014-11-20](https://github.com/jakubpawlowicz/clean-css/compare/v2.2.18...v2.2.19) diff --git a/lib/properties/optimizer.js b/lib/properties/optimizer.js index 12926a36..ad71fecd 100644 --- a/lib/properties/optimizer.js +++ b/lib/properties/optimizer.js @@ -39,14 +39,8 @@ module.exports = function Optimizer(options, context) { '-webkit-animation-name': ['-webkit-animation'], '-webkit-animation-play-state': ['-webkit-animation'], '-webkit-animation-timing-function': ['-webkit-animation'], - 'background-attachment': ['background'], 'background-clip': ['background'], - 'background-color': ['background'], - 'background-image': ['background'], 'background-origin': ['background'], - 'background-position': ['background'], - 'background-repeat': ['background'], - 'background-size': ['background'], 'border-color': ['border'], 'border-style': ['border'], 'border-width': ['border'], diff --git a/test/integration-test.js b/test/integration-test.js index 2900936a..556f6223 100644 --- a/test/integration-test.js +++ b/test/integration-test.js @@ -2235,7 +2235,8 @@ title']{display:block}", 'plain component to shorthand': [ 'a{background:url(bg.png) #000;background-color:#fff}', 'a{background:url(bg.png) #fff}' - ] + ], + 'merging rgba with standard colors': 'div{background-color:red;background:rgba(1,2,3,.5)}' }, { compatibility: 'ie8' }), 'viewport units': cssContext({ 'shorthand margin with viewport width not changed': 'div{margin:5vw}' -- 2.34.1