AEM 6.1 Calc function in css is also minified in YUI compressor 2.4.8 | Community
Skip to main content
September 21, 2016

AEM 6.1 Calc function in css is also minified in YUI compressor 2.4.8

  • September 21, 2016
  • 2 replies
  • 2336 views

Environment : AEM 6.1

Issue : While minifying css, the calc function is also minified.

Ex: if i have width:calc(100% - 30px) is minified to width:calc(100%-30px) which is invalid in css and it does not work as expected.

Workaround :   AEM 6.1(granite UI) uses latest YUI compressor which is 2.4.8. 

YUI compressor 2.4.8  does not have a check not to minify calc function.

So we might have to change YUI compressor to accommodate these changes

Clone https://github.com/yui/yuicompressor.git

Add https://github.com/yui/yuicompressor/pull/245 change to it

Build yuicompressor and update granite UI bundle with the new yuicompressor jar file, This fixes my calc minifying issue.

Do we have any other approach to fix this issue ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Adobe Employee
September 23, 2016
kautuk_sahni
Community Manager
Community Manager
September 27, 2016