SharePoint 2013 theme engine issue applying selection background color.
-
10-12-2019 - |
Question
In our SharePoint 2013 site we have custom theme aware CSS, most of which is working fine across browsers (IE8/9/10, Safari and Firefox) but in case of
/* [ReplaceColor(themeColor:"SelectionBackground")] */ background-color:rgba( 156,206,240,0.5 )
IE8 is not rendering the background style to the style sheet and hence no background color on selection is applied.
Can some one please suggest possible cause/resolution to this issue.
PS - I m new to SharePoint 2013 theme engine.
Solution
I don't have a virtual machine with IE 8 at my disposal right now, but according to http://caniuse.com/css3-colors IE 8 does not support RGBa color values. Looks like you have to resort to a HEX value for IE 8 and below.
UPDATE ** To get something going in IE 8, you could use the MSFT opacity filter like this:
body
{
/* [ReplaceColor(themeColor:"SelectionBackground")] */ background-color:rgb( 156,206,240)
filter: alpha(opacity=50);
-ms-filter: alpha(opacity=50);
}
It will be ignored by all modern browsers (including IE 9 & 10) except IE 8 and below.