SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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" :)

share|improve this question
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?) – Ruben Herman Oct 25 '11 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 Oct 25 '11 at 9:33
try 6hex instead of 3hex. Maybe SharePoint theming engine isn't used to reading 3hex color values – Mike Nov 17 '11 at 16:10

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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