react-stickup icon indicating copy to clipboard operation
react-stickup copied to clipboard

api for estimated offsets for a given scroll position

Open garthenweb opened this issue 6 years ago • 1 comments

When using window.scrollTo to scroll to a specific position in the application the developer needs to know in advance how large the offset will be so that the element is not hidden by a sticky element. A public api to estimate this position by x and y coordinates would solve this need.

garthenweb avatar Aug 29 '18 16:08 garthenweb

Instead of a public API, adding scroll-margin by default might even be a better approach as it would make scrollTo work by default (I guess): https://css-tricks.com/almanac/properties/s/scroll-margin/

garthenweb avatar Dec 13 '20 21:12 garthenweb