diff --git a/src/widgets/ComparisonView/ui/SliderArea/SliderArea.svelte b/src/widgets/ComparisonView/ui/SliderArea/SliderArea.svelte index d717e4b..310ed0b 100644 --- a/src/widgets/ComparisonView/ui/SliderArea/SliderArea.svelte +++ b/src/widgets/ComparisonView/ui/SliderArea/SliderArea.svelte @@ -221,27 +221,34 @@ const gridStyle = $derived( + `background-size: ${isMobile ? '10px 10px' : '20px 20px'};`, ); -// Replaces motion.div animate={{ scale: isSidebarOpen && !isMobile ? 0.94 :1 }} -const scaleClass = $derived( - isSidebarOpen && !isMobile - ? 'scale-[0.94]' - : 'scale-100', +// When the sidebar opens on desktop, the canvas pads in on every side +// so the paper insets evenly (equal pixel gaps top/bottom/left/right) +// instead of shrinking proportionally with a transform — which on wide +// viewports produced uneven horizontal vs. vertical gaps and also +// caused the layout engine to measure the un-scaled width. +const paddingClass = $derived( + isSidebarOpen && !isMobile ? 'p-6' : 'p-0', ); -