From 249bacf50bdddcc4d1694f59e1113776c3fd42ec Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Fri, 1 Sep 2023 15:34:03 +0200 Subject: [PATCH] [fix] svg overlays when browser zoom is not 100% (#1836) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR fixes the effect of browser zoom on SVG overlays. I don't know why this works. Should fix https://github.com/tldraw/tldraw/issues/1834 ### Change Type - [x] `patch` — Bug fix ### Test Plan 1. Draw a rectangle. 2. Change your browser's zoom level (note: not tldraw's zoom level, just your browser's). 3. Select the rectangle. --- packages/editor/editor.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/editor/editor.css b/packages/editor/editor.css index 8bc2f7fa1..6ea8e18bd 100644 --- a/packages/editor/editor.css +++ b/packages/editor/editor.css @@ -235,8 +235,8 @@ input, position: absolute; top: 0px; left: 0px; - height: 1px; - width: 1px; + height: 10px; + width: 10px; overflow: visible; pointer-events: none; transform-origin: top left; @@ -246,8 +246,8 @@ input, position: absolute; top: 0px; left: 0px; - height: 1px; - width: 1px; + height: 10px; + width: 10px; pointer-events: none; }