コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

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

Avatar

Level 1

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 ?

2 返信

Avatar

Employee

Avatar

Administrator