[3.1.8 / 2015-xx-xx](https://github.com/jakubpawlowicz/clean-css/compare/v3.1.7...3.1)
==================
+* Fixes issue [#499](https://github.com/jakubpawlowicz/clean-css/issues/499) - too aggressive `-` removal.
* Fixes issue [#498](https://github.com/jakubpawlowicz/clean-css/issues/498) - reordering and flexbox.
[3.1.7 / 2015-03-16](https://github.com/jakubpawlowicz/clean-css/compare/v3.1.6...v3.1.7)
if (value.indexOf('0') == -1)
return value;
+ if (value.indexOf('-') > -1) {
+ value = value
+ .replace(/([^\w\d\-]|^)\-0([^\.]|$)/g, '$10$2')
+ .replace(/([^\w\d\-]|^)\-0([^\.]|$)/g, '$10$2');
+ }
+
return value
- .replace(/\-0$/g, '0')
- .replace(/\-0([^\.])/g, '0$1')
.replace(/(^|\s)0+([1-9])/g, '$1$2')
.replace(/(^|\D)\.0+(\D|$)/g, '$10$2')
.replace(/(^|\D)\.0+(\D|$)/g, '$10$2')
'a{margin:-0px}',
['margin:0']
],
+ '-0% to 0': [
+ 'a{width:-0%}',
+ ['width:0']
+ ],
'missing': [
'a{opacity:1.}',
['opacity:1']
'a{margin:-0.5em}',
['margin:-.5em']
],
+ 'inside names #1': [
+ 'div{animation-name:test-0-bounce}',
+ ['animation-name:test-0-bounce']
+ ],
+ 'inside names #2': [
+ 'div{animation-name:test-0bounce}',
+ ['animation-name:test-0bounce']
+ ],
+ 'inside names #3': [
+ 'div{animation-name:test-0px}',
+ ['animation-name:test-0px']
+ ],
'strips leading from value': [
'a{padding:010px 0015px}',
['padding:10px 15px']