Use padding instead of margins for page margins in paged mode

This commit is contained in:
Kovid Goyal 2015-12-14 18:16:05 +05:30
parent ebadee8a5e
commit 662a260b5c
2 changed files with 5 additions and 5 deletions

Binary file not shown.

View File

@ -211,12 +211,12 @@ class PagedDisplay
bs.setProperty('overflow', 'visible')
bs.setProperty('height', this.current_page_height + 'px')
bs.setProperty('width', (window.innerWidth - 2*sm)+'px')
bs.setProperty('margin-top', this.effective_margin_top + 'px')
bs.setProperty('margin-bottom', this.effective_margin_bottom+'px')
bs.setProperty('margin-left', sm+'px')
bs.setProperty('margin-right', sm+'px')
bs.setProperty('padding-top', this.effective_margin_top + 'px')
bs.setProperty('padding-bottom', this.effective_margin_bottom+'px')
bs.setProperty('padding-left', sm+'px')
bs.setProperty('padding-right', sm+'px')
for edge in ['left', 'right', 'top', 'bottom']
bs.setProperty('padding-'+edge, '0px')
bs.setProperty('margin-'+edge, '0px')
bs.setProperty('border-'+edge+'-width', '0px')
bs.setProperty('min-width', '0')
bs.setProperty('max-width', 'none')