I was able to use my CSS to customize the design of my Gitbook website.
However, I struggled with implementing CSS for the PDF version.
When I applied the same CSS used for the website to the PDF, the results were not consistent.
It seemed like the CSS for the PDF was not functioning properly.
In my book.json
, I included the following:
"plugins": ["styles-sass", "image-captions"],
"styles": {
"website": "styles/website.scss",
"pdf": "styles/pdf.scss"
}
The content of my pdf.scss
file is as follows:
.book {
.book-body {
.page-wrapper {
.page-inner {
section.normal {
h1 {
text-align: center;
}
}
}
}
}
}
Can you confirm if I set this up correctly?
If you have any examples or samples of a pdf.css
file, please share them with me.