|
|
Thread Tools | Search this Thread |
07-31-2019, 10:54 PM | #1 |
Member
Posts: 10
Karma: 10
Join Date: Jul 2019
Device: Kindle Oasis
|
Does converting to KFX format change or limit the CSS styling of the source file?
I have a zipped HTML source file that I've converted to AZW3 format via Calibre, and the text formatting and layout look the way I want. I then tried converting the zip to KFX to take advantage of enhanced typsetting, and a number of the styles changed. I'm wondering if these are limitations of the KFX format or if I'm doing something wrong.
For instance, there are sections of paragraphs that are outdented and show a ~ at the beginning. The CSS looks like: Code:
div.thoughts p { text-indent: 0; padding-left: 1em; position: relative; } div.thoughts p::before { content: "~"; left: 0; position: absolute; } On normal paragraphs, I've got "text-indent: 1em;" which again looks correct in AZW3 but seems to get converted to something that's more like .5em in the KFX. And when changing the font size, the text indent doesn't scale. It's like it's been set to a fixed pixel width. There's also some left padding that I can't seem to get rid of on <ul> elements in KFX. And "font-family: monospace" text renders much bigger in the KFX version for some reason, even though the font-size is all 1em. Are there any workarounds for these issues? Or am I doing something wrong? The only thing I seem to be getting from the "enhanced" typsetting is dropcaps looking correct and the 3x3 grid for quick navigation. |
08-01-2019, 07:21 AM | #2 | |
Not Quite Dead
Posts: 194
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
|
Quote:
I have not used the Calibre KFX plug-in but my experience with AZW editing is that absolute and relative positioning should be avoided if you seek a predictable and robust screen behavior. |
|
Advert | |
|
08-01-2019, 08:34 AM | #3 |
Grand Sorcerer
Posts: 6,541
Karma: 84810789
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
In the process of converting to KFX Amazon applies heuristics intended to improve the book layout and tighten up spacing. That includes changing the size and units of elements in some cases. Those "improvements" are not always desirable.
The Kindle Publishing Guidelines specifically warns against the use of the "position" property, except for fixed layout books. It is not handled consistently. You can try to compensate for some of the changes made during KFX conversion, but that will be a trial and error process. Last edited by jhowell; 08-01-2019 at 08:37 AM. |
08-01-2019, 10:35 PM | #4 | |
Member
Posts: 10
Karma: 10
Join Date: Jul 2019
Device: Kindle Oasis
|
Quote:
I'm not sure that getting proper dropcaps and the page-flip navigation is worth all that pain. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change .docx source file from eBook | Margrave | Editor | 1 | 02-15-2019 04:46 PM |
can the source file change line spacing in final epub? | Gregg Bell | Sigil | 10 | 06-02-2017 05:44 PM |
New Kindle's KFX file format | DeepVoid | Library Management | 14 | 04-21-2017 10:28 AM |
Incorrect styling with specific CSS | quiris | Marvin | 9 | 07-04-2016 01:04 PM |
How to change source file without re-entering meta data? | therealjoeblow | Calibre | 4 | 06-29-2010 07:12 PM |