galan / packtag

A JSP Taglib for delivering minified, combined and gzip-compressed resources (JavaScript and CSS).
Apache License 2.0
24 stars 13 forks source link

CSS feature calc(... not working #11

Closed waldhow closed 7 years ago

waldhow commented 7 years ago

The calc() feature renders badly, which will lead to error in css file and calc will not be processed.

Without packtag: width: calc(100% - (294px + (16px)));

With Packtag (no space after -): width: calc(100% -(294px + (16px)));

waldhow commented 7 years ago

From https://developer.mozilla.org/en-US/docs/Web/CSS/calc :

The + and - operators must always be surrounded by whitespace. The operand of calc(50% -8px) for instance will be parsed as a percentage followed by a negative length, an invalid expression, while the operand of calc(50% - 8px) is a percentage followed by a minus sign and a length. Even further, calc(8px + -50%) is treated as a length followed by a plus sign and a negative percentage. The * and / operators do not require whitespace, but adding it for consistency is allowed, and recommended.

galan commented 7 years ago

All I can say is to try a different CSS pack strategy. I'm not working on the implementations, which are only integrated, and not developed by myself.