[css-layout] Object tag content dimensions

Dear All,

when SVG graphics is placed into HTML via <object> tag, it fills the
container maintaining the original aspect ratio.

This means (demonstrated on
http://drifted.in/other/firefox/centered-object-click-event.html ):
(1) you cannot set the border around that inner content (that light frame is
not touching that red rectangle)
(2) you cannot define hit area for mouse click events only to that inner
content (now active inside the complete light frame)
(3) on the contrary, when you define mouse click events on the remaining
area, they are restricted to a very limited area as the rest is hidden by
(2)

Is there any chance to have some flag for the future to prefer those inner
object dimensions after fitting the object into the container?

My goal is to create a kind of 'lightbox'. When user clicks to the graphics
inside the page content, it is enlarged, surrounded with tiny border (and
translucent background). When user clicks outside that image, the 'lightbox'
is closed.

Currently I employ various hacks, but I hope it could be done more
efficiently in the future.

Thanks,

Jan

Received on Saturday, 18 February 2017 00:49:09 UTC