@ -746,7 +746,7 @@ class Fancybox extends Base {
$style.id = id;
$style.type = "text/css";
$style.innerHTML = `.compensate-for-scrollbar {padding-right: ${scrollbarWidth}px;}`;
$style.innerHTML = `.compensate-for-scrollbar {--fancybox-scrollbar-compensate: ${scrollbarWidth}px;}`;
document.getElementsByTagName("head")[0].appendChild($style);
@ -5,6 +5,7 @@ html.with-fancybox {
body.compensate-for-scrollbar {
overflow: hidden !important;
touch-action: none;
padding-right: var(--fancybox-scrollbar-compensate, 0);
}
.fancybox__container {