This project has moved. For the latest updates, please go here.

Include custom css without overriding branding.css

Nov 11, 2013 at 1:48 PM

I'm generating HTML Help documentation with SHFB. I'm not so happy with the default look, but I don't want to write a complete new presentation style. So I'm looking for a way to easily include a custom css file to override the default styles. I can overwrite the branding.css, but that's hard to maintain on future changes. Is there a better way?

Kind regards
Nov 11, 2013 at 5:16 PM
SHFB supports overriding stock content on a project by project basis. Include a copy of the file to replace in a like-named folder. Add a styles\ folder to your project, place your modified copy of branding.css in it, and set the file's BuildAction property to Content. When built, your copy of the file will replace the default copy from the presentation style. This is covered in the Replacing Stock Content topic in the help file.

If you want to use it from all of your projects, you could just clone the presentation style, give it a new name, and replace the branding.css file. Maintaining it would be a matter of using a diff tool to merge changes from future releases into your custom presentation style.

Nov 12, 2013 at 7:02 AM
Ok I thought there would be another possibility by resource items or any other magic variable to include another css file. Maintaining the diff is only my second preferred option.