UNPKG

@evidentpoint/readium-css

Version:

A set of reference stylesheets for EPUB Reading Systems

48 lines (45 loc) 1.32 kB
<!doctype html> <html> <head> <title>Test</title> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <style type="text/css"> html, body { margin: 0; padding: 0; box-sizing: border-box; } body { display: flex; height: 100vh; width: 100%; align-items: center; justify-content: center; } iframe { width: calc(60em + 40px); max-width: 100%; height: 90vh; max-height: calc(30em * 1.33); border: 0; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; /* May help later with Reading modes so that bg can be applied to whole page You need to allowtransparency on the iframe though (and sanitize authors’ CSS) */ background-color: transparent; } </style> </head> <body> <iframe src="page.html" id="page" allowtransparency="true" scrolling="no"></iframe> <script type="text/javascript" src="demo-script.js"></script> <script type="text/javascript"> // Do the following in the console // var root = document.getElementById("page").contentWindow.document.documentElement; // root.style.setProperty("var", "value"); </script> </body> </html>