Customizing Styles
To customize the styles, create a new folder styles
on the root of the project and a file for each output style that you want to change.
Type | File |
---|---|
website |
styles/website.css |
pdf |
styles/pdf.css |
epub |
styles/epub.css |
mobi |
styles/mobi.css |
pdf, epub, mobi |
styles/ebook.css |
Assign the styles created in book.json
.
{
"styles": {
"website": "styles/website.css",
"ebook": "styles/ebook.css",
"pdf": "styles/pdf.css",
"mobi": "styles/mobi.css",
"epub": "styles/epub.css"
}
}
Multi-languages
When working with multiple languages it's necessary to set the styles in book.json
inside language specific folder.
CSS pre-processors
There are plugins to work with CSS pre-processors:
Example
A custom style for a website styles/website.css:
.book.font-family-1 {
font-family: "Trebuchet MS", Helvetica, sans-serif;
}
.book-summary ul.summary li a:hover {
background-color: darkorange;
}
.book-summary ul.summary li.active>a {
font-weight: bold;
color: black;
}