readium / readium-js-viewer

👁 ReadiumJS viewer: default web app for Readium.js library
BSD 3-Clause "New" or "Revised" License
550 stars 186 forks source link

Ensure that fixed layout documents have no margins or padding #673

Closed rkwright closed 6 years ago

rkwright commented 6 years ago

This issue is a Bug

Related issue(s) and/or pull request(s)

https://github.com/readium/readium-shared-js/issues/423

Expected Behaviour

A fixed layout document should not be styled (except possibly for themes). No margins, padding or other styles should be injected into the document.

Observed behaviour

Currently, if the author of an EPUB does not specify a margin on the body element, the RS will add a margin of 8 pixels from the user-agent style sheet.

Steps to reproduce

  1. Load the test file (see below)
  2. Check page 4. Note that the red rectangle is cut off
  3. Check the margin in the browser's inspector.

Test file(s)

https://drive.google.com/open?id=10y7ZJKdoG2yDVfqXLRkCWrDcbRDhW_eq

Product

Additional information

None

danielweck commented 6 years ago

Pull Request: https://github.com/readium/readium-shared-js/pull/424

danielweck commented 6 years ago

Tested with the cloud reader and Ric's original Tiny-FXL.epub