Thread: Clara 2E Strange line-height issue
View Single Post
Old 07-02-2023, 04:30 AM   #35
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 80,207
Karma: 148951761
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by graycyn View Post
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;
}
The correct code.
Code:
.first-letter {
  font-size: 1.5em;
  line-height: 0;
}
JSWolf is offline   Reply With Quote