minify-html icon indicating copy to clipboard operation
minify-html copied to clipboard

Minify transform properties breaks animations

Open oscarotero opened this issue 1 year ago • 4 comments

I have the following css code:

@keyframes firecircle {
    0% {
      transform: translateY(0) scale(1);
    }

    100% {
      transform: translateY(-11em) scale(0);
    }
  }

That is minified to:

@keyframes firecircle{0%{transform:matrix(1,0,0,1,0,0)}to{transform:translateY(-11em)scale(0)}}

As you can see, the value in the first step is transformed to a matrix and the animation no longer works.

This happens after updating to the latest version (0.15.0). Before that, I was using 0.11.1 and it worked fine.

oscarotero avatar Jan 15 '24 20:01 oscarotero

Thanks for raising. This is likely due to the migration to lightningcss. Are you able to take a look upstream to see if there's any config or issue related to this? I'll investigate later as well.

wilsonzlin avatar Jan 17 '24 04:01 wilsonzlin

Thanks @wilsonzlin Okay, I can see this issue is already filed in https://github.com/parcel-bundler/lightningcss/issues/288 I hope they fix it soon, or at least allow to customize the behavior.

oscarotero avatar Jan 17 '24 10:01 oscarotero

Thanks for finding the issue, I'll keep track of it.

wilsonzlin avatar Jan 17 '24 11:01 wilsonzlin

Hi. Just want to let you know that this bug seems to be fixed by lightningcss.

oscarotero avatar Jul 10 '24 23:07 oscarotero