When using zero values, YUICompressor assumes that the units of measure are not required, so the YUICompressor will strip them.
But it causes issues in our compressed CSS file as follow:
YUICompressor compressed this:
hsla(0, 0%, 100%, 0)
to this:
hsla(0, 0, 100%, 0)
But by removing the % from the second value for hsla (saturation), YUICompressor generates an invalid css statement.
Is it possible to configure YUICompressor settings to correct this behaviour?
You can configure YUI compressor, although I am not sure if you can explicitly fix your issue.
The compressor can be configured in the OSGi configuration called
Adobe Granite HTML Library Managerthat you can find in/system/console/configMgr. This configuration should contain aJS Processor Default Configsconfiguration, that you can change.But please be aware that this configuration is used for the whole AEM installation. If you want to change settings on the client library level, you can do so in the
.content.xmlwhere you define thecq:ClientLibraryFolderof the client library you want to change the settings.More information on the YUI compressor can be found here:
https://yui.github.io/yuicompressor/
The
--disable-optimizationsmight be what you are looking for.