summaryrefslogtreecommitdiffstats
path: root/public/css
diff options
context:
space:
mode:
authorKen D'Ambrosio <ken@jots.org>2026-05-14 23:11:20 +0000
committerKen D'Ambrosio <ken@jots.org>2026-05-14 23:11:20 +0000
commitde80b9871ebe1497c672f3c7c7bb5467dabcb83a (patch)
tree348e9d3e012e24a41c1eb0fe16c9915b98f97b8f /public/css
parentc76ea393777897e0c367e186d1a3b243193d8377 (diff)
Fill viewport with media in lightbox and slideshow
Lightbox: .lb-media now fills the full stage (flex, 100%x100%) and #lb-img/#lb-video use width/height:100% + object-fit:contain so at least one axis always reaches the edge. Click-to-close updated to check event.target===stage instead of stopPropagation. Slideshow: #ss-img/#ss-video likewise changed from max-width/max-height to width/height:100% so small or portrait media fills the stage. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'public/css')
-rw-r--r--public/css/style.css14
1 files changed, 5 insertions, 9 deletions
diff --git a/public/css/style.css b/public/css/style.css
index 062b187..059d340 100644
--- a/public/css/style.css
+++ b/public/css/style.css
@@ -173,20 +173,17 @@ main { max-width: 1400px; margin: 0 auto; padding: 24px; }
flex: 1;
display: flex; align-items: center; justify-content: center;
width: 100%;
- cursor: zoom-out;
overflow: hidden;
- padding: 16px;
}
-/* inline-block shrink-wraps to the rendered image size;
- arrows inside are then anchored to the photo's actual edges */
.lb-media {
position: relative;
- display: inline-block;
+ width: 100%; height: 100%;
+ display: flex; align-items: center; justify-content: center;
line-height: 0;
cursor: default;
}
-#lb-img { max-width: calc(100vw - 32px); max-height: calc(100vh - 130px); object-fit: contain; display: block; }
-#lb-video { max-width: calc(100vw - 32px); max-height: calc(100vh - 130px); display: block; }
+#lb-img { width: 100%; height: 100%; object-fit: contain; display: block; }
+#lb-video { width: 100%; height: 100%; display: block; }
#lb-audio { width: 400px; max-width: 90vw; display: block; }
.lb-info {
@@ -264,7 +261,7 @@ main { max-width: 1400px; margin: 0 auto; padding: 24px; }
position: relative;
}
#ss-img, #ss-video {
- max-width: 100%; max-height: 100%;
+ width: 100%; height: 100%;
object-fit: contain;
opacity: 1;
transition: opacity .5s ease;
@@ -375,7 +372,6 @@ legend { padding: 0 8px; color: var(--text-dim); font-size: .85rem; }
main { padding: 12px; }
.lb-prev { left: 4px; }
.lb-next { right: 4px; }
- .lb-stage { padding: 48px 40px; }
.files-table { font-size: .78rem; }
}