View Single Post
Old 06-08-2020, 08:43 AM   #24
Brett Merkey
Not Quite Dead
Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.
 
Posts: 195
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
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;
}
Brett Merkey is offline   Reply With Quote