From bb24cd13c7fafbd42d3980c45351a58a76dabb18 Mon Sep 17 00:00:00 2001
From: 1 gal Rosemary <cerasusyedoensis@proton.me>
Date: Sat, 05 Apr 2025 17:39:28 +0000
Subject: [PATCH] fix(css): styles issues with popover, overflow, and scroll overflow (#1907)
---
quartz/components/scripts/callout.inline.ts | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/quartz/components/scripts/callout.inline.ts b/quartz/components/scripts/callout.inline.ts
index 8f63df3..3b7e16d 100644
--- a/quartz/components/scripts/callout.inline.ts
+++ b/quartz/components/scripts/callout.inline.ts
@@ -28,17 +28,15 @@
) as HTMLCollectionOf<HTMLElement>
for (const div of collapsible) {
const title = div.firstElementChild
+ if (!title) continue
- if (title) {
- title.addEventListener("click", toggleCallout)
- window.addCleanup(() => title.removeEventListener("click", toggleCallout))
+ title.addEventListener("click", toggleCallout)
+ window.addCleanup(() => title.removeEventListener("click", toggleCallout))
- const collapsed = div.classList.contains("is-collapsed")
- const height = collapsed ? title.scrollHeight : div.scrollHeight
- div.style.maxHeight = height + "px"
- }
+ const collapsed = div.classList.contains("is-collapsed")
+ const height = collapsed ? title.scrollHeight : div.scrollHeight
+ div.style.maxHeight = height + "px"
}
}
document.addEventListener("nav", setupCallout)
-window.addEventListener("resize", setupCallout)
--
Gitblit v1.10.0