Improved CSS Customization in Pressbooks

If you use custom CSS in Pressbooks, we’re making the experience better for you!

You will now be able to add custom styles to your book without needing to inherit, search and edit the entire stylesheet for your theme, making things easier and more reliable over the long term.

This improvement will:

  • Make it easier for you to see and keep track of any changes you make (so you don’t accidentally override prior customizations or break everything mysteriously!)
  • Ensure your book benefits from all the bug fixes and improvements we make to our themes (the old way of handling customisation meant some books did not benefit from these, which could cause problems over time.)
  • Allow you to use the Cover Generator tool without switching themes

To access the new custom styles feature, go to “Appearance” → “Custom Styles” on the lefthand menu in your book’s editing interface. You can read the full instructions on how to use the new feature in our guide.

What if I’ve already edited the CSS on my book(s)?

If you have modified the CSS for an existing book using the Pressbooks Custom CSS theme, don’t worry, you will NOT be affected by this change. You can leave everything as is on your book(s) indefinitely.

However, we are retiring the Custom CSS theme as of October 18, 2017. This means that after that date:

  1. Any new books will use the new Custom Styles feature for any custom changes
  2. If you have an existing book using the Custom CSS theme and need to switch themes for any reason, you will need to save your CSS first! Once you change the theme on your book, you won’t be able to return to the Custom CSS theme and will lose your changes.

If you do find yourself needing to change your theme, follow these steps to retain your changes:

  1. Go to “Edit CSS” and copy the stylesheet for any of the formats where you (or a Pressbooks support person) have made changes from the original theme
  2. Paste the stylesheet(s) into a text editor (e.g. Notepad, MS Word etc.)
  3. Change your theme
  4. Go to “Appearance” → “Custom Styles”
  5. Enter the sections of your previous stylesheet that you had changed in the “Your Styles” section
  6. Save and export your files!

With the Custom Styles option, you get better control over your book’s appearance across export formats and also benefit from the periodic enhancements that we make to our themes!

Want to test out the new feature? Read more in our guide, and let us know what you think.

Linkedin