sachinchoolur / lightGallery

A customizable, modular, responsive, lightbox gallery plugin.
https://www.lightgalleryjs.com/
Other
6.55k stars 1.29k forks source link

.lg-img-wrap opacity & scale incorrect when active #1640

Closed joepagan closed 2 months ago

joepagan commented 5 months ago

Description

After updating from lightgallery 2.4.0 to 2.7.2: When I click a gallery item, the lightbox loads, but, the item itself is hidden, revealing just the spinner gif.:

image

It appears the .lg-item element is fine, but the .lg-img-wrap child element has opacity: 0 & scale(0.5, 0.5, 0.5) on it.

image

I have to force this resolution with:

.lg-img-wrap,
.lg-video-cont {
  opacity: 1 !important;
  transform: scale3d(1, 1, 1) !important;
}

Steps to reproduce

Clear steps describing how to reproduce the issue. Please link to a demo project (Your website URL, codepen, or jsfiddle) if possible.

JS code that you use to initialize lightGallery.

lightGallery(document.getElementById('lightgallery'), {
    ... settings
});

Sample HTML markup

<div id="lightgallery">
    <a href="img/img1.jpg" data-lg-size="1600-2400">
        <img alt=".." src="img/thumb1.jpg" />
    </a>
    <a href="img/img2.jpg" data-lg-size="1024-800">
        <img alt=".." src="img/thumb2.jpg" />
    </a>
    ...
</div>

am I missing something obvious here?

Environment

stale[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.