[2.1.0 / 2013-xx-xx (UNRELEASED)](https://github.com/GoalSmashers/clean-css/compare/v2.0.0...HEAD)
==================
+* Fixed issue [#163](https://github.com/GoalSmashers/clean-css/issues/163) - round pixels to 2nd decimal place.
* Fixed issue [#165](https://github.com/GoalSmashers/clean-css/issues/165) - extra space after trailing parenthesis.
[2.0.1 / 2013-11-14](https://github.com/GoalSmashers/clean-css/compare/v2.0.0...v2.0.1)
replace(/(\s|:|,)0(?:px|em|ex|cm|mm|in|pt|pc|%)/g, '$1' + '0');
replace(/rect\(0(?:px|em|ex|cm|mm|in|pt|pc|%)/g, 'rect(0');
+ // round pixels to 2nd decimal place
+ replace(/\.(\d{3,})px/g, function(match, decimalPlaces) {
+ return '.' + Math.round(parseFloat('.' + decimalPlaces) * 100) + 'px';
+ });
+
// fraction zeros removal
replace(/\.([1-9]*)0+(\D)/g, function(match, nonZeroPart, suffix) {
return (nonZeroPart ? '.' : '') + nonZeroPart + suffix;
'strip fraction zeros': [
'div{margin:1.000em 2.00em 3.100em 4.01em}',
'div{margin:1em 2em 3.1em 4.01em}'
- ]
+ ],
+ 'round pixels up to 2nd decimal place': [
+ 'div{transform:translateY(-418.505123px)}',
+ 'div{transform:translateY(-418.51px)}'
+ ],
+ 'round pixels down to 2nd decimal place': [
+ 'div{transform:translateY(0.504123px)}',
+ 'div{transform:translateY(0.5px)}'
+ ],
+ 'do not round 2nd decimal place pixels': 'div{transform:translateY(20.55px)}',
+ 'do not round percentages': 'div{left:20.505%}',
+ 'do not round ems': 'div{font-size:1.505em}'
}),
'colors': cssContext({
'shorten rgb to standard hexadecimal format': [