* Fixed issue [#448](https://github.com/jakubpawlowicz/clean-css/issues/448) - rebasing no protocol URIs.
* Fixed issue [#517](https://github.com/jakubpawlowicz/clean-css/issues/517) - turning off color optimizations.
* Fixed issue [#542](https://github.com/jakubpawlowicz/clean-css/issues/542) - space after closing brace in IE.
+* Fixed issue [#563](https://github.com/jakubpawlowicz/clean-css/issues/563) - `background:inherit` restoring.
* Fixed issue [#574](https://github.com/jakubpawlowicz/clean-css/issues/574) - rewriting internal URLs.
* Fixed issue [#575](https://github.com/jakubpawlowicz/clean-css/issues/575) - missing directory as a `target`.
var shallowClone = require('./clone').shallow;
var MULTIPLEX_SEPARATOR = ',';
+var SIZE_POSITION_SEPARATOR = '/';
function background(property, compactable, lastInMultiplex) {
var components = property.components;
restoreValue(positionComponent);
} else if (needsBoth) {
restoreValue(component);
- restored.unshift(['/']);
+ restored.unshift([SIZE_POSITION_SEPARATOR]);
restoreValue(positionComponent);
} else if (positionComponent.value.length == 1) {
restoreValue(positionComponent);
if (restored.length === 0)
restored.push([compactable[property.name].defaultValue]);
+ if (_isInheritBackground(restored))
+ return [restored[0]];
+
return restored;
}
+function _isInheritBackground(values) {
+ for (var i = 0, l = values.length; i < l; i++) {
+ var value = values[i][0];
+
+ if (value != 'inherit' && value != MULTIPLEX_SEPARATOR && value != SIZE_POSITION_SEPARATOR)
+ return false;
+ }
+
+ return true;
+}
+
function borderRadius(property, compactable) {
if (property.multiplex) {
var horizontal = shallowClone(property);
[['padding-right', false, 'underscore'], ['2px']]
]);
}
+ },
+ 'just inherit': {
+ 'topic': 'a{background:inherit}',
+ 'into': function (topic) {
+ assert.deepEqual(_optimize(topic), [
+ [['background', false, false], ['inherit']]
+ ]);
+ }
}
})
.addBatch({