Skip to content

Commit 00dd49e

Browse files
committed
new scroll invisible scrollbar
1 parent e98b269 commit 00dd49e

3 files changed

Lines changed: 39 additions & 4 deletions

File tree

frontend/src/components/Dashboard/PopularTemplatesPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ export function PopularTemplatesPanel() {
421421
</h3>
422422
</div>
423423

424-
<div className="min-h-[320px] max-h-[420px] overflow-y-auto rounded-[var(--radius-control)] border border-border/70 bg-background p-4 text-sm leading-7 text-foreground">
424+
<div className="scrollbar-hover min-h-[320px] max-h-[420px] overflow-y-auto rounded-[var(--radius-control)] border border-border/70 bg-background p-4 text-sm leading-7 text-foreground">
425425
{renderPreview(selectedTemplate.preview)}
426426
</div>
427427

frontend/src/index.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,41 @@
152152
cursor: pointer;
153153
}
154154
}
155+
156+
@layer utilities {
157+
.scrollbar-hover {
158+
scrollbar-width: none;
159+
scrollbar-color: transparent transparent;
160+
}
161+
162+
.scrollbar-hover::-webkit-scrollbar {
163+
width: 0;
164+
height: 0;
165+
}
166+
167+
.scrollbar-hover:hover {
168+
scrollbar-width: thin;
169+
scrollbar-color: color-mix(in oklab, var(--foreground) 32%, transparent)
170+
transparent;
171+
}
172+
173+
.scrollbar-hover:hover::-webkit-scrollbar {
174+
width: 8px;
175+
height: 8px;
176+
}
177+
178+
.scrollbar-hover:hover::-webkit-scrollbar-thumb {
179+
background-color: color-mix(
180+
in oklab,
181+
var(--foreground) 28%,
182+
transparent
183+
);
184+
border: 2px solid transparent;
185+
border-radius: 999px;
186+
background-clip: padding-box;
187+
}
188+
189+
.scrollbar-hover:hover::-webkit-scrollbar-track {
190+
background: transparent;
191+
}
192+
}

frontend/src/routes/_layout/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ function Dashboard() {
3131
<h1 className="text-2xl truncate max-w-sm">
3232
Hi, {currentUser?.full_name || currentUser?.email}
3333
</h1>
34-
<p className="text-muted-foreground">
35-
Welcome back, nice to see you again!!!
36-
</p>
3734
</div>
3835

3936
<section className="rounded-lg border bg-card p-4">

0 commit comments

Comments
 (0)