* Fixed issue [#217](https://github.com/GoalSmashers/clean-css/issues/217) - whitespace inside attribute selectors and urls.
* Fixed issue [#218](https://github.com/GoalSmashers/clean-css/issues/218) - `@import` statements cleanup.
* Fixed issue [#220](https://github.com/GoalSmashers/clean-css/issues/220) - selector between comments.
+* Fixed issue [#229](https://github.com/GoalSmashers/clean-css/issues/229) - improved processing of fraction numbers.
[2.0.7 / 2014-01-16](https://github.com/GoalSmashers/clean-css/compare/v2.0.6...v2.0.7)
==================
units.push('rem');
replace(new RegExp('(\\s|:|,)0(?:' + units.join('|') + ')', 'g'), '$1' + '0');
+ replace(new RegExp('(\\s|:|,)(\\d)\\.(\\D)', 'g'), '$1$2$3');
replace(new RegExp('rect\\(0(?:' + units.join('|') + ')', 'g'), 'rect(0');
// zero(s) + value to value
return '.' + Math.round(parseFloat('.' + decimalPlaces) * 100) + 'px';
});
+ // .0 to 0
+ replace(/(\D)\.0+(,|\}|\))/g, '$10$2');
+
// fraction zeros removal
replace(/\.([1-9]*)0+(\D)/g, function(match, nonZeroPart, suffix) {
- return (nonZeroPart ? '.' : '') + nonZeroPart + suffix;
+ return (nonZeroPart.length > 0 ? '.' : '') + nonZeroPart + suffix;
});
// restore % in rgb/rgba and hsl/hsla
'prefixed box shadow zeros': [
'a{-webkit-box-shadow:0 0 0 0; -moz-box-shadow:0 0 0 0}',
'a{-webkit-box-shadow:0 0;-moz-box-shadow:0 0}'
+ ],
+ 'zero as .0 #1': [
+ 'a{color:rgba(0,0,0,.0)}',
+ 'a{color:rgba(0,0,0,0)}'
+ ],
+ 'zero as .0 #2': [
+ 'body{margin:.0}',
+ 'body{margin:0}'
+ ],
+ 'missing #1': [
+ 'body{margin:2.em}',
+ 'body{margin:2em}'
+ ],
+ 'missing #2': [
+ 'p{opacity:1.}',
+ 'p{opacity:1}'
]
}),
'zero values in ie8 compatibility mode': cssContext({