View Single Post
Old 10-17-2019, 08:57 PM   #37
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,430
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
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 View Post
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?
kovidgoyal is online now   Reply With Quote