twitter/bootstrap — Issue #2409: translucent background IE7/IE8
Author: Barryvdh
Created: 2012-03-05 15:46:49+00:00
State: open

translucent backgrounds are not supported in IE7/IE8, but are possible with filters. Maybe it is possible to create a mixin, with a fallback for IE7/IE8 (instead of choosing a solid rgb value, close to the result.

I modified the translucent background mixin. This works in lessPHP because of the rgbahex function, but I don't know if this works with the official version:

.background(@color: @white, @alpha: 1){
@rgbaColor: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
@ieColor: rgbahex(@rgbaColor);
background-color: transparent;
background-color: @rgbaColor;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d')",@ieColor,@ieColor));
zoom: 1;
}

Is there an alternative to this? It looks like a nice addition to the #transluc