Kobo driver CSS modification should use mimetype

This commit is contained in:
David Forrester 2013-08-01 14:53:42 +10:00 committed by Kovid Goyal
parent 7cbad00c25
commit 08819cb340

View File

@ -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