mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Kobo driver CSS modification should use mimetype
This commit is contained in:
parent
7cbad00c25
commit
08819cb340
@ -1917,8 +1917,11 @@ class KOBOTOUCH(KOBO):
|
||||
else:
|
||||
debug_print("KoboTouch:_modify_epub: received container")
|
||||
|
||||
cssnames = [n for n in container.name_path_map if n.endswith('.css')]
|
||||
for cssname in cssnames:
|
||||
# cssnames = [n for n in container.name_path_map if n.endswith('.css')]
|
||||
# for cssname in cssnames:
|
||||
from calibre.ebooks.oeb.base import OEB_STYLES
|
||||
for cssname, mt in container.mime_map.iteritems():
|
||||
if mt in OEB_STYLES:
|
||||
newsheet = container.parsed(cssname)
|
||||
oldrules = len(newsheet.cssRules)
|
||||
# remove any existing @page rules in epub css
|
||||
|
Loading…
x
Reference in New Issue
Block a user