Quote:
Originally Posted by DNSB
I read what you wrote as saying to remove all font-sizes less than 1em excluding smallcap styles.
I was attempting to point out that some styles involve font sizes less than 1em are not easy to recognize as a smallcaps style. And some smallcap styles are not very clear -- in one case, the class that handled AM/PM/etc. was found in the stylesheet as span.abbrv. doing fake smallcaps using font-size 0.8em while another span wrapped around this one was named span.condc2sc which used @support to either use real smallcaps (if supported) using c2sc with a font-size of 1.25 em or doing nothing. It was supposed to be epub3 and web readable. If you left the font-size of 1.25em in place and removed the 0.8em, it would look rather odd when displayed by software that did not support real smallcaps.
The other item I was trying to make clear is not all stylesheets use the em as a unit.
Your advice, in my opinion, comes very close to that utility that nuked the style information in an epub to fix a bug in early Kobo firmware. There are just too many variant techniques to allow for one-size-fits-all advice.
|
What I do is nuke the <p class="some useless class"> into <p> and add in the <p> that I want. I then find all the classes that need to have a text-indent: 0 added to them. I then do a search for <p class= and see what classes there are and what they are used for and find any other classes that need a text-indent: 0. Some eBooks already have such in the CSS. But most do not.
You can also search for <span class= to find what classes are used in a span such as smallcaps. Using Diap's Toolbox, I fix the spans that are for bold and italics to <i> and <b>. Then the rest is trivial. It's not difficult to find smallcap classes as well as clean up the CSS some.