ded / sqwish

a node-based CSS compressor
200 stars 13 forks source link

convert from longhand hex to shorthand hex breaks ie dxgradients convert longhand hex to shorthand hex color conversion #aabbcc to #abc breaks DXFilter #8

Open shepik opened 12 years ago

shepik commented 12 years ago

filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e6e6e6',endColorstr='#ffffff',GradientType=0 ) This line is broken if "ffffff" is replaced by "fff" (and fff is for some strange reason interpreted as #000000, so instead of white you have black) Affected browsers: ie9, ie8, ie7

antris commented 12 years ago

I can take a look at this.

heynemann commented 12 years ago

Pull request #14 fixes that.

fizker commented 11 years ago

Pull request #14 does actually not fix this, it only applies to gradient-hexes with 8 digits (including alpha channel). It is perfectly valid to only use 6 digits as well.

Try require('sqwish').minify("body{filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#EEEEEE', EndColorStr='#ffffff');}")) in the current version (4d7eca23ff41) to test it.