This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve cropping of rendered element
Before, we would assume that the element was always rendered at x=0/y=0 coordinates and crop out the element from the screenshot based on the height and width of the element. That wasn't a good assumption, as some rendered components define vertical and/or horizontal margin. I noticed that a diff for an element with `margin: 0 auto` (centered) wasn't snapshotted correctly. That's what led me into including the x and y position of the element as well.
- Loading branch information