From 80241aa352c98606eb8e302c6df8d295369572fa Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Mon, 25 May 2026 11:07:20 +0300 Subject: [PATCH] refactor(SliderArea): remove $derived className --- .../ui/SliderArea/SliderArea.svelte | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/widgets/ComparisonView/ui/SliderArea/SliderArea.svelte b/src/widgets/ComparisonView/ui/SliderArea/SliderArea.svelte index cfa81ae..0ff2440 100644 --- a/src/widgets/ComparisonView/ui/SliderArea/SliderArea.svelte +++ b/src/widgets/ComparisonView/ui/SliderArea/SliderArea.svelte @@ -266,22 +266,6 @@ $effect(() => { cancelled = true; }; }); - -// Dynamic backgroundSize based on isMobile — can't express this in Tailwind. -// Color is set to currentColor so it respects dark mode via text color. -const gridStyle = $derived( - `background-image: linear-gradient(currentColor 1px, transparent 1px), linear-gradient(90deg, currentColor 1px, transparent 1px); ` - + `background-size: ${isMobile ? '10px 10px' : '20px 20px'};`, -); - -// 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', -);