View Single Post
Old 06-22-2025, 08:15 AM   #26
Falkor
Connoisseur
Falkor began at the beginning.
 
Posts: 90
Karma: 10
Join Date: Dec 2024
Device: Tolino Shine 5
Quote:
Originally Posted by JSWolf View Post
Are your eBooks supposed to be backwards compatible? Because if so, your code won't work. If not, then your code is OK.
Right, for backwards compatibility one would at least have to offer alternatives for all the heights in vh.

Quote:
Originally Posted by JSWolf View Post
So how do you do a drop cap for ePub 2? There is no initial letter. I prefer to read on my Kobo with ePub because it renders better. I will read with KePub when there is a need for it. But a drop cap is not a need for KePub.
The simplest way would be not to provide any fallback at all because it just doesn't work that well in epub2 (and even epub3 without support for initial-letter). So I'd use
Code:
@supports (initial-letter: 2) {…}
around the entire rule. Technically that's not supported by epub2 either, but as invalid rules must be ignored, it still does the trick.

This will also eliminate problems with renderers that support :first-letter, but not initial letter.

If you must have drop caps in epub2 as well, I guess you could still add spans and style them. Then you'd have to undo the span’s styling for all renderers that support initial-letter.
Falkor is offline   Reply With Quote