From e9bde54890b9d8958468794fd4b0bc2233613b5c Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 8 Dec 2021 23:43:53 -0600 Subject: [PATCH] css: fix aspect ratio for 225, 270 size thumbnails. When setting max-height, we also have to set width to auto to preserve the aspect ratio. --- .../post_preview_component/post_preview_component.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/post_preview_component/post_preview_component.scss b/app/components/post_preview_component/post_preview_component.scss index fe99103ab..075939c7d 100644 --- a/app/components/post_preview_component/post_preview_component.scss +++ b/app/components/post_preview_component/post_preview_component.scss @@ -45,8 +45,8 @@ article.post-preview { } @media screen and (min-width: 660px) { - .post-preview-225 .post-preview-image { max-height: 225px; } - .post-preview-270 .post-preview-image { max-height: 270px; } + .post-preview-225 .post-preview-image { max-height: 225px; width: auto; } + .post-preview-270 .post-preview-image { max-height: 270px; width: auto; } } .post-preview {