tdewolff / minify

Go minifiers for web formats
https://go.tacodewolff.nl/minify
MIT License
3.71k stars 218 forks source link

CSS issue - background-color: transparent changes to background-color: initial #394

Closed coliff closed 3 years ago

coliff commented 3 years ago

Hey there. I noticed what I think is a bug. Bootstrap 5 has a .bg-transparent class which has the properties:

background-color: transparent !important;

However, minify (via Hugo v80.0) changes this to:

background-color:initial!important

background-color: initial isn't supported by Internet Explorer 11. IE11 still has approx 2% desktop browser marketshare so I don't think minify should make breaking changes to CSS for IE users.

tdewolff commented 3 years ago

Thanks, this should be fixed using the KeepCSS2 option!