View Single Post
Old 07-01-2015, 10:42 AM   #11
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by dmapr View Post
@jackie_w, finally ran into this again — you're right, the CSS had a few (seemingly unrelated) rules with !important. Removing the !important fixed things. Any idea why adding font references would cause such an effect?
None at all, I'm afraid

It may have absolutely nothing to do with adding font references. It may be some toxic combination of !important and the cssutils Python package which is used to apply the rules from your kobo_extra.css file - which just happen to be font references in your case. However, this doesn't make any sense to me either as I've no reason to believe there's anything wrong with cssutils (which I use every day for css tweaking) and !important is valid css.

If you want to troubleshoot it, have you tried temporarily disabling kobo_extra.css and adding your font rules manually - also leaving the !important occurrences as-is? Does the Kobo still reject the whole css file?

For myself I've side-stepped the problem by auto-removing all occurrences of !important whenever I tweak css because I can see no good reason for a well-constructed book to need them in the internal css.
jackie_w is offline   Reply With Quote