sqwish icon indicating copy to clipboard operation
sqwish copied to clipboard

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

Open shepik opened this issue 13 years ago • 3 comments

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

shepik avatar Feb 26 '12 15:02 shepik

I can take a look at this.

antris avatar Jul 23 '12 06:07 antris

Pull request #14 fixes that.

heynemann avatar Oct 18 '12 13:10 heynemann

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.

fizker avatar Dec 28 '12 13:12 fizker