Size motion photo clip to the still and make the toggle sticky #286

This commit is contained in:
Alan Grainger
2026-09-17 21:45:55 +12:00
parent c3dccf4d25
commit 16ba140766
10 changed files with 82 additions and 70 deletions
+4 -6
View File
@@ -139,14 +139,12 @@ html.pswp-no-arrows .pswp__button--arrow {
background: #000;
}
/* Motion photo (Live Photo) clip. It lives inside the slide's zoom wrap, which
carries PhotoSwipe's pan/zoom transform, so it stays pinned to the still
underneath through zoom, pan and resize with no geometry tracking in JS. */
/* Motion photo (Live Photo) clip, inside the slide's zoom wrap so it follows
PhotoSwipe's pan / zoom. Width / height are set inline from the still. */
.pswp__motion-video {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
top: 0;
left: 0;
object-fit: contain;
pointer-events: none; /* PhotoSwipe keeps handling drag / zoom / swipe */
}