Closed windymilla closed 1 year ago
I would check if pseudo classes are officially supported in EPUB2.
I am no longer able to do development or testing with kindlegen due to Amazon's discontinuation of kindlegen, but I'd be happy to consider PR's from somone who is.
The odd thing is that it is a pseudo class that hides the first letter, then the identical pseudo class that restores it. Only the first of those appears to have an effect. Also, it's only with the visibility attribute. The colour attribute works fine with a pseudo class.
I've seen similar behavior for mobi in other contexts. My mental model is that it doesn't know how to hide things, it can only discard them. Thus unhiding is impossible.
But only for the pseudo class first-letter. It appears to be able to hide a whole paragraph and then unhide it. But I agree - when I converted the mobi to an epub2 (in Calibre) so I could look inside, the first letter was missing completely.
Should I keeo this issue open?
Since you have no way of fixing it, there's probably not much point :)
OK thanks!
Using ebookmaker 0.12.23 to convert the small attached HTML , the first letter of the sentence ("W") is missing from the Kindle mobi file created, but is visible in the other files.
The relevant section of CSS is
If
p.drop-cap:first-letter
is changed top.drop-cap
(to select the whole paragraph), it works as expected. Alternatively, instead of setting visibility, if you setcolor: red
for the first letter, then set it to blue, that works as expected. It appears to be the combination of first-letter and visibility that causes the problem.The reason this is an issue, is that CSS based on this has been the recommended method to deal with illustrated dropcaps for many years: the first letter is hidden (replaced by the dropcap image), and in the epub2/mobi it is made visible again (and the image is hidden). Of course, there is more CSS involved, and the second selector has ".x-ebookmaker-2" before it, to just restore the letter for epub2/mobi. The version above is simplified as much as possible to avoid distractions - it is nothing to do with the .x-ebookmaker selector.
Using ebookmaker 0.11.30 (bundled in a previous release of Guiguts), the "W" is visible. I'm fairly sure the 11.30 version is using kindlegen to create the mobi, whereas 12.23 is using Calibre, so that is a possible/probable cause. This is probably why the issue has only just started to be reported.