/*************************** RGBA Background Colours ***************************/ .rgba(@r, @g, @b, @alpha) { @colour: rgb(@r, @g, @b); @alphaColour: hsla(hue(@colour), saturation(@colour), lightness(@colour), @alpha); @alphaColour: rgba(@r, @g, @b, @alpha); @ieAlphaColour: argb(@alphaColour); background-color: @colour; // Fallback for older browsers // This will be ignored by browsers that don't support it. background-color: @alphaColour; // OldIE hacks .lt-ie9 & { //assumes you have conditional commented tags zoom: 1; // hasLayout background-color: transparent; -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=@{ieAlphaColour}, endColorstr=@{ieAlphaColour})"; // IE 8+ filter: ~"progid:DXImageTransform.Microsoft.gradient(startColorstr=@{ieAlphaColour}, endColorstr=@{ieAlphaColour})"; // IE 6 & 7 } }