I've got a page where I load an image, and then if you click on the image it scales down (my preferred default is load full size, and then shrink as needed). Yes, the browser will do this (with the opposite default) automatically if it is a bare image, but I want this to happen on *my* wrapper page, with the links I like to have at the ready, and the tooltip set.
I can pass the image dimensions just fine, and I can pass down a scale factor just fine (as in, I've figured out by hand the viewport height, and scale to that value). But I want to know the viewport size dynamically, and scale to the current value. I've tried transform: scale( calc( 100vh / {{ = picheight }} px)) ; but this results in no scaling (probably an error) Yes, I could do javascript to replace the python-assisted CSS, but I'd rather not. Does anybody have a suggestion? webp2y apparently doesn't know the viewport size (doesn't seem to be a subfield of the request var), and I don't know another CSS-side value for the viewport height than the vh units. Thanks Dave S /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/36bda250-e28a-4cc6-80b1-9be630fd9738n%40googlegroups.com.