View Single Post
Old 10-04-2022, 08:33 PM   #1
irrationalpie
Junior Member
irrationalpie began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2019
Device: Kindle PW3
Question Apply styling to header/footer

The "Styles" page of the viewer preferences mentions there are custom classes for different flow modes, e.g. body.calibre-viewer-paginated and body.calibre-viewer-scrolling. Are there specific classes or ids associated with the headers and footers? I would love to be able to style them specifically, although setting a minimum font size in preferences did fix my main complaint, which is that they were microscopically small on my laptop. I tried looking on github to see how the viewer constructs things, but although I saw references to e.g. something that looked like it could be a 'book-side-margin' class, I couldn't get that to do anything.

After I experimentally tried overriding all text and background colors, I suspect the style sheet may simply not apply to the headers and footers, which might explain why they're in a sans-serif font despite my preference saying to use serif font. Although at least the background/foreground color respects my custom color preferences.
Code:
* {
color: black !important;
background-color: white !important;
border-style: dotted !important;
}
This screenshot shows "Chapter 1" (part of the heading) in my normal custom font/background color, with the text below in black and white as per the experiment stylesheet.
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2022-10-04 16-22-03.png
Views:	943
Size:	26.0 KB
ID:	196986  
irrationalpie is offline   Reply With Quote