Skip to content

Commit

Permalink
fixed layout document body margin reset to zero to ensure user styles…
Browse files Browse the repository at this point in the history
…heet doesn't set default 8px margin all around, see readium/readium-js-viewer#673 (comment)
  • Loading branch information
danielweck committed Nov 16, 2017
1 parent d6074e3 commit 8fa1468
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/views/one_page_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ var OnePageView = function (options, classes, enableBookStyleOverrides, reader)
_$epubBody = undefined;
} else {
_$epubBody = $("body", _$epubHtml);

if (!_enableBookStyleOverrides) { // fixed layout
_$epubBody.css("margin", "0"); // ensures 8px margin default user agent stylesheet is reset to zero
}
}

//_$epubHtml.css("overflow", "hidden");
Expand Down

0 comments on commit 8fa1468

Please sign in to comment.