View Single Post
Old 06-08-2020, 09:12 AM   #25
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 Brett Merkey View Post
Paperwhite seems to be supporting creditable small-caps for some time. However, any attempt to use it is spoiled when a publisher uses hacks to approximate the small-cap effect: like typing in ALL CAPS then inserting <small> or <span class="sc"> across a handful of words or across each separate word. Sort of takes the fun out of the device support for both that font property and the pseudo-elements.

To undo all that hacking without the effort of clearing that hack code, while (supposedly) leaving the hack for non-conforming devices, I use this CSS prophylactic: undo what the <small> or <span> do and then transform the result.

Example:
h2 ~ p:first-of-type small {
/* negate common hack */
text-transform: lowercase;
font-size: 1em;
}
h2 ~ p:first-of-type::first-line {
font-variant: small-caps;
font-size: 1em;
}

Text-transform?????

And presumably, if you think that "typing in all caps" isn't needed, to cover all bases, you must work with only a single type of device.

On a Paperwhite?


Hitch
Hitch is offline   Reply With Quote