From 8c7ea939ab71553c50b45ddcf50bdbda8ed45825 Mon Sep 17 00:00:00 2001 From: aaravshirpurkar Date: Tue, 26 May 2026 13:43:57 +0530 Subject: [PATCH] fix: increase rounding snap tolerance to 4px to prevent background line bleed when padding is 0 --- src/lib/compositeLayout.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/compositeLayout.ts b/src/lib/compositeLayout.ts index 839a7e0..abb6b0f 100644 --- a/src/lib/compositeLayout.ts +++ b/src/lib/compositeLayout.ts @@ -408,8 +408,8 @@ function centerRectInBounds(params: { bounds: RenderRect; size: Size; maxSize: S if ( maxWidth >= boundsWidth && maxHeight >= boundsHeight && - Math.abs(boundsWidth - resolvedWidth) <= 1 && - Math.abs(boundsHeight - resolvedHeight) <= 1 + Math.abs(boundsWidth - resolvedWidth) <= 4 && + Math.abs(boundsHeight - resolvedHeight) <= 4 ) { return { x: boundsX,