feat(ipub): ipub-body element

this replaces the ipub-content element, and makes ipub publications
limited/containerized into one element.
This commit is contained in:
Guz
2025-10-23 14:56:23 -03:00
parent 6a7abdea6f
commit 28f4d445c0
2 changed files with 17 additions and 4 deletions

View File

@@ -9,8 +9,8 @@
</script> </script>
</head> </head>
<body xmlns:epub="http://www.idpf.org/2007/ops" class="body"> <body xmlns:epub="http://www.idpf.org/2007/ops" class="body">
<ipub-content style="--ipub-padding: 10%;"> <ipub-body style="--ipub-padding: 10%;">
<main> <main id="content">
<ipub-background id="background0001"> <ipub-background id="background0001">
<img src="../images/background0001.jpg" width="100" height="100" /> <img src="../images/background0001.jpg" width="100" height="100" />
</ipub-background> </ipub-background>
@@ -54,6 +54,6 @@
<img src="../images/image0004.png" /> <img src="../images/image0004.png" />
</ipub-image> </ipub-image>
</main> </main>
</ipub-content> </ipub-body>
</body> </body>
</html> </html>

View File

@@ -8,9 +8,22 @@
margin: 0; margin: 0;
max-width: 100vw; max-width: 100vw;
max-height: 100vh;
overflow: clip;
display: flex;
} }
ipub-content { ipub-body {
max-width: 100%;
max-height: 100%;
position: relative;
display: flex;
flex-direction: column;
overflow: scroll;
--ipub-padding: 0%; --ipub-padding: 0%;
--ipub-gap: 0%; --ipub-gap: 0%;
--ipub-padding-x: var(--ipub-padding, 0%); --ipub-padding-x: var(--ipub-padding, 0%);