View Single Post
Old Yesterday, 04:47 PM   #8
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: 85,615
Karma: 154365185
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 enuddleyarbl View Post
I already have a "normal" class. I was initially replacing those <i> and <em> blocks with that. I don't want to do that (manually or with a regex). In those blocks of text that I've formatted with italicized CSS, I want any existing <i> and <em> "spans" to automatically display as "normal". I have a dozen or so classes that are italicized. I was trying to find a reasonable way to modify the CSS to do that.

Replacing all the nesting selectors in those classes with the separately broken out classes works, though it's ugly. But, now Calibre is complaining that those new classes near the bottom of my CSS are problematic because of "no-descending-specificity:"

https://stylelint.io/user-guide/rule...g-specificity/
You have to remember that this is ePub, not a full blown web browser. While calibre will handle more then your average ePub reading software because of Qt 6 (via PyQt6). So the regex I supplied is the best way to do this. What you are doing in calibre will not work as an ePub on your Kobo. RMSDK does not support these sorts of things.
JSWolf is offline   Reply With Quote