View Single Post
Old 09-21-2024, 05:27 AM   #27
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by RbnJrg View Post
That point is not a problem at all. What I do to avoid that with a property that is not recognized by the program and so the entire css is ignored is to employ JAVASCRIPT!!!

All css3 properties are in one css stylesheet and all css2 properties are in another css stylesheet. With javascript I add the stylesheet with the css3 properties to the xhtml files. If the epub is open with an epub2 ereader, then the script is not executed and the css3 properties never are employed (because never is linked to the xhtml files). On the other hand, if the epub is open by an epub3 ereader, the script is executed, the css3 stylesheed is added and the css3 properties overwrite the css2 ones. One of this days I will upload an epub2/3 so you can watch how the code works. The epub3 ereaders will give the best reading experience while epub2 ereaders can give a decent (but not the best) one.
So basically any ePub software that's not ePub3 or does not do the Javascript will get the CSS2 code and the rest will get the CSS3 code. I wonder if that will work on a Kobo with KePub.
JSWolf is offline   Reply With Quote