My Updated CSS StyleSheet for eBook Creation

There’s a dozen and a half different ways to create stylesheets for eBooks.  Some are better than others overall, some have strengths and weaknesses.

I’m presenting mine here (updated, and with additional comments throughout) because of three reasons:

1.  It illustrates how to embed a font.
2.  It has a minimal amount of cascading.1  While cascading is useful, it also adds a level of complexity to keeping track of which style(s) apply to which things.  KISS;  it should be obvious at a glance which style (or at most, two) apply to any character in the text.
3.  It is damn-near failsafe.  I’ve yet to run across an eReader that can’t handle the basic elements that are covered in this stylesheet – and when it has to fall back to a simpler method, it does gracefully.

You can find the stylesheet by itself here, or at this GitHub repository if you want to look at my other “helper” script (in bash) and tools I’m using for ePub creation.

I hope it provides a useful object for you to study and learn from in your own eBook creation

1 Okay, so for example, you could define a style for the body of the text, additional modifications for paragraphs within the body of the text, and additional modifications that only come into play if it’s the first paragraph within the body of the text, and additional ones if it’s the first five characters in that first paragraph. And they’d all apply automatically, which is great… until something borks somewhere, and then I have a hard time tracking down where the problem is. That’s me, though. YMMV.

Popular posts:

  • If there's one Nazi (or a racist) at the table...
  • Word Porn Quotes
  • Bash string padding with SED
  • SOLVED: Command line BPM (beats per minute) Analysis in Linux
  • The difference between boundaries and rules
  • The fundamental existential crisis at the heart of American conservatism.
  • Whole house audio, easily, freely, for Linux and MacOSX using SnapCast

One Comment

  1. December 15, 2017

    Wow very helpful article. Wish I had of found this when you posted it. I just got done finishing my first novel manuscript myself. Needs a lot of work . Hope your work has been fruitful!!!

Comments are closed.