Fixes #373 - background merging is entirely handled by shorthand compactor.
authorJakub Pawlowicz <contact@jakubpawlowicz.com>
Sat, 29 Nov 2014 23:01:08 +0000 (23:01 +0000)
committerJakub Pawlowicz <contact@jakubpawlowicz.com>
Wed, 10 Dec 2014 20:17:35 +0000 (20:17 +0000)
History.md
lib/properties/optimizer.js
test/integration-test.js

index 8fb2b5d..68cc393 100644 (file)
@@ -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)
index 12926a3..ad71fec 100644 (file)
@@ -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'],
index 2900936..556f622 100644 (file)
@@ -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}'