View Single Post
Old 06-03-2013, 03:50 AM   #17
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,462
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 52novels View Post
Code:
p:first-of-type::first-line {
    font-weight: normal;
    font-variant: small-caps;
 }
To see an example of this in commercially-available Kindle book, get the sample for Blake Crouch's ABANDON (http://www.amazon.com/Abandon-ebook/dp/B00ARJLYE0). There's enough of the sample to see this work in KF8 devices and apps. I chose not to make this book fully backward compatible for legacy MOBI, so the CSS above displays the first line text in sentence case. I suppose the "conventional" way of making small caps with spans and a media query could be done for these, but the project's constraints didn't afford a lot of time to try. Plus, I figured, the issue will eventually resolve itself over time and that readers using the legacy systems weren't going to be adversely affected by the absence of small caps.

One additional note: I didn't want the first line of the first <p> tag in the author's bib page and copyright page to have small caps. As such, I added a selector (p.chapstart:first-of-type::first-line) to limit this effect to certain pages. It may be somewhat inefficient and add more specificity than I'd like, but it worked and the author loved it so I shipped. /shrug
Maybe I've mis-remembered, but I believe we were talking about how to make that work for K7, as well, as there are still millions--millions--of K7 devices out there upon which these books could be read?

Hitch
Hitch is offline   Reply With Quote