Quote:
Originally Posted by kovidgoyal
@icallaci: That sounds rather fragile. What happens if the stylesheets use some non-class based selectors? And perhaps I'm not understanding your use case, but why not simply run remove unused css in each new book? Or is it that you not only want to remove unused css but also want your modifications to copy over from the previous book? In which case, I have to ask again, what about non-class based selectors?
|
It probably is fragile, but it usually works (most of my reading is fiction and the CSS is fairly simple). And, you're correct, I do want my CSS mods to copy over from the previous book without needing to copy and paste 50 classes one by one. (Also, when removing unused classes, Sigil leaves the non-class based selectors alone, so they get copied too.) The last thing I do when modifying a book is to scroll through each file to see if everything looks ok, so if a non-class based selector is missing, I usually catch it at that point and put it back in. I use this process only when I have multiple books by one particularly notorious publisher that uses several hundred classes in every CSS. Each class is only very slightly different; for instance, "font-size: 0.913em" vs "font-size: 0.899em" or "text-indent: 11px" vs "text-indent: 10px" which absolutely drives me crazy. Anyway, it just helps to see everything in one place when I'm in this particular phase of fixing things. Thanks.