[dreamwidth/dw-free] caf70f: The Squish, Part Four
Branch: refs/heads/master Home: https://github.com/dreamwidth/dw-free Commit: caf70f3ff5fcaa3a665ff4e1f1cea509d4628c16 https://github.com/dreamwidth/dw-free/commit/caf70f3ff5fcaa3a665ff4e1f1cea509d4628c16 Author: Nick Fagerlund nick.fagerlund@gmail.com Date: 2020-12-01 (Tue, 01 Dec 2020)
Changed paths: M htdocs/js/jquery.imageshrink.js M htdocs/scss/components/imageshrink.scss
Log Message:
The Squish, Part Four
The quest to perfect this image-shrinking behavior continues. This time:
Distinguish between "normal" and "tall" (height > 2x width) casual images, and let tall images scroll instead of fitting the viewport. Nicer un-zoomed state for vertical comic strips.
Any image with a
style="..."
attribute is exempt from the squish. Same logic as the decorative code exemption: inline styles means you're spending effort to make things Just So, and the only point of the squish is to save your time when you don't want to spend effort. (Sidenote: we can't use the width/height attributes as this kind of signal, because casual "share" copypasta often has large w/h values.)Use img width/height attributes as the maximum size for the zoomed-in state. Nicer zoom behavior when using an over-resolution image to look good on retina screens.