-
Notifications
You must be signed in to change notification settings - Fork 35
Portrait/full page image styling #25
Comments
Thanks for logging this issue and providing a solution, this is greatly appreciated. Given there’s SVG involved, I guess it would be a good idea to provide a little bit of historic background. During the initial development of Blitz, it came to our knowledge than some distributors may alter SVG elements containing only an image as it’s been discouraged by some resellers. Actually I can even point to this recommendation in Apple Books’ guidelines for instance since it’s online:
So it seems some have been going the extra mile and automated this change in order to meet those recommendations. Out of curiosity, I tested that at the time, and indeed So in order to strike a balance, we decided to use Now I’ll also mention Problem is both We hoped that maybe they would update to the Edge WebView at some point but well, this is the ebook ecosystem so it’s useless to hope for updates bringing the latest and greatest support possible. Anyways, I came up with a (quite frankly) over engineered CSS alternative months ago, using So it did not ship – once again, trying to strike a balance. Now, how this could possibly be added to Blitz? First things first:
However, “BlitzJS” is not under active development. Actually, it’s been halted for lack of resources – testing is time-consuming. Personally, I’d vastly prefer to handle such “polyfilling” of unsupported CSS with JavaScript instead of CSS hacks or HTML markup but others can feel free to chime in. And please be assured I’m publicising this preference knowing the state of JS support – in this case, it makes sense. Thanks again for raising this issue, this is one example for which documentation fails short – as it doesn’t explain why we didn’t use SVG. 👍 |
Given the Blitz project is under an “End of Life process”, this issue has been frozen, labeled |
I found out a problem in ADE with the code for portrait image styling when using ePub3 instead of ePub2. From what I understood, softwares either use vh or %. ADE with ePub2 uses % but vh with ePub3, but it doesn’t support @supports....! So this results in images not being displayed correctly in ADE when using ePub3. The solution is to use vh straight away, without apply it through @supports, but then it won’t be displayed correctly in the softwares not supporting vh.
The ADE display problem is something that can’t be ignored for my company, so I did a LOT of tests and came up with a code that seems to perfectly solve the problem, AND also makes us able to make an image full page, ratio preserved, beautifully centered in the page. I tested my code on ADE on Windows 10, iBooks on iPad, and on Android, Bluefire, Google Books and Gitden Reader.
I would love if you guys can test it and see if really it is as good as I’m thinking, and if so, for it to be implemented in the Blitz framework maybe?
Full page images (the height="98%" is for Bluefire, else it creates a blank page before the image):
Image with caption:
The text was updated successfully, but these errors were encountered: