roadrunnertwice: Rebecca on treadmill. (Text: "She's a ROCKET SCIENTIST from the SOUTH POLE with FIFTY EXES?") (Rocket scientist (Bitter Girl))
Nick Eff ([personal profile] roadrunnertwice) wrote in [site community profile] dw_dev 2020-09-08 06:01 am (UTC)

Just to clarify -- the div needs to have an inline style defined, or can an unadorned div suffice?

Yeah, it needs an inline style. Well, more precisely, it just needs a style attribute. An empty style="" attribute works fine.

That exemption isn't really meant for "normal content" images like a photo or a comics page; it's meant for stuff inside some kind of decorative markup like a character sheet or a nav thingy, where the sizes of things need to line up just so. For casual images, the HOPE has always been that you just post it and it's fine (plus or minus a little bit of click-to-zoom). But we're kind of still getting there.

What's tricky is the amount of (kinds of stuff) x (ways in which stuff gets posted) x (ways in which stuff gets displayed). Like,

  • Pixel dimensions match intended display size at 1x (SMBC; QC) vs. px decoupled from display size so it looks good at high-DPI (your comics).
  • Integral image meant to be viewed in toto (any non-pano photo, whether landscape or portrait) vs. "navigable canvas" image meant to be viewed in parts, through a movable viewport (comics with vertical panel flow and no splash pages).
  • Mobile vs. desktop.
  • Bare img tag vs. image in a link (typically pointed at the full size image).
  • Handcrafted post intended for DW vs. markup in a feed that came from who knows where.
  • Height/width attributes carefully chosen for the purpose at hand vs. height/width attributes auto-filled by an image host's "click for embed HTML" copypasta.
  • 1000 journal styles worth of reading pages.

So for a portrait of a person, you definitely want to keep the image inside the viewport by default, which means constraining the height. But that plays hell with a 4-comi style strip, so you need click-to-zoom. But click-to-zoom only fixes strips that aren't inside links (the QC feed); the SMBC feed still looks kinda hosed. But you don't want to break link-clicking, so you need some other way to control zooming, maybe a little hover control or something? But making that work on EVERY JOURNAL STYLE starts getting kind of prohibitive, and besides, the link goes to a full size version of that image anyway, so I haven't gotten that one solved yet. And then we've got your issue, where the pixel dimensions aren't related to the intended display size.

Well, I'm rambling. Anyway, I figured out how to limit the "zoomed" state to the provided height/width attributes, but haven't figured out how to skip displaying the "zoomable" cursor in that case for images that are already the size they'd "zoom" to. Maybe that's not a huge problem; I'll mull it over a bit more.


Post a comment in response:

If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org