You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the css scroll-snap spec, which I know is separate from the intersection observer spec, a concept called the optimal viewing region is defined, and is set by the scroll-padding property for a scrollport/root. Aside from the property, there has also been talk of heuristics to infer this optimal viewing region from fixpos/stickypos elements obfuscating areas of a scrollport. Either way, when using intersectionObserver I've found myself wanting to compound my rootMargin values off my currently rendered optimal viewing region.
I wonder if @tabatkins can corroborate that I'm making sense here? What do you think @ojanvafai?
The text was updated successfully, but these errors were encountered:
Sure and this is what I've done, though with more complications like handling the computed value of scroll-padding changing to do relayout or matchMedia updates. But even if it can be hacked in, it could still be aided by a keen "auto optimal viewing region" value for rootMargin, like why intersectionObserver was created as a way to not just polyfill the behavior with scroll events?
https://drafts.csswg.org/css-scroll-snap-1/#optimal-viewing-region
In the css scroll-snap spec, which I know is separate from the intersection observer spec, a concept called the optimal viewing region is defined, and is set by the
scroll-padding
property for a scrollport/root. Aside from the property, there has also been talk of heuristics to infer this optimal viewing region from fixpos/stickypos elements obfuscating areas of a scrollport. Either way, when usingintersectionObserver
I've found myself wanting to compound myrootMargin
values off my currently rendered optimal viewing region.I wonder if @tabatkins can corroborate that I'm making sense here? What do you think @ojanvafai?
The text was updated successfully, but these errors were encountered: