From d6219339ef5ae71388ff6c70892f898d2e956b67 Mon Sep 17 00:00:00 2001 From: neerajadhav Date: Tue, 8 Jul 2025 18:16:12 +0530 Subject: [PATCH] refactor: remove backup highlight cleanup from clearAllHighlights --- quartz/components/scripts/util.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/quartz/components/scripts/util.ts b/quartz/components/scripts/util.ts index 24ce989d6..4d4c80001 100644 --- a/quartz/components/scripts/util.ts +++ b/quartz/components/scripts/util.ts @@ -68,20 +68,6 @@ export function clearAllHighlights() { element.style.transition = originalTransition }) activeHighlights.clear() - - // Also clear any highlights that might not be tracked (backup cleanup) - // This catches highlights in popovers or other edge cases - const allHighlightedElements = document.querySelectorAll('[style*="background-color"]') - allHighlightedElements.forEach((el) => { - const element = el as HTMLElement - if ( - element.style.backgroundColor.includes("var(--highlight") || - element.style.backgroundColor.includes("#ffeb3b") - ) { - element.style.backgroundColor = "" - element.style.transition = "" - } - }) } /**