chore: Revert "Revert "fix: scrollIntoView should respect scroll-margin (#8715)"" (#9146)
* feat: refactor scrollintoview
* fix: typo
* chore: review suggestions
Co-authored-by: Daniel Lu <danilu@adobe.com>
* accomodate for scrollbars
---------
Co-authored-by: Daniel Lu <danilu@adobe.com>
Co-authored-by: Daniel Lu <dl1644@gmail.com>