lessphp icon indicating copy to clipboard operation
lessphp copied to clipboard

Converting hex color to short notation problem.

Open koojunho opened this issue 14 years ago • 4 comments

https://github.com/leafo/lessphp/commit/fbfcf7a344d86d7d0ae1db5b45710b0e3934de9d

This always converts hex colors. It generates this kind of codes.

filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#444', endColorstr='#555', GradientType=0);

It's not working on my IE. How can I turn off hex color compression?

Very thanks.

koojunho avatar Jun 16 '12 18:06 koojunho

I'm adding a +1 to this, as a temporary fix I've just commented out the whole of that commit's addition:

// Converting hex color to short notation (e.g. #003399 to #039) 
/*if ($h[1] === $h[2] && $h[3] === $h[4] && $h[5] === $h[6]) {
    $h = '#' . $h[1] . $h[3] . $h[5];
}*/

Not ideal but does the job.

adamdodev avatar Jul 02 '12 12:07 adamdodev

Am having the same issue as well, short notation for CSS3 gradients filter don't work with IE.

ktleow avatar Jul 12 '12 02:07 ktleow

Having the same issue, i also commented the code. Should be better to enable/disable this

e-belair avatar Jul 29 '12 10:07 e-belair

This has been removed by default. It can be enabled by customizing the formatter.

leafo avatar Aug 06 '12 19:08 leafo