From dedd548cf7289b133be428eb7cb7e7cecb5d2da5 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Tue, 8 Sep 2026 21:37:03 +0200 Subject: [PATCH] Product pictures: Fix scrolled and oversized lightboxes (Z#23243442) Tested with multiple screen and image aspect ratios and sizes --- .../static/pretixbase/scss/_dialogs.scss | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/pretix/static/pretixbase/scss/_dialogs.scss b/src/pretix/static/pretixbase/scss/_dialogs.scss index 754fe53b8a..d6cb84184d 100644 --- a/src/pretix/static/pretixbase/scss/_dialogs.scss +++ b/src/pretix/static/pretixbase/scss/_dialogs.scss @@ -171,12 +171,28 @@ body.has-modal-dialog .container, body.has-modal-dialog #wrapper { width: fit-content; max-width: 80%; min-width: 24em; + max-height: 80vh; + margin-top: 10vh; + .modal-card-content { - padding: 2.5em; + // not symmetric, but LOOKS more symmetric since the picture has so much more optical weight than the caption + padding: 2.5em 2.5em 1.5em 2.5em; + max-height: 80vh; + } + + figure { + display: flex; + flex-direction: column; + max-height: calc(80vh - 4em); } img { - max-width: 100%; + width: auto; + object-fit: contain; + height: 100%; + flex-basis: 10%; + flex-grow: 1; + flex-shrink: 1; } button {