We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce736b2 commit 9615c95Copy full SHA for 9615c95
src/sphinx_book_theme/assets/scripts/index.js
@@ -131,7 +131,11 @@ var initTocHide = () => {
131
};
132
133
// Set up the intersection observer to watch all margin content
134
- let tocObserver = new IntersectionObserver(hideTocCallback);
+ let options = {
135
+ // Trigger callback when the top of a margin item is 1/3 up the screen
136
+ rootMargin: "0px 0px -33% 0px",
137
+ };
138
+ let tocObserver = new IntersectionObserver(hideTocCallback, options);
139
// TODO: deprecate popout after v0.5.0
140
const selectorClasses = [
141
"marginnote",
0 commit comments