lokesh / lightbox2

THE original Lightbox script (v2).
http://lokeshdhakar.com/projects/lightbox2/
MIT License
6.2k stars 1.77k forks source link

Horizontal white space of lightbox-container with SVG images #706

Closed h-e-l-l-o-w-o-r-l-d closed 1 year ago

h-e-l-l-o-w-o-r-l-d commented 3 years ago

Latest 2.11.3 Chrome, Firefox

Hi there,

using SVG Images results in a lightbox-container with lots of white space left and right. Am I missing something or is it a bug? PNGs and JPGs work as espected -> lightbox-container has the same size like the image.

SVG is 400 x 400 px and the html-tag is like:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Ebene_1" x="0px" y="0px" viewBox="0 0 400 400" style="enable-background:new 0 0 400 400;" xml:space="preserve">

See screenshot:

lightbox_bug

lokesh commented 1 year ago

Resolved in v2.11.4: https://github.com/lokesh/lightbox2/releases/tag/v2.11.4