View Single Post
Old 07-10-2023, 02:14 PM   #111
nabsltd
Fanatic
nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.
 
Posts: 528
Karma: 9529956
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe, Kindle 4 Touch
Quote:
Originally Posted by Turtle91 View Post
Although my 'put all styling in the CSS sheet' philosophy cringes at putting styles in the html, I would think that following kindle's own recommendations would work, no?
I'm fairly sure that the MobileRead forums gurus could write several books about the quirks of Kindle. Between the actual "publishing" or conversion, plus the at-times baffling rendering choices, there is no way to know whether the documentation is wrong, or the code is wrong. All we know is that the two don't match up at times.

Even the page you listed has bizarre examples of "incorrect" code. One shows that properly nested DIVs with different formatting is "incorrect", and that you should not nest the DIVs, but rather have them sequential. The same for actual Cascading styles being "incorrect". Both of those "incorrect" examples work just fine on Kindle, at least as far as my tests go.

And, it also says the following:
Quote:
Fixed Values
Avoid using fixed values such as points and pixels for CSS properties such as font-size, width, height, margin, padding, and text-indent. To enable rendering across various screen sizes and resolutions, specify these values in ems or percentages.
I'll re-write that to what really happens:
Quote:
Fixed Values
If you use fixed values such as points and pixels for CSS properties such as font-size, width, height, margin, padding, and text-indent, Kindle will convert them to a percent or em value that is calculated based on the DPI of an original Kindle (167dpi).
In other words, a margin/indent of 30px on a 300dpi device should be 0.10". Instead, it's closer to 0.18", just like it was on the original Kindle.

Quote:
Originally Posted by Hitch View Post
I KNOW that they never intended that 50% thing (the "if an image is 50-51% of the width of the screen, the PPW, et al, will blow it up to 100%") bug) to be real. That was a bl**dy BUG.
See above for why that might have happened. There was probably code in the original Kindle to limit to 100%, and that blended with the "px using 167dpi at all times" resulted in some threshold where an image locked to full width.

Last edited by nabsltd; 07-10-2023 at 02:19 PM.
nabsltd is offline   Reply With Quote