Skip to content

Commit 72a15c4

Browse files
Merge pull request #483 from ruhelamahi7-code/fix/scroll-progress-bar-dark-mode
fix: make ScrollProgressBar track visible in dark mode using Tailwind…
2 parents 9e8daca + aab6361 commit 72a15c4

2 files changed

Lines changed: 4 additions & 21 deletions

File tree

frontend/src/components/ScrollProgressBar.jsx

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { useEffect, useState } from "react";
2-
import "../styles/ScrollProgressBar.css";
32

43
const ScrollProgressBar = () => {
54
const [progress, setProgress] = useState(0);
@@ -23,22 +22,10 @@ const ScrollProgressBar = () => {
2322
}, []);
2423

2524
return (
26-
<div style={{
27-
position: "fixed",
28-
top: 0,
29-
left: 0,
30-
width: "100%",
31-
height: "4px",
32-
background: "rgba(0,0,0,0.08)",
33-
zIndex: 9999,
34-
}}>
35-
<div style={{
36-
height: "100%",
37-
width: `${progress}%`,
38-
transition: "width 0.08s linear",
39-
borderRadius: "0 2px 2px 0",
40-
}}
41-
className="progress-fill"
25+
<div className="fixed top-0 left-0 w-full h-1 bg-black/10 dark:bg-white/10 z-[9999]">
26+
<div
27+
style={{ width: `${progress}%`, transition: "width 0.08s linear" }}
28+
className="h-full rounded-r-sm bg-gradient-to-r from-blue-500 to-purple-500"
4229
/>
4330
</div>
4431
);

frontend/src/styles/ScrollProgressBar.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)