From ad6e741a516238549d0671b220e8c92f2b4b69b3 Mon Sep 17 00:00:00 2001 From: not-nullptr Date: Sat, 13 Jul 2024 01:39:31 +0100 Subject: [PATCH] feat: scroll css variable for css theming users --- layouts/profile/script.js | 1 + 1 file changed, 1 insertion(+) diff --git a/layouts/profile/script.js b/layouts/profile/script.js index de4733ca..2beb3e11 100644 --- a/layouts/profile/script.js +++ b/layouts/profile/script.js @@ -1905,6 +1905,7 @@ setTimeout(async () => { // banner scroll banner.style.top = `${5+Math.min(window.scrollY/4, 470/4)}px`; + document.querySelector(":root").style.setProperty("--scroll", `${window.scrollY}px`); // load more stuff if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight - 1000) {