mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Conversion: Handle the style attribute on the <html> tag
This commit is contained in:
parent
4a82c5f5ac
commit
2c46d54c47
@ -227,6 +227,10 @@ class CSSFlattener(object):
|
||||
for item in self.oeb.spine:
|
||||
html = item.data
|
||||
body = html.find(XHTML('body'))
|
||||
if 'style' in html.attrib:
|
||||
b = body.attrib.get('style', '')
|
||||
body.set('style', html.get('style') + ';' + b)
|
||||
del html.attrib['style']
|
||||
bs = body.get('style', '').split(';')
|
||||
bs.append('margin-top: 0pt')
|
||||
bs.append('margin-bottom: 0pt')
|
||||
|
Loading…
x
Reference in New Issue
Block a user