mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-20 11:24:05 -06:00
refactor: remove backup highlight cleanup from clearAllHighlights
This commit is contained in:
parent
30677df3d3
commit
d6219339ef
@ -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 = ""
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user