-[3.1.0 / 2015-xx-xx](https://github.com/jakubpawlowicz/clean-css/compare/v3.0.3...v3.1.0)
+[3.1.0 / 2015-xx-xx](https://github.com/jakubpawlowicz/clean-css/compare/v3.0.4...v3.1.0)
==================
* Adds 0deg to 0 minification where possible.
* Fixed issue [#182](https://github.com/GoalSmashers/clean-css/issues/182) - removing space after closing brace.
* Fixed issue [#357](https://github.com/GoalSmashers/clean-css/issues/357) - non-standard but valid URLs.
+[3.0.4 / 2015-xx-xx](https://github.com/jakubpawlowicz/clean-css/compare/v3.0.3...v3.0.4)
+==================
+
+* Fixed issue [#314](https://github.com/GoalSmashers/clean-css/issues/314) - spaces inside calc.
+
[3.0.3 / 2015-01-07](https://github.com/jakubpawlowicz/clean-css/compare/v3.0.2...v3.0.3)
==================
var isSpecial;
var wasSpecial;
var current;
+ var secondToLast;
var wasCloseParenthesis;
var isEscape;
var token;
isSpecial = current === ':' || current === '[' || current === ']' || current === ',' || current === '(' || current === ')';
if (wasWhitespace && isSpecial) {
- buffer.pop();
+ secondToLast = buffer[buffer.length - 2];
+ if (secondToLast != '+' && secondToLast != '-' && secondToLast != '/' && secondToLast != '*')
+ buffer.pop();
buffer.push(current);
} else if (isWhitespace && wasSpecial && !wasCloseParenthesis) {
} else if (isWhitespace && !wasWhitespace && buffer.length > 0) {
'div{height:-moz-calc(3 * 2em + 10px)}',
'div{height:-moz-calc(3 * 2em + 10px)}'
],
+ 'not inside calc method with brackets': [
+ 'body{margin-left:calc(50vw + (1024px/2))}',
+ 'body{margin-left:calc(50vw + (1024px/2))}'
+ ],
'before colon': [
'#test{padding-left :0}',
'#test{padding-left:0}'