diff --git a/frontend/src/topbar.ts b/frontend/src/topbar.ts index f6754af..b9859cd 100644 --- a/frontend/src/topbar.ts +++ b/frontend/src/topbar.ts @@ -2,7 +2,8 @@ export function setTopbarOffset() { const height = document.getElementById("topbar")!.getBoundingClientRect().height; - document.querySelector(":root")!.style = `--topbar-offset: ${height}px;` + const root: HTMLElement = document.querySelector(":root")!; + root.style.setProperty("--topbar-offset", `${height}px`); } export function addToggleDropdownListener() {