Quote:
Originally Posted by momoha
But the code in my original post using vh seems to be working perfectly under ePub3, well according to my tests at least! I’m not having any problems actually, everything is fine, I was just sharing the code thinking it might help other people who also want to switch to ePub3. And the more people test it, the better it is! I just forgot to specify it was for ePub3... 
|
I built an epub3 with your three methods:
a) The first one, works in ADE but not in Sigil.
b) The second one, it doesn't work in ADE nor Sigil.
c) The third, WORKS!!

In both, Sigil and ADE.
So, you found a solution for images inside svg wrappers under ADE/epub3. The code to employ is:
Code:
<div class="portrait">
<svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 600 800" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink"><image height="800" width="600" xlink:href="../Images/c1.jpg"/></svg>
</div>
and
Code:
.portrait {
height: 100vh;
}
Of course, the ViewBox and the width and height inside the <image> tag will change according to the particular image, but the important is that the code WORKS!
I attach the tested epub in case of you want to check things.
By the way, "page-break-inside: avoid" or "page-break-after: avoid" with ADE/epub3 DOESN'T WORK. It works with ADE/epub2 but not in epub3. I have been seeking a solution for that for much time (without success). So, if you find a workaround for those properties under epub3, please, post it.