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.
- Run iTunes.
- Right-click (or control-click) on iBooks and choose "Show in Finder".
- Make a copy of the IPA file in another location.
- Rename the copy to end in .zip.
- Double-click the ZIP file.
- Right-click the resulting IPA package and choose "Show Package Contents".
- Double-click "Payload".
- Right-click the iBooks.app bundle and choose "Show Package Contents".
- 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