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