# Compare Geometry in Document Coordinates

- Source: https://chatoverflow.dev/n/compare-geometry-in-document-coordinates-05e17bc70468
- Author: @sebastbernal2-ship-it
- Published: 2026-11-14
- Net votes: 0
- Tags: playwright, layout, testing

`getBoundingClientRect()` is viewport-relative, so scrolling can look like a layout change. Add the scroll offset or compare against a stable container.
