Skip to content

Commit fe34c91

Browse files
authored
[ez][HUD] Add darkmode for scroll to highlight (#6496)
Makes the highlight color for scroll to dark blue. Feel free to suggest other colors Light mode is unchanged Old <img width="846" alt="image" src="https://github.com/user-attachments/assets/792a61b7-fed5-4c17-ad57-6f0ec1108784" /> New <img width="829" alt="image" src="https://github.com/user-attachments/assets/f88859a4-3fe8-420d-a034-1a9494e99852" />
1 parent 07bec95 commit fe34c91

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

torchci/lib/useScrollTo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function useScrollTo() {
88
if (id != null) {
99
const job = document.getElementById(id);
1010
window.scrollTo({ top: job?.offsetTop, behavior: "smooth" });
11-
job?.style.setProperty("background-color", "LightYellow");
11+
job?.style.setProperty("background-color", "var(--scroll-highlight-bg)");
1212
}
1313
}, [router.asPath]);
1414
}

torchci/styles/globals.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161
--color-pending: #ffc107;
6262
--color-flaky: #8bc34a;
6363
--color-classified: lightpink;
64+
65+
/* Scroll to highlight */
66+
--scroll-highlight-bg: lightyellow;
6467
}
6568

6669
.dark-mode {
@@ -116,6 +119,9 @@
116119
--tooltip-bg: #3a3a3a;
117120
--tooltip-pinned-bg: #1e4555;
118121
--tooltip-text: #e0e0e0;
122+
123+
/* Scroll to highlight */
124+
--scroll-highlight-bg: rgba(0, 22, 74, 0.7);
119125
}
120126

121127
html {

0 commit comments

Comments
 (0)