: entry.contentBoxSize;
const offset = Math.floor(contentBoxSize.inlineSize / 2);
- dialog.style.setProperty("transform", `translateX(-${offset}px)`);
+ dialog.style.setProperty("--translate-x", `-${offset}px`);
}
}
});
? entry.contentBoxSize[0]
: entry.contentBoxSize;
const offset = Math.floor(contentBoxSize.inlineSize / 2);
- dialog.style.setProperty("transform", `translateX(-${offset}px)`);
+ dialog.style.setProperty("--translate-x", `-${offset}px`);
}
}
});
position: fixed;
right: 0 !important;
top: 0 !important;
-
- // Remove the offsets for the dialog position.
- transform: none !important;
}
@include screen-sm-up {
// this causes a blurry text rendering in Chromium.
// The offset is calculated using a `ResizeObserver`.
left: 50%;
+ transform: translateX(var(--translate-x, 0));
&[aria-hidden="false"] {
animation: wcfDialog 0.3s;