Viewer: Fix incorrect display of pages in paged mode for books that override the default box-sizing CSS property on the <body> element. Fixes #1700109 [css margin-left and margin-right problem](https://bugs.launchpad.net/calibre/+bug/1700109)

This commit is contained in:
Kovid Goyal 2017-06-27 15:28:33 +05:30
parent 5311b5155e
commit ce4f774114
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 2 additions and 1 deletions

Binary file not shown.

View File

@ -192,6 +192,7 @@ class PagedDisplay
fgcolor = body_style.getPropertyValue('color') fgcolor = body_style.getPropertyValue('color')
bs.setProperty('box-sizing', 'content-box')
bs.setProperty('-webkit-column-gap', 2*sm + 'px') bs.setProperty('-webkit-column-gap', 2*sm + 'px')
bs.setProperty('-webkit-column-width', col_width + 'px') bs.setProperty('-webkit-column-width', col_width + 'px')
bs.setProperty('-webkit-column-rule', '0px inset blue') bs.setProperty('-webkit-column-rule', '0px inset blue')

View File

@ -170,7 +170,7 @@ def layout(is_single_page):
set_css(document.body, column_gap=gap + 'px', column_width=col_width + 'px', column_rule='0px inset blue', set_css(document.body, column_gap=gap + 'px', column_width=col_width + 'px', column_rule='0px inset blue',
min_width='0', max_width='none', min_height='0', max_height='100vh', column_fill='auto', min_width='0', max_width='none', min_height='0', max_height='100vh', column_fill='auto',
margin='0', border_width='0', padding='0', margin='0', border_width='0', padding='0', box_sizing='content-box',
width=screen_width + 'px', height=screen_height + 'px' width=screen_width + 'px', height=screen_height + 'px'
) )
# Without this, webkit bleeds the margin of the first block(s) of body # Without this, webkit bleeds the margin of the first block(s) of body