View Single Post
Old 03-22-2014, 09:24 PM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,625
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
The "best" body?

Hi

I tend to use the same body for each style-sheet of my EPUB2 books. The idea is to include in the body informations that can later be easily modified, if need be, by modern ebook-readers in order to provide more freedom to the reader.

This is the one and I would be happy to discuss every point.
Code:
@page {
  margin-top: 0.4cm;
  margin-bottom: 0.2cm;
}

body {
  margin: 0 0.5cm;
  font-family: "Linux Libertine O";
  line-height: 1.25;
}
Comments

1. - Of course, we can use relative units (em or %). Are there any drawbacks?
2. - font-family is named only once
3. - line-height is named only once
4. - lateral margins are set-up only once
5. - I use padding for vertical margins because of some ADE quirks. (replaced with @page following advices)
6. - I use a transparent background-color ... for no particular reason. (suppressed following advices)
7. - font-size is supposed to be 100%, so it's not named here.
8. - Exceptions can still apply for everything: then, new attributes and values have to be added to the relevant styles.

Any idea about improving this?

Last edited by roger64; 03-24-2014 at 04:29 AM. Reason: Following advices, changed padding witht @page
roger64 is offline   Reply With Quote