From 77844f802cf16fbcf1eecd46f5c33f9de601ea25 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Mon, 18 Nov 2024 14:19:25 +0530 Subject: [PATCH] [web] Add workaround for black grid lines when zooming onto images in Chrome Fixes https://github.com/ente-io/ente/issues/4067 --- web/apps/photos/src/styles/global.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/apps/photos/src/styles/global.css b/web/apps/photos/src/styles/global.css index c30221d644..e60b1944f4 100644 --- a/web/apps/photos/src/styles/global.css +++ b/web/apps/photos/src/styles/global.css @@ -90,6 +90,15 @@ body { .pswp__img { object-fit: contain; + /* For reasons I don't understand, Chrome shows black grid lines on images + when we zoom into them, unless we set a background color. + https://github.com/ente-io/ente/issues/4067 + + Even after setting the background color, the black lines are visible for + a split second when an image is zoomed on to for the first time (this can + be used as a test to see when this workaround is no longer required). + */ + background-color: black; } .pswp__button--arrow--left,