I noticed something strange happening when I open a modal after clicking on an image on my website. The background image seems to zoom in along with the modal, thanks to a new class called .modal-open added to the body element. This class includes additional properties and values in the CSS, causing the background image to adjust as well.
body.modal-open {
padding-right: 16px;
display: block; }
.modal-open .modal {
overflow-x: hidden;
overflow-y: auto; }
I'm seeking a way to prevent the background image of the body element from zooming in when opening a modal. Any suggestions?