* Fixed issue [#161](https://github.com/GoalSmashers/clean-css/issues/161) - improves tokenizer performance.
* 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.
+* Fixed issue [#186](https://github.com/GoalSmashers/clean-css/issues/186) - strip unit from 0rem.
[2.0.2 / 2013-11-18](https://github.com/GoalSmashers/clean-css/compare/v2.0.1...v2.0.2)
==================
});
// zero + unit to zero
- 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');
+ var units = ['px', 'em', 'ex', 'cm', 'mm', 'in', 'pt', 'pc', '%'];
+ if ('ie8' != options.compatibility)
+ units.push('rem');
+
+ replace(new RegExp('(\\s|:|,)0(?:' + units.join('|') + ')', 'g'), '$1' + '0');
+ replace(new RegExp('rect\\(0(?:' + units.join('|') + ')', 'g'), 'rect(0');
// round pixels to 2nd decimal place
replace(/\.(\d{3,})px/g, function(match, decimalPlaces) {
'a{box-shadow:0 0 0 0}',
'a{box-shadow:0 0}'
],
+ 'rems': [
+ 'div{width:0rem;height:0rem}',
+ 'div{width:0;height:0}'
+ ],
'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 values in ie8 compatibility mode': cssContext({
+ 'rems': 'div{width:0rem;height:0rem}'
+ }, { compatibility: 'ie8' }),
+ 'zero values in any other compatibility mode': cssContext({
+ 'rems': [
+ 'div{width:0rem;height:0rem}',
+ 'div{width:0;height:0}'
+ ]
+ }, { compatibility: '*' }),
'shorthands': cssContext({
'padding - same 4 values': [
'div{padding:1px 1px 1px 1px}',