View Single Post
Old 02-09-2023, 09:48 AM   #8
twowheels
Wizard
twowheels ought to be getting tired of karma fortunes by now.twowheels ought to be getting tired of karma fortunes by now.twowheels ought to be getting tired of karma fortunes by now.twowheels ought to be getting tired of karma fortunes by now.twowheels ought to be getting tired of karma fortunes by now.twowheels ought to be getting tired of karma fortunes by now.twowheels ought to be getting tired of karma fortunes by now.twowheels ought to be getting tired of karma fortunes by now.twowheels ought to be getting tired of karma fortunes by now.twowheels ought to be getting tired of karma fortunes by now.twowheels ought to be getting tired of karma fortunes by now.
 
twowheels's Avatar
 
Posts: 1,854
Karma: 13432974
Join Date: Nov 2010
Device: Kobo Clara HD, iPad Pro 10", iPhone 15 Pro, Boox Note Max
OK, I figured it out by cloning the github repo and looking through the css files.

In epub.css (unlike html5.css) I found this:

Code:
/* Block elements */
p {
    text-indent: 1.2em;
    margin-top: 0;
    margin-bottom: 0;
}
So, it seems that it's text-indent that's causing it. So, I put in a book-specific style tweak that says:

Code:
p.center {
  text-indent: 0;
}

...and it's now properly centered.

I'm wondering whether this is something that should be in the global css file, or whether the text-indent should be removed from the global paragraph style -- I mean, coolreader base already handles margins, right?

As a follow-up test, as I was typing this, I changed the above p.center to just p in my book-specific style tweak and the dots stayed centered and I didn't see any change to the margins, so I'm even more inclined to believe that the text-indent should just be removed from the global paragraph style.
twowheels is offline   Reply With Quote