Thread: Clara 2E Strange line-height issue
View Single Post
Old 07-01-2023, 03:28 PM   #32
graycyn
Wizard
graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.
 
Posts: 1,591
Karma: 11722446
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
I honestly don't remember where I picked up this bit of CSS, or when, but it was quite possibly from someone here on MobileRead.

I've not done a ton of testing yet, but it seems to work at least some of the time, as long as you aren't getting carried away with how much larger you make the first letter. But I could be wrong and it might catastrophically fail somewhere. The smarter folks here will undoubtedly tell me so and I'll learn from them!

I'm pretty sure it did not work for Kindle AZW3, but I think it worked for KFX on Kindle, EPUB, and KEPUB on Kobo when I last played with it.

Code:
.first-letter {
  font-size: 1.50em;
  line-height: 0.80; /* Set line-height by using default value of 1.2 divided by font-size, above. */
  vertical-align: baseline;
}
graycyn is offline   Reply With Quote