View Single Post
Old 04-20-2013, 04:33 PM   #26
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by dgatwood View Post
If it bothers you enough, file a Radar with Apple asking for iBooks to include its own copy of WebKit so that its behavior won't depend on what OS it is running on.

That said, if there's a difference in behavior, that probably means that iBooks is setting some magic -webkit- properly that is supported on iOS 6 and not on iOS 5. So you can probably make them consistent by changing that property. Then you'll still have to tweak it to make iOS 5 look right, but at least you won't have to do extra work to keep iOS 6 from breaking while you're doing it.

Some good WebKit properties to define include:

Code:
html {
        -webkit-line-box-contain: block inline replaced !important;
        line-box-contain: block inline replaced !important;
        -webkit-nbsp-mode: normal;
}

html body {
        -webkit-hyphens: auto; /* if you want auto-hyphenation, else manual */
        -webkit-line-box-contain: block inline replaced !important;
        line-box-contain: block inline replaced !important;
        -webkit-font-smoothing: antialiased;
}

p {
        -webkit-line-box-contain: block inline replaced !important;
        line-box-contain: block inline replaced !important;
}
I recommend taking a look at the UA stylesheet for iBooks. It's fairly easy to do.
  1. Run iTunes.
  2. Right-click (or control-click) on iBooks and choose "Show in Finder".
  3. Make a copy of the IPA file in another location.
  4. Rename the copy to end in .zip.
  5. Double-click the ZIP file.
  6. Right-click the resulting IPA package and choose "Show Package Contents".
  7. Double-click "Payload".
  8. Right-click the iBooks.app bundle and choose "Show Package Contents".
  9. Examine the CSS files:
    • AEAssetShare.css
    • user_stylesheet_base.css.tmpl
    • user_stylesheet_flowable.css.tmpl (this is the important one)
    • user_stylesheet_picturebook.css.tmpl
Thanks.

Actually, the divine Liz is looking at this one particular book as I write this. I devoutly hope that she finds a cure, and I'll tell her about this post. She has the mindset for all the testing; we've made 17 full ePUBs on this one, plus some untold number of partial-test books, and I'm at the "can't-look-at-it-one-more-time" point. Having to rewrite Apple's own coding is something that makes me grind my teeth, TBH. I'll do it if I have to.

And, Dag? Thanks, really. My intense dislike of Apple's arrogance should not make you think I am not grateful for this time and effort on your part, I am.

Hitch
Hitch is offline   Reply With Quote