From eff0106efbf1cec02d46a13460fcd686591e64d8 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Tue, 1 Feb 2022 23:30:21 +0100 Subject: [PATCH] FIX: Image sizes were slightly off in some cases (#15678) This fixes rare cases of layout shift caused by images appearing slightly smaller after being loaded. For example, a 371x1031 image is uploaded. It gets lightboxed, with the generated thumbnail of size 179x500. `height: auto` changes that thumbnail's size (only after being loaded) to 179x497, causing a 3px shift. I did not observe any regressions with this change. --- app/assets/stylesheets/common/base/topic-post.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/app/assets/stylesheets/common/base/topic-post.scss b/app/assets/stylesheets/common/base/topic-post.scss index 4ca310e6c4f..37ce8a326d1 100644 --- a/app/assets/stylesheets/common/base/topic-post.scss +++ b/app/assets/stylesheets/common/base/topic-post.scss @@ -191,7 +191,6 @@ $quote-share-maxwidth: 150px; img:not(.thumbnail):not(.ytp-thumbnail-image):not(.emoji) { max-width: 100%; - height: auto; } }