See fs_images.pyj in the calibre source code for the logic I use to detect when to convert 100% too 100vh
Quote:
Originally Posted by KevinH
A few questions.
Is it safe to assume every svg tag with both width and height attributes of "100%" and with an image tag child should be converted to "100vh" and "100vw".
Or should it be further restricted to when there is only 1 svg tag and it is the only child of the body tag or maybe the first grandchild of the body assuming a single div is being used like we do when adding Covers in Sigil.
Since the cover will fill the screen, having no other elements in the body make sense as a selection criteria.
Are there any other cases when this type of swap makes sense?
Thanks,
KevinH
ps why are we talking about this in the Calibre forum. I only found it by accident. Perhaps we should move these posts to Sigil. Can any moderator cross forums like that?
|