View Single Post
Old 06-22-2015, 11:41 PM   #22
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by DaleDe View Post
Amazon does provide a method to gracefully degrade the contents using CSS entries that are specific for the two formats.
I'm aware of that, though I would not use the word "graceful". My problems with that approach are numerous. For starters:
  • Often the differences between the KF7 and KF8 versions of content are so severe that you're including multiple copies of entire pages. For example, my title page is SVG on KF8, non-SVG on KF7. I might as well use separate files, because it saves nothing to combine them. And my efforts to avoid such high levels of redundancy resulted in really ugly markup in other parts of my books as well.
  • Because kindlegen doesn't translate CSS very well, the KF7 versions often require the use of tags like <nobr>, which are illegal in EPUB. This means the KF7 fallback content prevents me from taking my released EPUB and using it for KF8, which is very non-ideal.
  • Non-Kindle devices have no concept of the Kindle types, and not all readers correctly support media queries at all (and particularly complex ones, like @media not amzn-kf8 and (screen dimension stuff here)). The forced use of media queries for Kindle can cause real problems when trying to use the same source EPUB for actual EPUB readers and for KF8 ingest.
  • Wrapping an entire stylesheet in a media query, followed by a separate stylesheet for KF7 is just plain ridiculous. These aren't minor differences; it's a completely separate presentation; it should be a separate stylesheet.
  • It just seems really ugly to me; having the equivalent of an #ifdef every couple of lines makes it hard to make any sense out of the HTML.

CSS tricks like this work well when the differences between platforms are minor. For example, CSS works well for mobile sites because although the layout is different, most of the formatting (fonts, style, etc.) is the same, and more importantly, the renderers are roughly on equal footing.

Kindle's use, by contrast, is akin to using CSS to make your site simultaneously look good on the latest version of Chrome and on Netscape Navigator 0.9b6, by using a custom HTTP proxy that translates CSS into HTML suitable for Netscape Navigator 0.9b6....

It would be *much* easier, IMO, if we could just provide two files, one with formatting for KF8 and one with almost no formatting for KF7, and let Amazon's tools ship the right content to the right devices. It would be even better still if they let us provide a third version for iOS, which supports some features that the KF8 readers don't and vice-versa, and which ends up getting the KF7 slice on all my books solely because my KF8 slice contains SVG....

Last edited by dgatwood; 06-22-2015 at 11:44 PM.
dgatwood is offline   Reply With Quote