From 2dff720965076ae6576e7073c50b385719329a79 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Thu, 10 Oct 2024 18:18:55 +0000 Subject: [PATCH] Bug 1921128: Pixel-snap the contents of dialog boxes, to avoid arbitrary layout/clipping differences when viewport is even vs. odd pixel height. a=RyanVM Original Revision: https://phabricator.services.mozilla.com/D223797 Differential Revision: https://phabricator.services.mozilla.com/D225240 --- browser/themes/shared/tabbrowser/content-area.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/browser/themes/shared/tabbrowser/content-area.css b/browser/themes/shared/tabbrowser/content-area.css index be690ac92dc2..5fec50fdbccf 100644 --- a/browser/themes/shared/tabbrowser/content-area.css +++ b/browser/themes/shared/tabbrowser/content-area.css @@ -220,6 +220,13 @@ padding: 0; overflow-x: auto; + /* Ensure that dialog boxes are pixel-snapped, to keep their internal layout + * consistent, regardless of whether the surrounding layout places them at a + * fractional position. (This helps prevent arbitrary 1px shifts that could + * otherwise appear inside of a vertically-centered dialog when the + * viewport-height changes from being odd to even.) */ + will-change: transform; + &:not(.spotlightBox) { box-shadow: 0 2px 14px 0 rgba(0, 0, 0, 0.2); border-radius: 8px;