Default CSS

Overview

Steelkilt includes a CSS Template that contains some minimal CSS to control basic EPUB formatting.

The CSS Template is used as a basis for /Package/XHTML/Style/book.css, which is created and linked to various XHTML Resources during EPUB Generation.

The CSS classes that appear in the CSS Template are included in HTML tags related to the following:

  • EPUB Navigation Document titles, ordered lists and list items
  • Book title page titles
  • Part title page titles
  • Images in Book and Part title pages
  • Document and Chapter titles

Customizing CSS

You can customize the default CSS.

Two levels of customization are available:

  • Edit the CSS Template to change the formatting of all Books subsequently created with Steelkilt on your device
  • Edit book.css to limit your customizations to a single Book

Default CSS Classes

Below is a list of the default CSS classes and their usage.

ClassWhereApplies To
h1.toc-book-title/Package/XHTML/nav.xhtmlThe <h1> Book title above the navigation entries.
ol.toc-list-level-1/Package/XHTML/nav.xhtmlThe Level 1 navigation list (<ol>) that contains entries for Documents, Parts, and Chapters in Books without Parts.

The purpose of this class is to disable ordered list numbering, which is not appropriate given that Documents are not numbered and Chapters and Parts can include automatically generated numbers in their nav.xhtml titles.

Use only for other purposes if you have advanced/specific requirements.
li.toc-list-item-level-1/Package/XHTML/nav.xhtmlThe purpose of this class is to allow Level 1 navigation list item (<li>) styling.
a.toc-list-link-level-1/Package/XHTML/nav.xhtmlThe purpose of this class is to allow Level 1 navigation list item link (<a>) styling.
a.toc-part-title/Package/XHTML/nav.xhtmlThe purpose of this class is to allow additional Level 1 navigation list item link (<a>) styling for Parts only.

By default, this style makes links that represent Part title pages bolder.
ol.toc-list-level-2/Package/XHTML/nav.xhtmlThe Level 2 navigation list (<ol>) contains entries for Documents and Chapters contained within Parts.

The purpose of this class is to disable ordered list numbering. See the ol.toc-list-level-1 notes for more information.
li.toc-list-item-level-2/Package/XHTML/nav.xhtmlThe purpose of this class is to allow Level 2 navigation list item (<li>) styling.
a.toc-list-link-level-2/Package/XHTML/nav.xhtmlThe purpose of this class is to allow Level 2 navigation list item link (<a>) styling.
h1.book-title/Package/XHTML/title.xhtmlCenters the <h1> Book title by default.

Add further customizations where necessary.
h1.author-name/Package/XHTML/title.xhtmlCenters the <h1> Book creator’s name.

Add further customizations where necessary.
h2.part-numberXHTML Resources representing Parts in /Package/XHTML/Centers Part numbers (when displayed individually) and provides some basic styling by default.

Not used when a single-line Part title format is used, such as Part Number – Part Name.

Add further customizations where necessary.
h2.part-titleXHTML Resources representing Parts in /Package/XHTML/Centers Part titles (when displayed with or without an included Part number, such as Part Number – Part Name) and provides some basic styling by default.

Add further customizations where necessary.
img.centered/Package/XHTML/title.xhtml (if a Book cover image is added to Book Settings)

XHTML Resources representing parts in /Package/XHTML/ (if an image is associated with a Part in Part Settings)
Centers images by default.

h2.chapter-numberXHTML Resources representing Chapters in /Package/XHTML/Centers Chapter numbers (when displayed individually) and provides some basic styling by default.

Not used in Documents.

Not used when a single-line Chapter title format is used, such as Chapter Number – Chapter Name.

Add further customizations where necessary.
h2.chapter-titleXHTML Resources representing Documents and Chapters in /Package/XHTML/Centers Document and Chapter titles (when displayed with or without an included Chapter number, such as Chapter Number – Chapter Name) and provides some basic styling by default.

Add further customizations where necessary.

Related Concepts