Design books
The design of your books is created in CSS stylesheets. These are written in syntaxes called CSS or Sass. Each output format has a dedicated stylesheet:
print-pdf.scssscreen-pdf.scssweb.scssepub.scssapp.scss
Some aspects of design are easy for non-technical users to change. Some advanced design features need to be coded by an experienced CSS developer.
Each project comes with a library of predefined styles. Then each book’s styles can build on or override the predefined project styles.
By default, you cannot edit the project’s predefined styles in the Electric Book Manager.
Technical note: files that non-technical users need not see in the EBM, such as advanced technical files, are hidden by adding them to the
ignorelist in/_prose.yml. These are hidden in the EBM withdisplay: none; so they can be revealed by turning offdisplay: nonewith a browser’s Inspect tools.
To edit a book’s styles:
- From the editor, click on the
.scssfile for the output format that you want to edit. For example, for print-PDF styles for thebookdirectory, editbook/styles/print-pdf.scss. - Many of a book’s design features are set as variables, which start with
$signs. E.g.$page-width. Change the values you see there for each variable as needed. For instance, you can easily edit variables that set page size, colours, running heads, and so on. - If you know how to write CSS or Sass, add your own custom CSS at the bottom of the
.scssfile.
Output the relevant format to see how your changes look. If the output fails, you may have used invalid CSS or Sass syntax. For more on editing Sass, see sass-lang.com/guide.