From 2889d0f60ae167f775f7023bf2b66fb4cbd337f3 Mon Sep 17 00:00:00 2001 From: Tyler Kennedy Date: Sat, 24 Dec 2022 08:34:33 -0500 Subject: [PATCH] Cap the maximum height of gallery images to 400px. Set object fit to center the image and then crop so they don't get distorted by aspect ratio changes. (#254) --- static/css/style.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/static/css/style.css b/static/css/style.css index 6cced33..0de3680 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1141,6 +1141,11 @@ form .post { .post .attachments a.image img { display: block; max-width: 100%; + object-fit: cover; + object-position: center; + max-height: 400px; + height: 100%; + width: 100%; } .post .attachments video { @@ -1381,6 +1386,9 @@ form .post { border-radius: 0; } + .post .attachments a.image img { + max-height: 300px; + } }