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.
This commit is contained in:
Jarek Radosz 2022-02-01 23:30:21 +01:00 committed by GitHub
parent 6f8c91254e
commit eff0106efb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -191,7 +191,6 @@ $quote-share-maxwidth: 150px;
img:not(.thumbnail):not(.ytp-thumbnail-image):not(.emoji) {
max-width: 100%;
height: auto;
}
}