View Single Post
Old 08-29-2023, 09:49 AM   #32
Vakke
Enthusiast
Vakke doesn't litterVakke doesn't litter
 
Posts: 32
Karma: 164
Join Date: Oct 2021
Location: Finland
Device: Kobo Libra 2
Quote:
Originally Posted by enuddleyarbl View Post
Without changing the styling within the text of the book, itself, only the few items at the top of my stylesheet (down to the comment saying "This whole section is styling for specific page types of a book") will change anything. Those make changes to how some of the standard html tags (margins, paragraphs, headings, etc.) behave. Once that stylesheet is in place, you'd then have to edit the styles in the text of the book to use any particular style.

For instance, many books will use a <blockquote> tag for things like notes or letters. To change how those things look, you'd have to replace the text's surrounding <blockquote></blockquote> tags with <div class="note"></div> or <div class="letter"></div> tags. That way, the text that was initially styled with blockquote styling will be styled with whatever styling is in the stylesheet for the note or letter (in this case) custom classes.

I've attached a sample of how I use the various styles. You can just add it to your library and edit it to see how the styles/tags can be used.

Once you've made all the style/class changes you want, in the Calibre Editor, you can use the "Remove Unused CSS Rules" tool to remove all the unused rules in that stylesheet.

EDIT: Of course, you can edit that stylesheet however you want to change how things look (or just to prune out things you don't care about). Over time, I've added all kinds of one-of-a-kind type classes that are probably useless to most people (for instance, almost everything in the "Stuff Unique to Particular Books" section near the bottom of the stylesheet). You can probably remove that section and leave a much less unwieldy (more wieldy?) stylesheet to play around with.
Thank you very much!

I think I'm getting a bit hang of the editing but I need much more practice. One thing I'm wondering is the space between body text paragraphs. Is there a command just to get rid of them and use the the defined indent?

Edit: I think I found something to add margins to the body part of the text.

Last edited by Vakke; 08-29-2023 at 09:59 AM.
Vakke is offline   Reply With Quote