We are creating a SharePoint 2013 based solution which comes with a custom master page, which for example defines navigation elements, which are not available in the standard master page. This solution needs to work with composed looks. This means that users (i.e. admins or developers) should be able to change the look of SharePoint by selecting/applying a different composed look. Apart from our own composed look, these looks need to be created by our partners/customers.
As we all know, the .spcolor file defines the colors which are replaced in the themable CSS files once a look is applied. This is ok and it works fine with our own color palette.
The problem however is, explaining other developers how to create a composed look for our solution, as the color slots (defined in the .spcolor file) often do not have speaking names, i.e. do not match the exact way/place we use them. For example when they are applied to our own, specific elements. Another problem is that if we test our look with the different standard .spcolor files defined by Microsoft, it often looks more or less ok, but it never looks great in all places.
I now see two possibilities how this can be done:
- Either we stick with the standard SharePoint color slots defined in the regular .spcolor files (e.g. "TopBarBackground") and somehow try to make the best out of these available slots.
- Or we define our own color slots (e.g. "MyActionWebPartBackground") and use those in our CSS file. If you are asking yourself, if it is possible to create your own color slots, then the answer is yes, I have tested it. ;)
The first approach has the advantage that we are "compatible" with all the existing .spcolor files. Even though I have my doubts that everything is really compatible – e.g. that we can be sure there is no black text on a black background for example. This would lead to partners/customers needing to overwrite some colors in their own CSS file. And this is not the idea of composed looks..
The second approach however will not be compatible, but it will be much easier to create a look which actually looks right everywhere, as we can then create slots with a speaking name, where ever we need it. Then only looks (i.e. .spcolor files) created specifically for our solution would work, but at least they will be easier to create and it would be more transparent, which replacement is used in which place.
The question now is what would you recommend? Or what does Microsoft recommend? I couldn’t find anything in the internet discussing these different approaches.. Is there anybody out there with any experience on this? Thanks in advance for your thoughts.