Creating custom CSS for a book Using Drupal 7 and creating a number of books with the Books module. They each have their own specific design, so specific CSS needed per book. I know I could create specific content types for each book but I think that would become unmanageable as the number of books grow. 
We are using the Code Per Node module, we could make use of the Context module to detect which book it is, and then insert a block somewhere on the page with some associated CSS. In theory that would work but is there a better way to do this?
In Drupal 7, you can add a CSS class to the &lt;body&gt; tag for your book. For nodes, you have the class added by default. For example page-node-2056, for the /node/2056 path.

For Book nodes, you might add the book ID inside your template.php theme file, in the theme_preprocess_html function:

function MYTHEME_preprocess_html(&amp;$vars) {
  // If on an individual node page, add the book ID to body classes.
  if ($node = menu_get_object()) {
    if (isset($node-&gt;book['bid'])) {
      $vars['classes_array'][] = drupal_html_class('book-id-' . $node-&gt;book['bid']);
    }
  }
}


You can then take the ID for each book and add all the style definitions in a single CSS file. Something like the following:

.book-id-xxx {
  /* Style for book xxx. */
}
.book-id-yyy {
  /* Syle for book yyy. */
}
... and so on


Would it make sense for what you need?