Skip to content

Commit 8cea9f5

Browse files
smirk-devclaude
andauthored
feat: add themed custom scrollbar (#169)
Replace the default browser scrollbar with a custom themed one that matches DevCard's brand gradient. CSS-only, no JavaScript. - WebKit/Chromium/Safari: gradient thumb (primary -> accent), themed track, hover state with glow. - Firefox: scrollbar-width thin + scrollbar-color using the same theme variables (solid thumb fallback since gradients aren't supported). - Reuses existing --primary/--accent/--bg-secondary/--primary-glow CSS variables so light/dark mode just work. Closes #151. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3b4a027 commit 8cea9f5

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

apps/web/src/app.css

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,39 @@ a {
104104
transform: translateY(-2px);
105105
box-shadow: 0 6px 20px var(--primary-glow);
106106
}
107+
108+
/* ---------- Custom themed scrollbar (issue #151) ---------- */
109+
110+
/* Firefox */
111+
html {
112+
scrollbar-width: thin;
113+
scrollbar-color: var(--primary) var(--bg-secondary);
114+
}
115+
116+
/* WebKit (Chromium, Safari, Edge) */
117+
::-webkit-scrollbar {
118+
width: 10px;
119+
height: 10px;
120+
}
121+
122+
::-webkit-scrollbar-track {
123+
background: var(--bg-secondary);
124+
border-radius: 999px;
125+
}
126+
127+
::-webkit-scrollbar-thumb {
128+
background: linear-gradient(135deg, var(--primary), var(--accent));
129+
border-radius: 999px;
130+
border: 2px solid var(--bg-secondary);
131+
background-clip: padding-box;
132+
transition: background 0.2s ease, box-shadow 0.2s ease;
133+
}
134+
135+
::-webkit-scrollbar-thumb:hover {
136+
background: linear-gradient(135deg, var(--accent), var(--primary));
137+
box-shadow: 0 0 8px var(--primary-glow);
138+
}
139+
140+
::-webkit-scrollbar-corner {
141+
background: var(--bg-secondary);
142+
}

0 commit comments

Comments
 (0)