I have added the following to one of my themable CSS files, which has been working absolutely fine until now:

.ICS_footer_side a:hover{
/* [ReplaceColor(themeColor:"Light2")] */ background:#ddd;

This rule is not being applied, and I've just figured out why: the corresponding themed output is:

.ICS_footer_side a:hover{

As I said, the rest of the file is working fine, including several similar rules.

I've got quite good at using ILSpy to inspect SharePoint code and find out why it's doing something weird and work around it; does anyone know where I can find the theming code to do so in this case?

Update: I can work around this by putting a dummy entry abouve the background attribute. I've also found the code involved and it's pretty opaque. (See Microsoft.SharePoint.Utilities.ThemingParser, I think.)

Thus maybe the question should be "why is this happening" rather than "where is this happening so I can figure out why for myself" :)

  • Is this a style that's overwritten by another one (maybe in another stylesheet)? What browser are you using? Is this the same for all browsers? (remove comment?) Commented Oct 25, 2011 at 9:23
  • This replacement is happening on the server side. The second code block above is the literal content of the CSS file sent to the client.
    – Rawling
    Commented Oct 25, 2011 at 9:33
  • try 6hex instead of 3hex. Maybe SharePoint theming engine isn't used to reading 3hex color values
    – Mike
    Commented Nov 17, 2011 at 16:10

1 Answer 1


I would suggest that this is caused by the use of the potentially ambiguous shorthand attribute 'background', instead of full 'background-color' property. If I remember rightly, the CSS preprocessor used to replace the colours is not capable of dealing with shorthand syntax correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.