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
This commit is contained in:
Daniel Holbert 2024-10-10 18:18:55 +00:00
parent df15e24acf
commit 2dff720965

View file

@ -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;