==================
* Fixed issue [#551](https://github.com/jakubpawlowicz/clean-css/issues/551) - edge case in restructuring.
+* Fixed issue [#553](https://github.com/jakubpawlowicz/clean-css/issues/553) - another style of SVG fallback.
* Fixed issue [#558](https://github.com/jakubpawlowicz/clean-css/issues/558) - units in same selector merging.
[3.2.6 / 2015-04-28](https://github.com/jakubpawlowicz/clean-css/compare/v3.2.5...v3.2.6)
(left.name == 'background' || left.name == 'background-image') &&
right.multiplex &&
(right.name == 'background' || right.name == 'background-image') &&
- right.value[right.value.length - 1][0] == 'none';
+ anyLayerIsNone(right.value);
+}
+
+function anyLayerIsNone(values) {
+ var layers = intoLayers(values);
+
+ for (var i = 0, l = layers.length; i < l; i++) {
+ if (layers[i].length == 1 && layers[i][0][0] == 'none')
+ return true;
+ }
+
+ return false;
+}
+
+function intoLayers(values) {
+ var layers = [];
+
+ for (var i = 0, layer = [], l = values.length; i < l; i++) {
+ var value = values[i];
+ if (value[0] == MULTIPLEX_SEPARATOR) {
+ layers.push(layer);
+ layer = [];
+ } else {
+ layer.push(value);
+ }
+ }
+
+ layers.push(layer);
+ return layers;
}
function compactOverrides(properties, compatibility, validator) {
}
},
'background then background - svg hack': {
- 'topic': 'p{background:__ESCAPED_URL_CLEAN_CSS0__;background: __ESCAPED_URL_CLEAN_CSS1__,none}',
+ 'topic': 'p{background:__ESCAPED_URL_CLEAN_CSS0__;background:__ESCAPED_URL_CLEAN_CSS1__,none}',
'into': function (topic) {
assert.deepEqual(_optimize(topic), [
[['background', false , false], ['__ESCAPED_URL_CLEAN_CSS0__']],
]);
}
},
+ 'background then background - inverted svg hack': {
+ 'topic': 'p{background:__ESCAPED_URL_CLEAN_CSS0__;background:none,__ESCAPED_URL_CLEAN_CSS1__}',
+ 'into': function (topic) {
+ assert.deepEqual(_optimize(topic), [
+ [['background', false , false], ['__ESCAPED_URL_CLEAN_CSS0__']],
+ [['background', false , false], ['0 0'], [','], ['__ESCAPED_URL_CLEAN_CSS1__']]
+ ]);
+ }
+ },
'background-image then background-image - svg hack': {
'topic': 'p{background-image:__ESCAPED_URL_CLEAN_CSS0__;background-image: __ESCAPED_URL_CLEAN_CSS1__,none}',
'into': function (topic) {