View Single Post
Old 03-01-2024, 02:54 PM   #35
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,566
Karma: 84810789
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by xxyzz View Post
I guess the text of tags in the same "block" are in the same "structure", probably by checking the "display" css rule. But I don't know which html tag creates the "container" type "structure". It seems the table tag creates the "table" type, and most tags are "text" type.
As far as I know "structure" is only used for organization of the Ion code and has no semantic meaning. KFX renders the same if a structure is replaced by its contents.

Quote:
Originally Posted by xxyzz View Post
I could get all the css rules of an element but kindle previewer only uses a few rules on an element and it also change the rule type and value, for example, "padding-left: 1em;" is changed to
Code:
margin_left: {
    value: 3.7039999961853027e0,
    unit: percent
  }
I hope the original rule could work so I don't have to guess how they compute this value...
This is an example of "Enhanced Typesetting". Amazon applies heuristics to transform formatting for more consistent rendering across books. In this case making the amount of padding dependent on the screen size instead of on the font size. Sometimes it works and other times it messes things up.

I believe using the original style will work but of course it will render differently from what Amazon produces.
jhowell is offline   Reply With Quote