mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Conversion pipeline: Fix styles applied via selectors to the <html> element being ignored
Fixes #1862401 [Class applied to html element is lost during conversion](https://bugs.launchpad.net/calibre/+bug/1862401)
This commit is contained in:
parent
2862b4cdd2
commit
9e0e846f25
@ -660,9 +660,8 @@ class CSSFlattener(object):
|
|||||||
stylizer = self.stylizers[item]
|
stylizer = self.stylizers[item]
|
||||||
if self.specializer is not None:
|
if self.specializer is not None:
|
||||||
self.specializer(item, stylizer)
|
self.specializer(item, stylizer)
|
||||||
body = html.find(XHTML('body'))
|
|
||||||
fsize = self.context.dest.fbase
|
fsize = self.context.dest.fbase
|
||||||
self.flatten_node(body, stylizer, names, styles, pseudo_styles, fsize, item.id)
|
self.flatten_node(html, stylizer, names, styles, pseudo_styles, fsize, item.id)
|
||||||
items = sorted(((key, val) for (val, key) in iteritems(styles)), key=lambda x:numeric_sort_key(x[0]))
|
items = sorted(((key, val) for (val, key) in iteritems(styles)), key=lambda x:numeric_sort_key(x[0]))
|
||||||
# :hover must come after link and :active must come after :hover
|
# :hover must come after link and :active must come after :hover
|
||||||
psels = sorted(pseudo_styles, key=lambda x :
|
psels = sorted(pseudo_styles, key=lambda x :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user