diff --git a/lib/docs/index.html b/lib/docs/index.html
index 8bf527999e..972b0d65d1 100644
--- a/lib/docs/index.html
+++ b/lib/docs/index.html
@@ -290,7 +290,7 @@
color: var(--link-color);
position: sticky;
float: left;
- top: 0px;
+ top: 0.5em;
right: -16px;
z-index: 1;
margin-left: -2em;
diff --git a/lib/docs/main.js b/lib/docs/main.js
index ddc3892ad8..d10cdde95f 100644
--- a/lib/docs/main.js
+++ b/lib/docs/main.js
@@ -2476,7 +2476,7 @@ var zigAnalysis;
short = markdown(short);
var long = markdown(docs);
tdDesc.innerHTML =
- "" + short + "
" + "" + long + "
";
+ "" + short + "
" + "" + long + "
";
}
else {
tdDesc.innerHTML = markdown(short);
@@ -3718,5 +3718,12 @@ var zigAnalysis;
})();
-
-
+function scrollOnCollapse(event) {
+ const details = event.target;
+ if (!details.open && details.getBoundingClientRect().top < 0) {
+ console.log("scrolling!")
+ details.parentElement.parentElement.scrollIntoView(true);
+ } else {
+ console.log("not scrolling!", details.open, details.top);
+ }
+}
\ No newline at end of file