View Single Post
Old 04-20-2013, 03:43 PM   #25
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
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

Last edited by dgatwood; 04-20-2013 at 03:53 PM.
dgatwood is offline   Reply With Quote