Skip to content

Commit b4a6597

Browse files
committed
fix: slight pixel inconsistencies between ruler and elements outline
1 parent 73f2ac2 commit b4a6597

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/LiveDevelopment/BrowserScripts/RemoteFunctions.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4336,9 +4336,10 @@ function RemoteFunctions(config = {}) {
43364336
let scrollLeft = window.pageXOffset;
43374337

43384338
var edges = {
4339-
left: rect.left + scrollLeft,
4339+
// 0.8 is to fix pixel diff between ruler and outline (ruler is part of box model but outline is not)
4340+
left: rect.left + scrollLeft - 0.8,
43404341
right: rect.right + scrollLeft,
4341-
top: rect.top + scrollTop,
4342+
top: rect.top + scrollTop - 0.8,
43424343
bottom: rect.bottom + scrollTop
43434344
};
43444345

0 commit comments

Comments
 (0)