c9s / c6

Compile SASS Faster ! C6 is a SASS-compatible compiler
Other
431 stars 27 forks source link

calc() expression reducer #10

Open c9s opened 9 years ago

c9s commented 9 years ago

While SASS is interpreing this as it is:

$some: 22;
width: calc(100% - 10px + 20px + $some);

We can reduce the expression if they are the same unit to:

width: calc(100% + 10px + 22);
c9s commented 9 years ago

Add FunctionCall.IsLiteral() method to check if we need to present the function call as literal string.